public function parsePath($streamUrl)
    {
        // normalize directory separators
        $path   = str_replace(array('\\', '/'), '/', $streamUrl);
        //fix path if fragment has been munged into the path (e.g. when using the RecursiveIterator)
        $path   = preg_replace('~^(.+?)(#[^/]+)(.*)$~', '$1$3$2', $path);

        /// fix /// paths to __global__ "host"
        $protocol   = $this->protocol;
        if (strpos($path, $protocol.':///') === 0) {
            $path   = str_replace($protocol.':///', $protocol.'://'.PathInformationInterface::GLOBAL_PATH_HOST.'/', $path);
        }

        $info   = parse_url($path);
        if ($info === false) {
            throw new \InvalidArgumentException('Url "'.$streamUrl.'" is not a valid path');
        }
        if (isset($info['path']) && preg_match('~^/\w:.+~', $info['path'])) {
            $info['path']   = ltrim($info['path'], '/');
        } else if (!isset( $info['path'])) {
             $info['path']  = '/';
        }
        return $info;
    }
public function parsePath($streamUrl)
    {
        // normalize directory separators
        $path   = str_replace(array('\\', '/'), '/', $streamUrl);
        //fix path if fragment has been munged into the path (e.g. when using the RecursiveIterator)
        $path   = preg_replace('~^(.+?)(#[^/]+)(.*)$~', '$1$3$2', $path);

        /// fix /// paths to __global__ "host"
        $protocol   = $this->protocol;
        if (strpos($path, $protocol.':///') === 0) {
            $path   = str_replace($protocol.':///', $protocol.'://'.PathInformationInterface::GLOBAL_PATH_HOST.'/', $path);
        }

        $info   = parse_url($path);
        if ($info === false) {
            throw new \InvalidArgumentException('Url "'.$streamUrl.'" is not a valid path');
        }
        if (isset($info['path']) && preg_match('~^/\w:.+~', $info['path'])) {
            $info['path']   = ltrim($info['path'], '/');
        } else if (!isset( $info['path'])) {
             $info['path']  = '/';
        }
        return $info;
    }
public function parsePath ( $ streamUrl ) { // normalize directory separators $ path = str_replace ( array ( '\\' , '/' ) , '/' , $ streamUrl ) ; //fix path if fragment has been munged into the path (e.g. when using the RecursiveIterator) $ path = preg_replace ( '~^(.+?)(#[^/]+)(.*)$~' , '$1$3$2' , $ path ) ; /// fix /// paths to __global__ "host" $ protocol = $ this -> protocol ; if ( strpos ( $ path , $ protocol . ':///' ) === 0 ) { $ path = str_replace ( $ protocol . ':///' , $ protocol . '://' . PathInformationInterface :: GLOBAL_PATH_HOST . '/' , $ path ) ; } $ info = parse_url ( $ path ) ; if ( $ info === false ) { throw new \ InvalidArgumentException ( 'Url "' . $ streamUrl . '" is not a valid path' ) ; } if ( isset ( $ info [ 'path' ] ) && preg_match ( '~^/\w:.+~' , $ info [ 'path' ] ) ) { $ info [ 'path' ] = ltrim ( $ info [ 'path' ] , '/' ) ; } else if ( ! isset ( $ info [ 'path' ] ) ) { $ info [ 'path' ] = '/' ; } return $ info ; }
Returns path information for a given stream path

@param   string      $streamUrl      The URL given to the stream function
@return  array                       An array containing information about the path
@throws \InvalidArgumentException    If the URL is invalid
Returns path information for a given stream path