src/AssignDefinitionContainerCapableTrait.php
protected function _assignDefinitionContainer(callable $definition, BaseContainerInterface $container)
    {
        return function (BaseContainerInterface $c) use ($definition, $container) {
            $args    = func_get_args();
            $args[0] = $container;

            return $this->_invokeCallable($definition, $args);
        };
    }
protected function _assignDefinitionContainer(callable $definition, BaseContainerInterface $container)
    {
        return function (BaseContainerInterface $c) use ($definition, $container) {
            $args    = func_get_args();
            $args[0] = $container;

            return $this->_invokeCallable($definition, $args);
        };
    }
protected function _assignDefinitionContainer ( callable $ definition , BaseContainerInterface $ container ) { return function ( BaseContainerInterface $ c ) use ( $ definition , $ container ) { $ args = func_get_args ( ) ; $ args [ 0 ] = $ container ; return $ this -> _invokeCallable ( $ definition , $ args ) ; } ; }
Wraps the given definition such that it will receive the given container.

The definition will receive the `$container` no matter what container it is invoked with.
All other arguments to the definition will be preserved.
This is very useful in converting existing definitions to use a different container,
possibly a composite one.

@since [*next-version*]

@param callable               $definition The definition to assign the container to.
@param BaseContainerInterface $container  The container to assign.

@return callable A definition that will be invoked with the given container.
Wraps the given definition such that it will receive the given container .