Beispiel #1
0
 /**
  * Redefine constructor for RBAC
  *
  * @access public
  *
  * @param Adapter $connection
  *
  * @result void
  */
 public function __construct(Adapter $connection)
 {
     parent::__construct($connection);
     if (!empty($params['roles'])) {
         $this->roles = $this->tree($params['roles']);
     }
 }
Beispiel #2
0
 /**
  * Constructor file RBAC
  *
  * @public
  *
  * @param Adapter $connection
  *
  * @result void
  */
 public function __construct(Adapter $connection)
 {
     parent::__construct($connection);
     if (!$this->db->tableExists('rbac_role')) {
         $this->db->createTable('rbac_role', ['`name` varchar(127) NOT NULL', '`type` int(11) NOT NULL DEFAULT \'0\'', '`based` varchar(127)', '`data` text', 'UNIQUE KEY `name` (`name`)'], 'ENGINE=MyISAM DEFAULT CHARSET=utf8');
     }
 }