public function installPackage($package)
    {
        // We read its composer file
        $jsonData = $this->getPackageJsonFile($package);
        // We get the package assets dirs
        $packagesAssetsDir = $this->getPackageAssetsDirs($jsonData);
        if (!is_null($packagesAssetsDir)) {
            $this->log($package->getTarget(), self::LOG_INFO, self::CODE_INSTALLING_PACKAGE);
            $this->packagesStatuses[$package->getTarget()]['extra'] = 1;
            foreach ($packagesAssetsDir as $namespace => $packageAssetsDir) {
                if (!isset($this->packagesStatuses[$package->getTarget()]['dirs'])) {
                    $this->packagesStatuses[$package->getTarget()]['dirs'] = array();
                }
                $this->packagesStatuses[$package->getTarget()]['dirs'][$namespace] = null;
                // We install each package directory
                $this->installPackageDir($package, $namespace, $packageAssetsDir);
            }
        } else {
            $this->log($package->getTarget(), self::LOG_INFO, self::CODE_NO_INSTALL);
            $this->packagesStatuses[$package->getTarget()]['extra'] = 0;
        }
    }
public function installPackage($package)
    {
        // We read its composer file
        $jsonData = $this->getPackageJsonFile($package);
        // We get the package assets dirs
        $packagesAssetsDir = $this->getPackageAssetsDirs($jsonData);
        if (!is_null($packagesAssetsDir)) {
            $this->log($package->getTarget(), self::LOG_INFO, self::CODE_INSTALLING_PACKAGE);
            $this->packagesStatuses[$package->getTarget()]['extra'] = 1;
            foreach ($packagesAssetsDir as $namespace => $packageAssetsDir) {
                if (!isset($this->packagesStatuses[$package->getTarget()]['dirs'])) {
                    $this->packagesStatuses[$package->getTarget()]['dirs'] = array();
                }
                $this->packagesStatuses[$package->getTarget()]['dirs'][$namespace] = null;
                // We install each package directory
                $this->installPackageDir($package, $namespace, $packageAssetsDir);
            }
        } else {
            $this->log($package->getTarget(), self::LOG_INFO, self::CODE_NO_INSTALL);
            $this->packagesStatuses[$package->getTarget()]['extra'] = 0;
        }
    }
public function installPackage ( $ package ) { // We read its composer file $ jsonData = $ this -> getPackageJsonFile ( $ package ) ; // We get the package assets dirs $ packagesAssetsDir = $ this -> getPackageAssetsDirs ( $ jsonData ) ; if ( ! is_null ( $ packagesAssetsDir ) ) { $ this -> log ( $ package -> getTarget ( ) , self :: LOG_INFO , self :: CODE_INSTALLING_PACKAGE ) ; $ this -> packagesStatuses [ $ package -> getTarget ( ) ] [ 'extra' ] = 1 ; foreach ( $ packagesAssetsDir as $ namespace => $ packageAssetsDir ) { if ( ! isset ( $ this -> packagesStatuses [ $ package -> getTarget ( ) ] [ 'dirs' ] ) ) { $ this -> packagesStatuses [ $ package -> getTarget ( ) ] [ 'dirs' ] = array ( ) ; } $ this -> packagesStatuses [ $ package -> getTarget ( ) ] [ 'dirs' ] [ $ namespace ] = null ; // We install each package directory $ this -> installPackageDir ( $ package , $ namespace , $ packageAssetsDir ) ; } } else { $ this -> log ( $ package -> getTarget ( ) , self :: LOG_INFO , self :: CODE_NO_INSTALL ) ; $ this -> packagesStatuses [ $ package -> getTarget ( ) ] [ 'extra' ] = 0 ; } }
Installs all the assets directories of the given package
@param Package\Link $package
Installs all the assets directories of the given package