function rule($accept,$route,$subjects='') {
        if (!is_array($subjects))
            $subjects=explode(',',$subjects);
        list($verbs,$path)=$this->parseRoute($route);
        foreach($subjects as $subject)
            foreach($verbs as $verb)
                $this->rules[$subject?:'*'][$verb][$path]=$accept;
        return $this;
    }
function rule($accept,$route,$subjects='') {
        if (!is_array($subjects))
            $subjects=explode(',',$subjects);
        list($verbs,$path)=$this->parseRoute($route);
        foreach($subjects as $subject)
            foreach($verbs as $verb)
                $this->rules[$subject?:'*'][$verb][$path]=$accept;
        return $this;
    }
function rule ( $ accept , $ route , $ subjects = '' ) { if ( ! is_array ( $ subjects ) ) $ subjects = explode ( ',' , $ subjects ) ; list ( $ verbs , $ path ) = $ this -> parseRoute ( $ route ) ; foreach ( $ subjects as $ subject ) foreach ( $ verbs as $ verb ) $ this -> rules [ $ subject ? : '*' ] [ $ verb ] [ $ path ] = $ accept ; return $ this ; }
Define an access rule to a route
@param bool $accept
@param string $route
@param string|array $subjects
@return self
Define an access rule to a route