检测当前请求是否是移动设备

@return bool
350676
public function isMobile()
    {
        $pattern = '/(iPad|iPhone|Android|Mobile|Meego|Nokia|Windows Phone|Silk|KFAPWI|RIM Tablet)/isU';
        $userAgent = $this->server->get('HTTP_USER_AGENT');

        if ($userAgent && preg_match($pattern, $userAgent)) {
            return true;
        }

        return false;
    }
1046720
public function match() {
		$result = false;

		$this->matchedStatus = $this->result->getStatus();

		if ($this->result->hasHandler()) {
			$result = true;
			$this->matchedHandler = $this->result->getHandler();
		} else {
			$this->matchedHandler = $this->notFoundHandler;
		}

		return $result;
	}
671207
public function current()
	{
		if( $this->position >= $this->count() )
			return NULL;
		$keys	= array_keys( $this->pairs );
		return $this->pairs[$keys[$this->position]];
	}
780026
public function exists()
    {
        $returnValue = (bool) false;
        try{
        	$returnValue = count($this->getTypes())?true:false;
        }
        catch(Exception $e){
        	;//return false by default
        }
        return (bool) $returnValue;
    }
1038937
public function current()
    {
        return isset($this->items[$this->pos]) ? $this->items[$this->pos] : null;
    }
1310329
public function prev()
    {

        $index = $this->parent->indexOf($this) - 1;

        return isset($this->parent->children[$index]) ? $this->parent->children[$index] : null;
    }
57657
public function isTracking()
    {
        if ($this->isTracking === false) {
            return false;
        }

        if (!$this->resqueInstance->redis->exists((string)$this)) {
            $this->isTracking = false;
            return false;
        }

        $this->isTracking = true;
        return true;
    }
955776
public function isConnected(): bool
    {
        if ($this->engine) {
            $connected = $this->engine->isConnected();
            if (!$connected) {
                $this->engine = null;
            }

            return $connected;
        }

        return false;
    }
206118
public function hasPrevPost()
    {
        return ($this->prevPost && $this->prevPost->ID !== $this->get('ID')) ? true : false;
    }
1062722
public function checkExistence()
    {
        if (empty($this->primaryKey)) {
            return false;
        }

        return static::find()->pk($this->primaryKey)->count() > 0;
    }
1240592
public function current()
    {
        $k = key($this->ids);
        if (null === $k) {
            return false;
        }

        if (count($this->ids) == 1) {
            return $this;
        }

        if (!isset($this->_ich[$k])) {
            $this->_ich[$k] = new self($this->doc, array($k => $this->ids[$k]));
        }

        return $this->_ich[$k];
    }
1121903
public function isSection() {
		if ($this->isCurrent()) {
			return true;
		}
		$ancestors = $this->getAncestors();
		if (Director::get_current_page() instanceof Page) {
			$node = Director::get_current_page()->asMenuItem();
			if ($node) {
				$ancestors = $node->getAncestors();
				return $ancestors && in_array($this->ID, $node->getAncestors()->column());
			}
			
		}
		return false;
	}
1095154
public function isIndexed()
    {
        $fields = $this->getFieldsInQuery();
        foreach ($fields as $field) {
            if ( ! $this->collection->isFieldIndexed($field)) {
                return false;
            }
        }
        return true;
    }
486562
public function clear(): bool {
        $this->heap = \array_fill(0, $this->maxSize, null);
        $this->heap[0] = \PHP_INT_MIN;
        return \count($this->heap) === 1 && $this->heap[0] === \PHP_INT_MIN;
    }
1120849
public function isCorrect()
    {
        if ($this->hasCorrectResponse() === true) {
            $correctResponse = $this->getCorrectResponse();

            if ($correctResponse instanceof Comparable) {
                return $correctResponse->equals($this->getValue());
            } else {
                return $correctResponse === $this->getValue();
            }
        }

        return false;
    }
22303
public function validate()
    {
        $same = $this->getArg(0);

        return isset($this->input[$same]) && $this->input[$same] == $this->getValue();
    }
59776
public function current()
    {
        if ($this->_callback === null) {
            return parent::current();
        }

        return call_user_func_array($this->_callback, parent::current());
    }