예제 #1
0
 /**
  * Set the collection's assets
  *
  * @param array $assets
  */
 public function setAssets(array $assets = array())
 {
     $items = array();
     foreach ($assets as $key => $value) {
         $asset = new Asset($value);
         $items[$asset->getExtension()][] = $asset;
     }
     $this->items = $items;
 }
예제 #2
0
 /**
  * Get the path of an asset
  *
  * @param Asset $asset
  *
  * @return string
  */
 protected function getPath(Asset $asset)
 {
     return $this->app['env'] == 'local' ? $asset->getRealpath() : $asset->getMinifiedPath();
 }