lib/ezutils/classes/ezuri.php
public function setURIString( $uri, $fullInitialize = true )
    {
        if ( strlen( $uri ) > 0 and
             $uri[0] == '/' )
            $uri = substr( $uri, 1 );

        $uri = eZURI::decodeIRI( $uri );

        $this->URI = $uri;
        $this->URIArray = explode( '/', $uri );
        $this->Index = 0;

        if ( !$fullInitialize )
            return;

        $this->OriginalURI = $uri;
        $this->UserArray = array();

        unset( $paramName, $paramValue );
        foreach ( array_keys( $this->URIArray ) as $key )
        {
            if ( !isset( $this->URIArray[$key] ) )
                continue;

            if ( preg_match( "/^[\(][a-zA-Z0-9_]+[\)]/", $this->URIArray[$key] ) )
            {
                if ( isset( $paramName, $paramValue ) )
                {
                    $this->UserArray[ $paramName ] = $paramValue;
                    unset( $paramName, $paramValue );
                }
                $paramName = substr( $this->URIArray[$key], 1, strlen( $this->URIArray[$key] ) - 2 );
                if ( isset( $this->URIArray[$key+1] ) )
                {
                    $this->UserArray[ $paramName ] = $this->URIArray[$key+1];
                    unset( $this->URIArray[$key+1] );
                }
                else
                    $this->UserArray[ $paramName ] = "";
                unset( $this->URIArray[$key] );
            }
            else if ( isset( $paramName ) )
            {
                $this->UserArray[ $paramName ] .= '/' . $this->URIArray[$key];
                unset( $this->URIArray[$key] );
            }
        }

        // Remake the URI without any user parameters
        $this->URI = implode( '/', $this->URIArray );

        if ( eZINI::instance( 'template.ini' )->variable( 'ControlSettings', 'AllowUserVariables' ) == 'false' )
        {
            $this->UserArray = array();
        }
        // Convert filter string to current locale
        $this->convertFilterString();
    }
public function setURIString( $uri, $fullInitialize = true )
    {
        if ( strlen( $uri ) > 0 and
             $uri[0] == '/' )
            $uri = substr( $uri, 1 );

        $uri = eZURI::decodeIRI( $uri );

        $this->URI = $uri;
        $this->URIArray = explode( '/', $uri );
        $this->Index = 0;

        if ( !$fullInitialize )
            return;

        $this->OriginalURI = $uri;
        $this->UserArray = array();

        unset( $paramName, $paramValue );
        foreach ( array_keys( $this->URIArray ) as $key )
        {
            if ( !isset( $this->URIArray[$key] ) )
                continue;

            if ( preg_match( "/^[\(][a-zA-Z0-9_]+[\)]/", $this->URIArray[$key] ) )
            {
                if ( isset( $paramName, $paramValue ) )
                {
                    $this->UserArray[ $paramName ] = $paramValue;
                    unset( $paramName, $paramValue );
                }
                $paramName = substr( $this->URIArray[$key], 1, strlen( $this->URIArray[$key] ) - 2 );
                if ( isset( $this->URIArray[$key+1] ) )
                {
                    $this->UserArray[ $paramName ] = $this->URIArray[$key+1];
                    unset( $this->URIArray[$key+1] );
                }
                else
                    $this->UserArray[ $paramName ] = "";
                unset( $this->URIArray[$key] );
            }
            else if ( isset( $paramName ) )
            {
                $this->UserArray[ $paramName ] .= '/' . $this->URIArray[$key];
                unset( $this->URIArray[$key] );
            }
        }

        // Remake the URI without any user parameters
        $this->URI = implode( '/', $this->URIArray );

        if ( eZINI::instance( 'template.ini' )->variable( 'ControlSettings', 'AllowUserVariables' ) == 'false' )
        {
            $this->UserArray = array();
        }
        // Convert filter string to current locale
        $this->convertFilterString();
    }
public function setURIString ( $ uri , $ fullInitialize = true ) { if ( strlen ( $ uri ) > 0 and $ uri [ 0 ] == '/' ) $ uri = substr ( $ uri , 1 ) ; $ uri = eZURI :: decodeIRI ( $ uri ) ; $ this -> URI = $ uri ; $ this -> URIArray = explode ( '/' , $ uri ) ; $ this -> Index = 0 ; if ( ! $ fullInitialize ) return ; $ this -> OriginalURI = $ uri ; $ this -> UserArray = array ( ) ; unset ( $ paramName , $ paramValue ) ; foreach ( array_keys ( $ this -> URIArray ) as $ key ) { if ( ! isset ( $ this -> URIArray [ $ key ] ) ) continue ; if ( preg_match ( "/^[\(][a-zA-Z0-9_]+[\)]/" , $ this -> URIArray [ $ key ] ) ) { if ( isset ( $ paramName , $ paramValue ) ) { $ this -> UserArray [ $ paramName ] = $ paramValue ; unset ( $ paramName , $ paramValue ) ; } $ paramName = substr ( $ this -> URIArray [ $ key ] , 1 , strlen ( $ this -> URIArray [ $ key ] ) - 2 ) ; if ( isset ( $ this -> URIArray [ $ key + 1 ] ) ) { $ this -> UserArray [ $ paramName ] = $ this -> URIArray [ $ key + 1 ] ; unset ( $ this -> URIArray [ $ key + 1 ] ) ; } else $ this -> UserArray [ $ paramName ] = "" ; unset ( $ this -> URIArray [ $ key ] ) ; } else if ( isset ( $ paramName ) ) { $ this -> UserArray [ $ paramName ] .= '/' . $ this -> URIArray [ $ key ] ; unset ( $ this -> URIArray [ $ key ] ) ; } } // Remake the URI without any user parameters $ this -> URI = implode ( '/' , $ this -> URIArray ) ; if ( eZINI :: instance ( 'template.ini' ) -> variable ( 'ControlSettings' , 'AllowUserVariables' ) == 'false' ) { $ this -> UserArray = array ( ) ; } // Convert filter string to current locale $ this -> convertFilterString ( ) ; }
Sets uri string for instance

Sets the current URI string to $uri, the URI is then split into array elements
and index reset to 1.

@param string $uri
@param boolean $fullInitialize
@return void
Sets uri string for instance