Exemplo n.º 1
0
 public function registerAsset(Asset $asset)
 {
     // we have to check and see if the asset already exists.
     // If it exists, we only replace it if our current asset has a later version
     $doRegister = true;
     if (isset($this->assets[$asset->getAssetType()][$asset->getAssetHandle()])) {
         $existingAsset = $this->assets[$asset->getAssetType()][$asset->getAssetHandle()];
         if (version_compare($existingAsset->getAssetVersion(), $asset->getAssetVersion(), '>')) {
             $doRegister = false;
         }
     }
     if ($doRegister) {
         $this->assets[$asset->getAssetType()][$asset->getAssetHandle()] = $asset;
     }
 }
Exemplo n.º 2
0
 /**
  * @return string
  */
 public function getAssetHandle()
 {
     return parent::getAssetHandle();
 }