CakeRequest::_paramDetector PHP Method

_paramDetector() protected method

Detects if a specific request parameter is present.
protected _paramDetector ( array $detect ) : boolean
$detect array Detector options array.
return boolean Whether or not the request is the type you are checking.
    protected function _paramDetector($detect)
    {
        $key = $detect['param'];
        if (isset($detect['value'])) {
            $value = $detect['value'];
            return isset($this->params[$key]) ? $this->params[$key] == $value : false;
        }
        if (isset($detect['options'])) {
            return isset($this->params[$key]) ? in_array($this->params[$key], $detect['options']) : false;
        }
        return false;
    }