/** * 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; }
/** * 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(); }