src/Registry.php
public function alias($name, $spec)
    {
        if (is_callable($spec)) {
            $this->instances[$name] = $spec;
        } else {
            $this->aliases[$name] = $spec;

            // Ensure that the new alias will be used when called.
            unset($this->instances[$name]);
        }
    }
public function alias($name, $spec)
    {
        if (is_callable($spec)) {
            $this->instances[$name] = $spec;
        } else {
            $this->aliases[$name] = $spec;

            // Ensure that the new alias will be used when called.
            unset($this->instances[$name]);
        }
    }
public function alias ( $ name , $ spec ) { if ( is_callable ( $ spec ) ) { $ this -> instances [ $ name ] = $ spec ; } else { $ this -> aliases [ $ name ] = $ spec ; // Ensure that the new alias will be used when called. unset ( $ this -> instances [ $ name ] ) ; } }
Alias method name to a callable.

@param  string   $name
@param  callable $spec
@return void
Alias method name to a callable .