protected function alias($aliasKey, $serviceKey)
    {
        // Bound as a factory to ALWAYS pass through to underlying definition.
        $this->bindFactory(
            $aliasKey,
            function (Container $app) use ($serviceKey) {
                return $app[$serviceKey];
            }
        );
    }
protected function alias($aliasKey, $serviceKey)
    {
        // Bound as a factory to ALWAYS pass through to underlying definition.
        $this->bindFactory(
            $aliasKey,
            function (Container $app) use ($serviceKey) {
                return $app[$serviceKey];
            }
        );
    }
protected function alias ( $ aliasKey , $ serviceKey ) { // Bound as a factory to ALWAYS pass through to underlying definition. $ this -> bindFactory ( $ aliasKey , function ( Container $ app ) use ( $ serviceKey ) { return $ app [ $ serviceKey ] ; } ) ; }
Alias a service name to another one within the service container, allowing for example
concrete types to be aliased to an interface, or legacy string service keys against concrete class names.

@param string $aliasKey
@param string $serviceKey
@throws \InvalidArgumentException
@return void
Alias a service name to another one within the service container allowing for example concrete types to be aliased to an interface or legacy string service keys against concrete class names .