/** * Adds an asset to the container. * * @param string $name * @param string $file * @param array $dependencies * @return object */ public function add($name, $file = null, $dependencies = array()) { if (is_null($file) and array_key_exists($name, static::$shared)) { $file = static::$shared[$name]; } $asset = new Asset($name, $file, $dependencies); if ($asset->exists($this->directory) and !$asset->external()) { $asset->updated = filemtime($asset->directory . DS . $asset->file); } $this->assets[$this->group()][$name] = $asset; return $this; }