I'm trying to extend the Html core class. I have placed an html.php file in app/classes and I have tried using both the documented way of naming the class (MyHtml extends Html) and some I found online (e.g. Html extends Fuel\Html) but it does not work. My app consistently can not find the functions placed in the extended core class.
Any ideas on what may be causing this?
Thanks in advance
If the autoloader can't find it you didn't name the file right or didn't name the class right.
- class MyHtml should be at "app/classes/myhtml.php" (fully lowercase path!) and may extend either Fuel/Core/Html or Html
- class Html should be at "app/classes/html.php" and can only extend Fuel/Core/Html (as Html is the class itself), must be registered in the Autoloader
And it's in the app folder thus no namespace declaration for either.
Btw, the "My" prefix is just an example in docs and incredibly ugly. I'd never use that personally. Either extend the core and overwrite it or extend the core into a class of your own that has a name that describes why it's not just an extension.