lib/ServiceDescriptionLoader.php
protected function getNestPath($path, $base)
    {
        $ds = preg_quote(DIRECTORY_SEPARATOR, '#');

        return preg_replace(
            // patterns to remove
            array(
                // strip the leading path (make it relative to the
                // root of the service description)
                '#^' . preg_quote($base, '#') . $ds . '#',

                // Ignore trailing __index.foo
                '#^(.*?)(:?' . $ds . '?__index)?\\.(:?\\w+)$#',

                // Remove path components ending with .group
                '#\\w+\\.group(' . $ds . '|$)#',

                // Remove any trailing slash
                '#' . $ds . '+$#',

                // Translate any remaining backslash delimiters (Windows)
                '#\\\\#'
            ),
            // replacements (corresponding with patterns above)
            array(
                '',
                '\\1',
                '',
                '',
                '/'
            ),
            $path
        );
    }
protected function getNestPath($path, $base)
    {
        $ds = preg_quote(DIRECTORY_SEPARATOR, '#');

        return preg_replace(
            // patterns to remove
            array(
                // strip the leading path (make it relative to the
                // root of the service description)
                '#^' . preg_quote($base, '#') . $ds . '#',

                // Ignore trailing __index.foo
                '#^(.*?)(:?' . $ds . '?__index)?\\.(:?\\w+)$#',

                // Remove path components ending with .group
                '#\\w+\\.group(' . $ds . '|$)#',

                // Remove any trailing slash
                '#' . $ds . '+$#',

                // Translate any remaining backslash delimiters (Windows)
                '#\\\\#'
            ),
            // replacements (corresponding with patterns above)
            array(
                '',
                '\\1',
                '',
                '',
                '/'
            ),
            $path
        );
    }
protected function getNestPath ( $ path , $ base ) { $ ds = preg_quote ( DIRECTORY_SEPARATOR , '#' ) ; return preg_replace ( // patterns to remove array ( // strip the leading path (make it relative to the // root of the service description) '#^' . preg_quote ( $ base , '#' ) . $ ds . '#' , // Ignore trailing __index.foo '#^(.*?)(:?' . $ ds . '?__index)?\\.(:?\\w+)$#' , // Remove path components ending with .group '#\\w+\\.group(' . $ ds . '|$)#' , // Remove any trailing slash '#' . $ ds . '+$#' , // Translate any remaining backslash delimiters (Windows) '#\\\\#' ) , // replacements (corresponding with patterns above) array ( '' , '\\1' , '' , '' , '/' ) , $ path ) ; }
Determines the path to nest content for a file's path name

@param string $path The absolute path to the file
@param string $base The absolute path to the base directory of
the service description this file belongs to

@return string
Determines the path to nest content for a file s path name