/** * Construct the Behavior, and attaches itself to the $blog object * * @param string $name * @param string $settings * @param string $blog * @author Armando Sosa */ function __construct($name, $settings, &$controller) { parent::__construct(); $this->Controller =& $controller; $this->name = $name; $this->settings = set_merge($this->settings, $settings); $this->Controller->registerBehavior($this); $this->register($controller); }
/** * Constructor * * @param string $name Name of the current theme */ function __construct($name, $alias = null) { new ThemeController($name, $this); $viewClass = $this->viewClass; $viewFile = strtolower($viewClass); if (!dupLoad($viewFile)) { $viewClass .= 'View'; $viewFile = "view." . $viewFile; if (!dupLoad($viewFile)) { trigger_error("{$viewClass} class missing (expected on {$viewFile})", E_USER_NOTICE); exit; } } new $viewClass($this); if (is_admin()) { $this->__adminInit(); } $this->__loadBehaviors(); $this->View->__loadHelpers(); $this->__loadComponents(); if ($alias) { $this->alias = $alias; } parent::__construct(); }