public function getRules($userAgent = null)
    {
        // return all rules
        if ($userAgent === null) {
            return $this->rules;
        }
        $this->setUserAgent($userAgent);
        if (isset($this->rules[$this->userAgentMatch])) {
            return $this->rules[$this->userAgentMatch];
        }
        $this->log[] = 'Rules not found for the given User-Agent';
        return array();
    }
public function getRules($userAgent = null)
    {
        // return all rules
        if ($userAgent === null) {
            return $this->rules;
        }
        $this->setUserAgent($userAgent);
        if (isset($this->rules[$this->userAgentMatch])) {
            return $this->rules[$this->userAgentMatch];
        }
        $this->log[] = 'Rules not found for the given User-Agent';
        return array();
    }
public function getRules ( $ userAgent = null ) { // return all rules if ( $ userAgent === null ) { return $ this -> rules ; } $ this -> setUserAgent ( $ userAgent ) ; if ( isset ( $ this -> rules [ $ this -> userAgentMatch ] ) ) { return $ this -> rules [ $ this -> userAgentMatch ] ; } $ this -> log [ ] = 'Rules not found for the given User-Agent' ; return array ( ) ; }
Get rules based on user agent

@param  string|null $userAgent
@return array
Get rules based on user agent