Returns defined parameters.

@param string $var The parameter to be return, if NULL, all parameters are returned

@return mixed the parameter value or NULL if unfound
175535
public function getParam($var = null)
    {
        $param = $this->_parameters;
        if (null !== $var) {
            if (isset($this->_parameters[$var])) {
                $param = $this->_parameters[$var];
            } else {
                $param = null;
            }
        }

        return $param;
    }
117892
private static function getPhpVariableAsText($var)
    {
        if (is_string($var)) {
            return('"'.str_replace(array("\x00", "\x0a", "\x0d", "\x1a", "\x09"), array('\0', '\n', '\r', '\Z', '\t'), $var).'"');
        } elseif (is_int($var) || is_float($var)) {
            return($var);
        } elseif (is_bool($var)) {
            if ($var) {
                return('true');
            } else {
                return('false');
            }
        } elseif (is_array($var)) {
            $result = 'array( ';
            $comma = '';
            foreach ($var as $key => $val) {
                $result .= $comma.self::getPhpVariableAsText($key).' => '.self::getPhpVariableAsText($val);
                $comma = ', ';
            }
            $result .= ' )';

            return($result);
        } elseif (is_object($var)) {
            return 'Object '.get_class($var);
        } elseif (is_resource($var)) {
            return 'Resource '.get_resource_type($var);
        }

        return 'Unknown type variable';
    }
578363
public static function getType($var){
        if(is_int($var)){
            return self::T_INTEGER;
        }else if(is_string($var)){
            return self::T_STRING;
        }else if(is_float($var)){
            return self::T_FLOAT;
        }else if(is_bool($var)){
            return self::T_BOOLEAN;
        }else if(is_array($var)){
            return self::T_ARRAY;
        }else if(is_object($var)){
            return self::T_OBJECT;
        }else if(is_resource($var)){
            return self::T_RESOURCE;
        }else if($var === null){
            return self::T_NULL;
        }
        
        return self::T_UNKNOWN;
    }
748828
protected function varToString($var)
    {
        if (is_object($var)) {
            return get_class($var);
        }

        if (is_array($var)) {
            return 'Array';
        }

        if (is_resource($var)) {
            return sprintf('Resource(%s)', get_resource_type($var));
        }

        if (null === $var) {
            return 'null';
        }

        if (false === $var) {
            return 'false';
        }

        if (true === $var) {
            return 'true';
        }

        return (string) gettype($var);
    }
1255700
public static function getAsString($var)
    {
        if ($var instanceof Exception) {
            return (string)$var;
        } elseif (is_object($var)) {
            return self::getObjectAsString($var);
        } elseif (is_array($var)) {
            return print_r($var, true);
        } elseif (is_resource($var)) {
            return (string)sprintf('resource(type=%s)', get_resource_type($var));
        } elseif (true === $var) {
            return 'true';
        } elseif (false === $var) {
            return 'false';
        } elseif (null === $var) {
            return 'null';
        }

        return (string)$var;
    }
679028
public function setParameters($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->parameters = $arr;

        return $this;
    }
976887
public function extension($var = null)
    {
        if ($var !== null) {
            $this->extension = $var;
        }
        if (empty($this->extension)) {
            $this->extension = '.' . pathinfo($this->name(), PATHINFO_EXTENSION);
        }

        return $this->extension;
    }
294600
public function getParametersAsVars( $vars = array() )
	{
		foreach ( $this->parameters as $qname => $parameter )
		{
			$vars[ $qname ] = $parameter->result;
		}

		return $vars;
	}
33722
public function getParameters() {
		$filledvars = array();
		foreach (get_object_vars($this) as $name => $value) {
			if ($value) {
				$filledvars[$name] = (string)$value;
			}
		}

		return $filledvars;
	}
358015
protected function decode($var)
    {
        $lines = (array) preg_split('#(\r\n|\n|\r)#', $var);

        $results = array();
        foreach ($lines as $line) {
            preg_match('#^\[(.*)\] (.*)  @  (.*)  @@  (.*)$#', $line, $matches);
            if ($matches) {
                $results[] = ['date' => $matches[1], 'message' => $matches[2], 'url' => $matches[3], 'file' => $matches[4]];
            }
        }

        return $results;
    }
274596
public static function toPhp($var)
    {
        switch (gettype($var)) {
            case 'array':
                $skipKeys = (range(0, count($var) - 1) === array_keys($var));
                $ret = 'array(';
                $i = 0;
                foreach ($var as $key => $value) {
                    if ($i++ > 0) {
                        $ret .= ', ';
                    }
                    if (!$skipKeys) {
                        $ret .= self::toPhp($key) . ' => ';
                    }
                    $ret .= self::toPhp($value);
                }
                $ret .= ')';
                break;
            default:
                $ret = var_export($var, true);
        }
        return $ret;
    }
281586
public function path($var = null)
    {
        if ($var !== null) {
            // Folder of the page.
            $this->folder = basename($var);
            // Path to the page.
            $this->path = dirname($var);
        }

        return $this->path ? $this->path . '/' . $this->folder : null;
    }
462841
public static function filterAll(&$var)
    {
        if (is_array($var)) {
            foreach ($var as &$v) {
                self::filterAll($v);
            }
        } else {
            $var = addslashes($var);
            $var = self::filterStr($var);
            $var = self::filterSql($var);
        }
        return $var;
    }
1003533
public function quote($var)
    {
        if(is_null($var) || strtoupper($var) == 'NULL')
            return 'NULL';

        if ($var instanceof Date)
            $var = $this->DateFactory->toStorageDate($var)->toMySQLDate();

        return $this->getConnection()->quote($var);
    }
1027753
public function get($var)
    {
        $node = $this->mainNode->getByKey($var);
        if (empty($node)) return null;

        return $node->getData();
    }
1192235
static public function getType ($var) {
		switch (true) {
			case is_bool($var):
				return self::TYPE_BOOL;
			case is_float($var):
				return self::TYPE_FLOAT;
			case is_int($var):
				return self::TYPE_INT;
			case is_string($var):
				return self::TYPE_STRING;
			case is_array($var):
				return self::TYPE_COLLECTION;
			default:
				throw new \Exception("Invalid type of var");
		}
	}
336467
public function urlToFormParameters($url)
    {
        $query = parse_url($url, PHP_URL_QUERY);
        $vars = array();
        parse_str($query, $vars);
        return $this->valuesToFormParameters($vars, null);
    }