@param string $param

@return bool|int|null|string
332567
protected function injectVars($param)
    {
        if (!is_string($param) || !preg_match_all('/\{([^\}\{]+)\}/', $param, $matches)) {
            return $this->getCorrectType($param);
        }

        foreach ($matches[1] as $index => $match) {
            $key = $this->prepareVarName($match);

            if (!isset($this->vars[$key])) {
                continue;
            }

            $param = str_replace(sprintf('{%s}', $match), $this->vars[$key], $param);
        }

        return $this->getCorrectType($param);
    }
127387
protected static function getValue($param)
    {
        $data = explode(':', $param);

        $result = ['rule' => trim($data[0])];

        $result['value'] = count($data) > 1 ? $data[1] : null;

        return $result;
    }
195616
protected static function compilePaging($param)
    {
        $parameters = self::parseParameters($param);
        $result = '';
        if (!empty($parameters['template']))
            $result .= "\$this->pagination->setTemplate(\$this->render('{$parameters['template']}'));\n?>";
        $link = 'null';
        if (!empty($parameters['link'])) {
            if ('$' != $parameters['link']{0})
                $parameters['link'] = '\'' . $parameters['link'] . '\'';
            $link = $parameters['link'];
        }
        $page = !empty($parameters['page']) ? $parameters['page'] : 'null';
        $total = !empty($parameters['total']) ? $parameters['total'] : 'null';
        $size = !empty($parameters['size']) ? $parameters['size'] : 'null';
        $result .= "<?php echo \$this->pagination->render({$link}, {$page}, {$total}, {$size});\n?>";

        return $result;
    }
697894
public function route( $param = null ) {
		$route = call_user_func( $this->get_route_resolver() );

		if ( is_null( $route ) || is_null( $param ) ) {
			return $route;
		}

		return array_key_exists( $param, $route[2] ) ? $route[2][ $param ] : null;
	}
644652
public function getParam(string $param)
    {
        $result = $this->getConfig()->get($param);
        return $result ?? null;
    }
1171288
public function getParam($param)
    {
        if (isset($this->_parentConfig))
            return ($this->_parentConfig->getParam($param));
        return (isset($this->_params[$param]) ? $this->_params[$param] : null);
    }
1273020
public static function getParameter($param)
    {
        $lexer = new Lexer('(' . $param . ')');

        // A dummy parser is used for error reporting.
        $param = ParameterDefinition::parse(new Parser(), $lexer->list);

        if (empty($param[0])) {
            return [
                '',
                '',
                '',
                '',
                '',
            ];
        }

        $param = $param[0];

        $options = [];
        foreach ($param->type->options->options as $opt) {
            $options[] = is_string($opt) ? $opt : $opt['value'];
        }

        return [
            empty($param->inOut) ? '' : $param->inOut,
            $param->name,
            $param->type->name,
            implode(',', $param->type->parameters),
            implode(' ', $options),
        ];
    }
722297
protected static function __getType($param)
    {
        $type = is_object($param)
            ? get_class($param)
            : gettype($param);

        return $type === 'integer' ? 'int' : $type;
    }
234435
public static function find($param = null)
    {
        $data = X::app()->db->table(self::tableName())->find($param);
        if (empty($data)) return false;
        return new static($data,false);
    }
1193909
public static function getDefaultValue($param = null)
    {
        $result = null;

        if (empty($param)) {
            return static::$defaults;
        }

        if (isset(static::$defaults[$param])) {
            $result = static::$defaults[$param];
        }

        return $result;
    }
496311
public function getArg($num)
    {
        return isset($this->args[$num]) ? $this->args[$num] : null;
    }
295723
public function setParam($param)
	{
		if(null===$param)
		{
			$this->param=$_GET;
		}
		else 
		{
			$this->param=$param;
		}
		$this->parseParam();
	}
359539
protected function getParamDefaultLocal($param)
    {
        $param = $this->getParameter($param);
        if (!is_null($param))
            return $param;

        return $this->getLocal($param);
    }
252448
public function getParam($param)
    {
        $value = $this->getGravParam($param);
        if ($value === null) {
            $value = $this->getQueryParam($param);
        }

        return $value;
    }
432681
public function get($param) {
        global $CFG, $USER;
        $this->cleanup($this->ttl);
        $filename = 'u'.$USER->id.'_'.md5(serialize($param));
        if(file_exists($this->dir.$filename)) {
            $lasttime = filemtime($this->dir.$filename);
            if (time()-$lasttime > $this->ttl) {
                return false;
            } else {
                $fp = fopen($this->dir.$filename, 'r');
                $size = filesize($this->dir.$filename);
                $content = fread($fp, $size);
                return unserialize($content);
            }
        }
        return false;
    }
1022503
public function parameterTypeCheck($param, string $type = 'string'): bool
    {
        $type = 'is_'.$type;

        return (bool) ($type($param) && ! empty($param));
    }
1051436
public static function title($param = null)
    {

        if (is_integer($param)) {
            $param = array(
                'amount' => $param
            );
        }

        if (!is_array($param)) {
            $param = array();
        }

        $defParam = array(
            'amount' => 30,
            'what' => 'bytes',
            'start' => 'yes',
            'lang' => 'en'
        );

        $param = array_merge($defParam, $param);

        $json = Utils::getJSON('http://json-lipsum.appspot.com/?' . http_build_query($param));

        if (isset($json->lipsum)) {
            return $json->lipsum;
        } else {
            return 'Error Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
        }

    }