Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
[solved]how can I add my custom class in fuelphp ?
  • how can I add my custom class in fuelphp ?
  • Dump it into classes and use it?
  • Put your file in che "class" folder and add it to the autoloader in the boostrap.php file:

    Autoloader::add_classes(array(
        // Add classes you want to override here
        'MyCLass' => APPPATH.'classes/myclass.php',
    ));

  • Note that it s not required to define anything for classes in app, they will be found without add_classes() too.

    Adding them like this will only save a file_exists() check as the autoloader doesn't have to check if it exists.
  • tanks everyone... ^_^
    it work like a charm... :D
    I'm getting used with fuelphp..

Howdy, Stranger!

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

In this Discussion