protected function getMockPackagePath(PackageInterface $package, $assetDir, $filename)
    {
        $packageName = AssetUtil::getName($package);
        $packagePath = rtrim($assetDir, '/').'/'.$package->getName();
        $newFilename = $packagePath.'/'.basename($filename);
        mkdir($packagePath, 0777, true);
        copy($filename, $newFilename);

        $jsonFile = new JsonFile($newFilename);
        $packageValue = AssetUtil::formatPackage($package, $packageName, (array) $jsonFile->read());

        $jsonFile->write($packageValue);

        return array($packageName, $this->fs->findShortestPath(getcwd(), $newFilename));
    }
protected function getMockPackagePath(PackageInterface $package, $assetDir, $filename)
    {
        $packageName = AssetUtil::getName($package);
        $packagePath = rtrim($assetDir, '/').'/'.$package->getName();
        $newFilename = $packagePath.'/'.basename($filename);
        mkdir($packagePath, 0777, true);
        copy($filename, $newFilename);

        $jsonFile = new JsonFile($newFilename);
        $packageValue = AssetUtil::formatPackage($package, $packageName, (array) $jsonFile->read());

        $jsonFile->write($packageValue);

        return array($packageName, $this->fs->findShortestPath(getcwd(), $newFilename));
    }
protected function getMockPackagePath ( PackageInterface $ package , $ assetDir , $ filename ) { $ packageName = AssetUtil :: getName ( $ package ) ; $ packagePath = rtrim ( $ assetDir , '/' ) . '/' . $ package -> getName ( ) ; $ newFilename = $ packagePath . '/' . basename ( $ filename ) ; mkdir ( $ packagePath , 0777 , true ) ; copy ( $ filename , $ newFilename ) ; $ jsonFile = new JsonFile ( $ newFilename ) ; $ packageValue = AssetUtil :: formatPackage ( $ package , $ packageName , ( array ) $ jsonFile -> read ( ) ) ; $ jsonFile -> write ( $ packageValue ) ; return array ( $ packageName , $ this -> fs -> findShortestPath ( getcwd ( ) , $ newFilename ) ) ; }
Get the path of the mock package.

@param PackageInterface $package  The package dependency
@param string           $assetDir The asset directory
@param string           $filename The filename of asset package

@return string[] The package name and the relative package path from the current directory
Get the path of the mock package .