public function alias($alias, $binding)
    {
        if ($this->resolve($binding)) {
            $this->bindings[$alias] = $this->bindings[$binding];
            $this->cache[$alias] = $this->cache[$binding];
            $this->aliases[$alias] = $binding;
        }
    }
public function alias($alias, $binding)
    {
        if ($this->resolve($binding)) {
            $this->bindings[$alias] = $this->bindings[$binding];
            $this->cache[$alias] = $this->cache[$binding];
            $this->aliases[$alias] = $binding;
        }
    }
public function alias ( $ alias , $ binding ) { if ( $ this -> resolve ( $ binding ) ) { $ this -> bindings [ $ alias ] = $ this -> bindings [ $ binding ] ; $ this -> cache [ $ alias ] = $ this -> cache [ $ binding ] ; $ this -> aliases [ $ alias ] = $ binding ; } }
Create an alias to an existing cached binding.

@param  string $alias
@param  string $binding
@throws NotFoundException
@throws ContainerException
Create an alias to an existing cached binding .