src/Template/Extension/URI.php
public function runUri($var1 = null, $var2 = null, $var3 = null, $var4 = null)
    {
        if (null === $var1) {
            return $this->uri;
        }

        if (\is_numeric($var1) && null === $var2) {
            return $this->parts[$var1] ?? null;
        }

        if (\is_numeric($var1) && \is_string($var2)) {
            return $this->checkUriSegmentMatch($var1, $var2, $var3, $var4);
        }

        if (\is_string($var1)) {
            return $this->checkUriRegexMatch($var1, $var2, $var3);
        }

        throw new \LogicException('Invalid use of the uri function.');
    }
public function runUri($var1 = null, $var2 = null, $var3 = null, $var4 = null)
    {
        if (null === $var1) {
            return $this->uri;
        }

        if (\is_numeric($var1) && null === $var2) {
            return $this->parts[$var1] ?? null;
        }

        if (\is_numeric($var1) && \is_string($var2)) {
            return $this->checkUriSegmentMatch($var1, $var2, $var3, $var4);
        }

        if (\is_string($var1)) {
            return $this->checkUriRegexMatch($var1, $var2, $var3);
        }

        throw new \LogicException('Invalid use of the uri function.');
    }
public function runUri ( $ var1 = null , $ var2 = null , $ var3 = null , $ var4 = null ) { if ( null === $ var1 ) { return $ this -> uri ; } if ( \ is_numeric ( $ var1 ) && null === $ var2 ) { return $ this -> parts [ $ var1 ] ?? null ; } if ( \ is_numeric ( $ var1 ) && \ is_string ( $ var2 ) ) { return $ this -> checkUriSegmentMatch ( $ var1 , $ var2 , $ var3 , $ var4 ) ; } if ( \ is_string ( $ var1 ) ) { return $ this -> checkUriRegexMatch ( $ var1 , $ var2 , $ var3 ) ; } throw new \ LogicException ( 'Invalid use of the uri function.' ) ; }
Perform URI check.
@param  null|int|string $var1
@param  mixed               $var2
@param  mixed               $var3
@param  mixed               $var4
@return mixed
Perform URI check .