public function add($alias, $source = null, $dependencies = [], $options = [])
    {
        if ($source !== null) {
            $asset = $this->_factory->create($alias, $source, $dependencies, $options);
            $this->_collection->add($asset);
        }

        $this->_queued[$alias] = true;

        return $this;
    }
public function add($alias, $source = null, $dependencies = [], $options = [])
    {
        if ($source !== null) {
            $asset = $this->_factory->create($alias, $source, $dependencies, $options);
            $this->_collection->add($asset);
        }

        $this->_queued[$alias] = true;

        return $this;
    }
public function add ( $ alias , $ source = null , $ dependencies = [ ] , $ options = [ ] ) { if ( $ source !== null ) { $ asset = $ this -> _factory -> create ( $ alias , $ source , $ dependencies , $ options ) ; $ this -> _collection -> add ( $ asset ) ; } $ this -> _queued [ $ alias ] = true ; return $ this ; }
Adds a registered asset or a new asset to the queue.

@param string       $alias
@param string|null  $source
@param string|array $dependencies
@param string|array $options
@return $this
Adds a registered asset or a new asset to the queue .