public function __construct($template) { $this->addon_id = 'surveys'; parent::__construct(); $this->_template = $template; }
/** * loadModel * Loads the current model * * @return the Object of the model */ public function loadModel($model_type) { require_once dirname(__FILE__) . '/model/base.php'; $model_target = 'Addons_surveys_model_' . $model_type; if (!self::$model instanceof $model_target) { if (!class_exists($model_target, false)) { require_once dirname(__FILE__) . '/model/' . $model_type . '.php'; } self::$model = new $model_target(); } return self::$model; }
/** * __construct * Only calls parent constructor */ public function __construct() { parent::__construct(); }