protected function getArgumentProxy($alias, $interface, $callable)
    {
        if (null === $interface) {
            $interface = 'stdClass';
        }

        $factory     = new LazyLoadingValueHolderFactory();
        $initializer = function (
            & $wrappedObject,
            LazyLoadingInterface $proxy,
            $method,
            array $parameters,
            & $initializer
        ) use (
            $alias,
            $interface,
            $callable
        ) {
            $initializer   = null;
            $wrappedObject = $callable($alias, $interface);

            return true;
        };

        return $factory->createProxy($interface, $initializer);
    }
protected function getArgumentProxy($alias, $interface, $callable)
    {
        if (null === $interface) {
            $interface = 'stdClass';
        }

        $factory     = new LazyLoadingValueHolderFactory();
        $initializer = function (
            & $wrappedObject,
            LazyLoadingInterface $proxy,
            $method,
            array $parameters,
            & $initializer
        ) use (
            $alias,
            $interface,
            $callable
        ) {
            $initializer   = null;
            $wrappedObject = $callable($alias, $interface);

            return true;
        };

        return $factory->createProxy($interface, $initializer);
    }
protected function getArgumentProxy ( $ alias , $ interface , $ callable ) { if ( null === $ interface ) { $ interface = 'stdClass' ; } $ factory = new LazyLoadingValueHolderFactory ( ) ; $ initializer = function ( & $ wrappedObject , LazyLoadingInterface $ proxy , $ method , array $ parameters , & $ initializer ) use ( $ alias , $ interface , $ callable ) { $ initializer = null ; $ wrappedObject = $ callable ( $ alias , $ interface ) ; return true ; } ; return $ factory -> createProxy ( $ interface , $ initializer ) ; }
Get an argument proxy for a given alias to provide to the injector.

@since 0.2.0

@param string   $alias     Alias that needs the argument.
@param string   $interface Interface that the proxy implements.
@param callable $callable  Callable used to initialize the proxy.

@return object Argument proxy to provide to the inspector.
Get an argument proxy for a given alias to provide to the injector .