protected function initParentURLPrefix($path)
    {
        // Detect segment between web root directory and assets root
        $path = Convert::slashes($path, '/');
        $basePath = Convert::slashes(Director::publicFolder(), '/');
        if (stripos($path, $basePath) === 0) {
            $prefix = substr($path, strlen($basePath));
        } else {
            $prefix = ASSETS_DIR;
        }
        $this->parentUrlPrefix = ltrim($prefix, '/');
    }
protected function initParentURLPrefix($path)
    {
        // Detect segment between web root directory and assets root
        $path = Convert::slashes($path, '/');
        $basePath = Convert::slashes(Director::publicFolder(), '/');
        if (stripos($path, $basePath) === 0) {
            $prefix = substr($path, strlen($basePath));
        } else {
            $prefix = ASSETS_DIR;
        }
        $this->parentUrlPrefix = ltrim($prefix, '/');
    }
protected function initParentURLPrefix ( $ path ) { // Detect segment between web root directory and assets root $ path = Convert :: slashes ( $ path , '/' ) ; $ basePath = Convert :: slashes ( Director :: publicFolder ( ) , '/' ) ; if ( stripos ( $ path , $ basePath ) === 0 ) { $ prefix = substr ( $ path , strlen ( $ basePath ) ) ; } else { $ prefix = ASSETS_DIR ; } $ this -> parentUrlPrefix = ltrim ( $ prefix , '/' ) ; }
Initialise parent URL prefix

@param string $path base path
Initialise parent URL prefix