src/Permission.php
public function checkRules($rules, Array $params = null)
    {
        if (is_string($rules)) {
            $rules = (array)explode(',', $rules);
        }

        foreach ($rules as $name) {
            if (!$this->hasRule($name) || !$this->getRule($name)->execute($this, $params)) {
                return false;
            }
        }

        return true;
    }
public function checkRules($rules, Array $params = null)
    {
        if (is_string($rules)) {
            $rules = (array)explode(',', $rules);
        }

        foreach ($rules as $name) {
            if (!$this->hasRule($name) || !$this->getRule($name)->execute($this, $params)) {
                return false;
            }
        }

        return true;
    }
public function checkRules ( $ rules , Array $ params = null ) { if ( is_string ( $ rules ) ) { $ rules = ( array ) explode ( ',' , $ rules ) ; } foreach ( $ rules as $ name ) { if ( ! $ this -> hasRule ( $ name ) || ! $ this -> getRule ( $ name ) -> execute ( $ this , $ params ) ) { return false ; } } return true ; }
Checks the rules for the Permission.

@param string|array $rules
@param array $params
@return bool
Checks the rules for the Permission .