protected function parsePath($path = null)
    {
        $this->dirname   = '';
        $this->basename  = '';
        $this->extension = '';
        $this->filename  = '';

        if (empty($path)) {
            return $this;
        }

        $parts = pathinfo($path);

        if (isset($parts['dirname'])) {
            $this->dirname = rtrim($parts['dirname'], '/');
        }

        if (isset($parts['basename'])) {
            $this->basename = $parts['basename'];
        }

        if (isset($parts['extension'])) {
            $this->extension = $parts['extension'];
        }

        if (isset($parts['filename'])) {
            $this->filename = $parts['filename'];
        }

        return $this;
    }
protected function parsePath($path = null)
    {
        $this->dirname   = '';
        $this->basename  = '';
        $this->extension = '';
        $this->filename  = '';

        if (empty($path)) {
            return $this;
        }

        $parts = pathinfo($path);

        if (isset($parts['dirname'])) {
            $this->dirname = rtrim($parts['dirname'], '/');
        }

        if (isset($parts['basename'])) {
            $this->basename = $parts['basename'];
        }

        if (isset($parts['extension'])) {
            $this->extension = $parts['extension'];
        }

        if (isset($parts['filename'])) {
            $this->filename = $parts['filename'];
        }

        return $this;
    }
protected function parsePath ( $ path = null ) { $ this -> dirname = '' ; $ this -> basename = '' ; $ this -> extension = '' ; $ this -> filename = '' ; if ( empty ( $ path ) ) { return $ this ; } $ parts = pathinfo ( $ path ) ; if ( isset ( $ parts [ 'dirname' ] ) ) { $ this -> dirname = rtrim ( $ parts [ 'dirname' ] , '/' ) ; } if ( isset ( $ parts [ 'basename' ] ) ) { $ this -> basename = $ parts [ 'basename' ] ; } if ( isset ( $ parts [ 'extension' ] ) ) { $ this -> extension = $ parts [ 'extension' ] ; } if ( isset ( $ parts [ 'filename' ] ) ) { $ this -> filename = $ parts [ 'filename' ] ; } return $ this ; }
Extract the path components from the current path

@param string $path

@return Uri
Extract the path components from the current path