class Model extends \Orm\Model { public static function connection() { echo 'testing'; die; //$class = get_called_class(); //return property_exists($class, '_connection') ? static::$_connection : null; } }
Harro Verton wrote on Friday 27th of May 2011:You can even put your model extension in another package, like I did here: https://github.com/WanWizard/fuel-nestedsets (not finished yet).
Jelmer Schreuder wrote on Friday 27th of May 2011:Because the Orm isn't aliased you can't extend it like other parts of the Fuel core. Just use your class like you defined it, but register it in the bootstrap as "Model" (there's one in the core which you overwrite) and make all your models extend just "Model" instead of Orm\Model. You can also name it to something else, in which case you don't have to register it in the bootstrap.
It looks like you're new here. If you want to get involved, click one of these buttons!