enov / Aurora

Kohana module for manual data mapping, JSON and REST
MIT License
17 stars 2 forks source link

Force load() a model #3

Open enov opened 11 years ago

enov commented 11 years ago

If you know you want a model to load via Aurora, you would do:

$model = Model::factory('Feed_Item');
Au::load($model, array('email' => 'jack@google.co.uk')); // load a model from first row returned

However, it would be nice if we also have this:

// won't work now:
$model = Au::load('Model_Feed_Item', array('email' => 'jack@google.co.uk'));