public static function getInstance() { if (is_null(self::$_Instance)) { self::$_Instance = new self(); } return self::$_Instance; }
/** * * @return <type> */ public function load_parents() { $stub = Zupal_Roles::getInstance(); $parents = $stub->find(array(), 'id'); foreach ($parents as $parent) { $this->parent->addMultiOption($parent->identity(), $parent->label); } }
public function __construct() { foreach (Zupal_Roles::getInstance()->findAll() as $role) { $this->addRole($role->as_acl_role()); } foreach (Zupal_Grants::getInstance()->findAll() as $grant) { if ($grant->allow) { $this->allow($grant->role, $grant->resource, $privileges, $assert); } } }
/** * */ public function roledataAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $role = Zupal_Roles::getInstance(); echo $role->render_data(array()); }