class Formloader { public static function _init() { \Fuel::add_package("parser"); } }Which works fine, as long as the package is called before the first instance of a \View:: is called... Otherwise, the parser's view does not override the main app's view class and the \Mustache lib is not loaded... (an "ErrorException [ Error ]: Class 'Mustache' not found" is thrown) I could actually do without the forge method given in the \Parser\View, I just wanted to know the best way to go about getting the _init to run, or to manually override the \View with the \Parser\View after the \View has already been called. Thanks.
class View_Mustache extends Viewrather than the current:
class View_Mustache extends \View
// check whether the Parser package is available if ( ! class_exists('Parser\\View')) { // if not, load it Package::load('parser'); }
It looks like you're new here. If you want to get involved, click one of these buttons!