private function addAsset (Asset $asset) : Asset
    {
        $storage = $this->locator->get(AssetStorage::class);
        $cache = $this->locator->get(AssetsCache::class);

        $asset = $storage->import($asset);
        $cache->add($asset);

        return $asset;
    }
private function addAsset (Asset $asset) : Asset
    {
        $storage = $this->locator->get(AssetStorage::class);
        $cache = $this->locator->get(AssetsCache::class);

        $asset = $storage->import($asset);
        $cache->add($asset);

        return $asset;
    }
private function addAsset ( Asset $ asset ) : Asset { $ storage = $ this -> locator -> get ( AssetStorage :: class ) ; $ cache = $ this -> locator -> get ( AssetsCache :: class ) ; $ asset = $ storage -> import ( $ asset ) ; $ cache -> add ( $ asset ) ; return $ asset ; }
Adds an asset to the registry

@param string $assetPath
@return Asset
@throws AssetsException
Adds an asset to the registry