Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Interfaces
  • Has anyone been using interfaces with FuelPHP? If so, how? I'd like to do something like the example below. I have the file at fuel/app/classes/int_model.php. Obviously Fuel doesn't know to load it and putting the file in always_load.classes doesn't work. Apart from explicitly requiring the file, is there a better way?
    class Model_Client extends Model implements Int_Model
    
  • Making it follow the same rules as for normal classes ;- ) Autoloading supports interfaces as well as classes, but you didn't change the underscore to a directory separator. If you put the file in 'fuel/app/classes/int/model.php' it'd work fine.
  • Duh, awesome! Thanks man! Is there anything you guys didn't think of?
  • Haha, as much as I'd love to claim this as some special feature: it's just normal PHP.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion