Beispiel #1
0
 /**
  * 取得角色数据对象
  *
  * @param integer $roleId
  * @param ZtChart_Model_DbTable_Role $roleDAO
  * @return ZtChart_Model_Db_Table_Row
  */
 public function fetchRow($roleId, $roleDAO = null)
 {
     if (null === $roleDAO) {
         $roleDAO = new ZtChart_Model_DbTable_Role();
     }
     return $roleDAO->fetchRow(array('role_id = ?' => $roleId));
 }
Beispiel #2
0
 /**
  * 
  * @param integer|string|ZtChart_Model_Db_Table_Row $role
  */
 public function __construct($role)
 {
     if (null !== $role) {
         if (!$role instanceof ZtChart_Model_Db_Table_Row) {
             $roleDAO = new ZtChart_Model_DbTable_Role();
             if (is_numeric($role)) {
                 $role = $roleDAO->fetchRow($role);
             }
         }
         $this->_roleRow = $role;
     }
 }
Beispiel #3
0
 /**
  * 取得一个角色
  * 
  * @param integer $roleId
  * @return ZtChart_Model_Db_Table_Row
  */
 public function fetchRow($roleId)
 {
     return $this->_roleDAO->fetchRow($roleId);
 }