Horde_Browser::isRobot PHP 메소드

isRobot() 공개 메소드

Is the browser a robot?
public isRobot ( ) : boolean
리턴 boolean True if browser is a known robot.
    public function isRobot()
    {
        if (preg_match('/bot/i', $this->_agent)) {
            return true;
        }
        if (is_null($this->_robotAgentRegexp)) {
            $regex = array();
            foreach ($this->_robotAgents as $r) {
                $regex[] = preg_quote($r, '/');
            }
            $this->_robotAgentRegexp = '/' . implode('|', $regex) . '/';
        }
        return (bool) preg_match($this->_robotAgentRegexp, $this->_agent);
    }