src/Container.php
private function resolveArguments(array $argumentDefinitions)
    {
        $arguments = [];

        foreach ($argumentDefinitions as $argumentDefinition) {
            if ($argumentDefinition instanceof ServiceReference) {
                $argumentServiceName = $argumentDefinition->getName();

                $arguments[] = $this->get($argumentServiceName);
            } elseif ($argumentDefinition instanceof ParameterReference) {
                $argumentParameterName = $argumentDefinition->getName();

                $arguments[] = $this->getParameter($argumentParameterName);
            } else {
                $arguments[] = $argumentDefinition;
            }
        }

        return $arguments;
    }
private function resolveArguments(array $argumentDefinitions)
    {
        $arguments = [];

        foreach ($argumentDefinitions as $argumentDefinition) {
            if ($argumentDefinition instanceof ServiceReference) {
                $argumentServiceName = $argumentDefinition->getName();

                $arguments[] = $this->get($argumentServiceName);
            } elseif ($argumentDefinition instanceof ParameterReference) {
                $argumentParameterName = $argumentDefinition->getName();

                $arguments[] = $this->getParameter($argumentParameterName);
            } else {
                $arguments[] = $argumentDefinition;
            }
        }

        return $arguments;
    }
private function resolveArguments ( array $ argumentDefinitions ) { $ arguments = [ ] ; foreach ( $ argumentDefinitions as $ argumentDefinition ) { if ( $ argumentDefinition instanceof ServiceReference ) { $ argumentServiceName = $ argumentDefinition -> getName ( ) ; $ arguments [ ] = $ this -> get ( $ argumentServiceName ) ; } elseif ( $ argumentDefinition instanceof ParameterReference ) { $ argumentParameterName = $ argumentDefinition -> getName ( ) ; $ arguments [ ] = $ this -> getParameter ( $ argumentParameterName ) ; } else { $ arguments [ ] = $ argumentDefinition ; } } return $ arguments ; }
Resolve argument definitions into an array of arguments.

@param array  $argumentDefinitions The service arguments definition.

@return array The service constructor arguments.

@throws ContainerException On failure.
Resolve argument definitions into an array of arguments .