DBRole::getBehaviors PHP Method

getBehaviors() public method

public getBehaviors ( )
    public function getBehaviors()
    {
        if (!$this->behaviors) {
            $this->behaviors = array_unique(explode(",", $this->behaviorsRaw));
            sort($this->behaviors);
        }
        return $this->behaviors;
    }

Usage Example

示例#1
0
文件: Behavior.php 项目: recipe/scalr
 /**
  *
  * Enter description here ...
  * @param DBRole $dbRole
  * @return Scalr_Role_Behavior
  */
 public static function getListForRole(DBRole $role)
 {
     $list = array();
     foreach ($role->getBehaviors() as $behavior) {
         $list[] = self::loadByName($behavior);
     }
     return $list;
 }