public function _init() { parent::_init(); $this->_acl = new Zend_Acl(); $roles = $this->config->application->get("privileges/privileges/roles"); foreach ($roles as $role => $parent) { $this->addRole($role, (array) $parent); } $order = $this->config->application->get("privileges/privileges/order"); foreach ($order as $type) { $rule = $this->config->application->get("privileges/privileges/{$type}"); foreach ($rule as $role => $resources) { if (count($resources) > 0) { foreach ($resources as $resource => $privileges) { if (!$this->hasResource($resource)) { $this->addResource($resource); } $this->addRule($type, $role, $resource, $privileges); } } else { if (!$this->hasResource("*")) { $this->addResource("*"); } // add Rule $this->addRule($type, $role, "*"); } } } }
public function __construct($module) { parent::__construct(); $this->_name = $module; $this->_data = $this->config->application->get("canvas/{$module}"); $this->reset(); }
public function __construct() { parent::__construct(); $routers = new Joy_Config_Section($this->config->application->get("files/config/router")); $items = $routers->getAll(); foreach ($items as $key => $item) { $this->_items[] = new Joy_Router_Item($item["url"], $item["controller"], $item["action"]); } }
public function __construct($app_dir, $app_env = null) { parent::__construct(); $this->config->application->set("folders/root", $app_dir); $this->config->application->loadConfig($app_env); // set library include path $this->setIncludePath($this->config->application->get("folders/library")); // set controller include path $this->setIncludePath($this->config->application->get("folders/controller")); $this->router = Joy_Router::getInstance(); // Bootstrap Loader... $bootstrap = $this->config->application->get("application/bootstrap"); if ($bootstrap) { $ref = new Joy_Reflection($bootstrap); $object = $ref->newInstance(); } if (!$object instanceof Joy_Application_Bootstrap) { $object = new Joy_Application_Bootstrap(); } }
protected function _registerEvents() { parent::_registerEvents(); $this->event->register("app.start", $this, "onStart"); $this->event->register("view.init", $this, "onView"); }
public function __construct($conn) { $this->_connection = $conn; parent::__construct(); }