hiqdev\assetpackagist\registry\RegistryFactory::getRegistry PHP Метод

getRegistry() публичный статический Метод

public static getRegistry ( string $type, Composer\Repository\RepositoryManager $rm ) : Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository | BowerRegistry | NpmRegistry
$type string
$rm Composer\Repository\RepositoryManager
Результат Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository | BowerRegistry | NpmRegistry
    public static function getRegistry($type, $rm)
    {
        if (!isset(static::$registries[$type])) {
            static::$registries[$type] = static::buildRegistry($type, $rm);
        }
        return static::$registries[$type];
    }

Usage Example

Пример #1
0
 public function getRegistry()
 {
     if ($this->_registry === null) {
         $this->_registry = RegistryFactory::getRegistry($this->getType(), $this->getComposer()->getRepositoryManager());
     }
     return $this->_registry;
 }