Fetches the parameters set to the current action
@param mixed $check Compare the parameters with this and return boolean.
If array, return TRUE if all values are in parameters. If not array,
return TRUE if exists in parameters
@return mixed
331994
protected function params($check = null) {
        $params = $this->view->getParams();
        if ($check) {
            if (is_array($check)) {
                $inter = array_intersect($check, $params);
                return (count($inter) === count($check));
            }
            else {
                return in_array($check, $params);
            }
        }
        return $params;
    }
312405
public function getDropCheckSQLQueries(Check $check, $table)
    {
        if (!$this->supportChecks()) {
            throw PlatformException::methodNotSupported(__METHOD__);
        }

        return array($this->getAlterTableSQLQuery($table, 'DROP CONSTRAINT', $check->getName()));
    }
324036
public function delete($condition, $check = true)
    {
        $result = null;
        $this->hook->attach('file.delete.before', $condition, $check, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        if (!is_array($condition)) {
            $condition = array('file_id' => $condition);
        }

        if ($check && isset($condition['file_id']) && !$this->canDelete($condition['file_id'])) {
            return false;
        }

        $result = (bool) $this->db->delete('file', $condition);

        if ($result && isset($condition['file_id'])) {
            $this->deleteLinked($condition['file_id']);
        }

        $this->hook->attach('file.delete.after', $condition, $check, $result, $this);
        return (bool) $result;
    }
113527
protected function action($check = null) {
        $action = Util::camelToHyphen($this->view->getAction());
        return $check ? ($check == $action) : $action;
    }
272441
private function getActionFromDynamicMatch($match)
    {
        if (array_key_exists("action", $match["params"])) {
            return $this->getActionFromParam($match["params"]["action"]);
        }

        if (array_key_exists("controller", $match["params"]) && !array_key_exists("action", $match["params"])) {
            return "index";
        }

        return "noActionMatch";
    }
814578
function hasActionParameter( $parameterName, $view = '' )
    {
        if ( $view == '' )
            $view = self::currentView();
        if ( isset( $this->ViewActionParameters[$view][$parameterName] ) )
            return true;
        $currentAction = $this->currentAction( $view );
        $http = eZHTTPTool::instance();
        if ( isset( $this->Functions[$view]['post_action_parameters'][$currentAction] ) )
        {
            $postParameters = $this->Functions[$view]['post_action_parameters'][$currentAction];
            if ( isset( $postParameters[$parameterName] ) and
                 $http->hasPostVariable( $postParameters[$parameterName] ) )
            {
                return true;
            }
        }
        if ( isset( $this->Functions[$view]['post_value_action_parameters'][$currentAction] ) )
        {
            $postParameters = $this->Functions[$view]['post_value_action_parameters'][$currentAction];
            if ( isset( $postParameters[$parameterName] ) )
            {
                $postVariables = $http->attribute( 'post' );
                $postVariableNameMatch = $postParameters[$parameterName];
                $regMatch = "/^" . $postVariableNameMatch . "_(.+)$/";
                foreach ( $postVariables as $postVariableName => $postVariableValue )
                {
                    if ( preg_match( $regMatch, $postVariableName, $matches ) )
                    {
                        $parameterValue = $matches[1];
                        $this->ViewActionParameters[$view][$parameterName] = $parameterValue;
                        return true;
                    }
                }
            }
        }
        return false;
    }
221901
private function _isActive($check) {
		// Check if the check is configured
		$test = $this->_config->getTest($check);
		$active = !empty($test);

		$active = $active && !(in_array($check, $this->_functionSuppressWarnings) || in_array($check, $this->_classSuppressWarnings) || in_array($check, $this->_interfaceSuppressWarnings) || in_array($check, $this->_fileSuppressWarnings));

		return $active;
	}
458984
public function check()
	{
		$this->checked	= TRUE;
		$this->methods	= array();
		$matches		= array();
		$content		= FS_File_Reader::load( $this->fileName );
		if( preg_match( "@class @i", $content ) )
			if( preg_match_all( "@\tfunction (& *)?([a-z][a-z0-9]+)@i", $content, $matches ) )
				foreach( $matches[2] as $match )
					$this->methods[]	= $match;
		return empty( $this->methods );
	}
1109462
public function clear($check)
    {
        $this->_auth();
        $max = xcache_count(XC_TYPE_VAR);
        for ($i = 0; $i < $max; $i++) {
            xcache_clear_cache(XC_TYPE_VAR, $i);
        }
        $this->_auth(true);

        return true;
    }
763238
public function check($uri)
    {
        $url = parse_url($uri);
        if (isset($url['query'])) {
            parse_str($url['query'], $params);
        } else {
            $params = [];
        }

        if (empty($params[$this->parameter])) {
            return false;
        }

        $hash = $params[$this->parameter];
        unset($params[$this->parameter]);

        return $this->computeHash($this->buildUrl($url, $params)) === $hash;
    }
1161440
public function getCheck($check_id) {
    $this->ensureParameters(array('check_id' => $check_id), __METHOD__);
    $data = $this->request('GET', "checks/${check_id}");
    return $data->check;
  }
805625
public static function valueExistsAll($check, array $sampleArr): bool
    {
        // 以逗号分隔的会被拆开，组成数组
        if (\is_string($check)) {
            $check = \trim($check, ', ');
            $check = \strpos($check, ',') !== false ? explode(',', $check) : [$check];
        }

        return !\array_diff((array)$check, $sampleArr);
    }
1024717
public static function check( $name, $checked = false, $attribs = array() ) {
		return self::element(
			'input', array_merge(
				array(
					'name'  => $name,
					'type'  => 'checkbox',
					'value' => 1
				),
				self::attrib( 'checked', $checked ),
				$attribs
			)
		);
	}
1126325
protected static function _check($check, $regex)
    {
        return is_string($regex) && is_scalar($check) && preg_match($regex, $check);
    }
17872
public function parameters($reset = false)
    {
        if ($reset || is_null($this->_searchParameters)) {
            $this->_searchParameters = new ParameterRegistry($this->_controller, []);
            $parameters = (array)$this->config('parameters');
            foreach ($parameters as $parameter) {
                if (!empty($parameter['name'])) {
                    $this->addParam($parameter['name'], $parameter);
                }
            }
        }

        return $this->_searchParameters;
    }
582981
public function setChecked(array $checked)
    {
        foreach ($this->checkboxes as $checkbox) {
            /* @var $checkbox Checkbox */
            $checkbox->setChecked(in_array($checkbox->getName(), $checked));
        }

        return $this;
    }
507979
public function checkParams(array $params, &$error = null)
    {
        $result = array();
        foreach ($this->paramsReq as $param) {
            if (!array_key_exists($param, $params)) {
                $error = 'required '.$param;
                return false;
            }
            $result[$param] = $params[$param];
        }
        foreach ($this->paramsDefault as $param => $default) {
            if (array_key_exists($param, $params)) {
                $result[$param] = $params[$param];
            } else {
                $result[$param] = $default;
            }
        }
        return $result;
    }