protected function resolvePrimitive(ReflectionParameter $parameter, array &$primitives)
    {
        if (count($primitives) > 0) {
            // Grab the next primitive
            return array_shift($primitives);
        }

        if ($parameter->isDefaultValueAvailable()) {
            // No value was found, so use the default value
            return $parameter->getDefaultValue();
        }

        throw new IocException(sprintf('No default value available for %s in %s::%s()',
            $parameter->getName(),
            $parameter->getDeclaringClass()->getName(),
            $parameter->getDeclaringFunction()->getName()
        ));
    }
protected function resolvePrimitive(ReflectionParameter $parameter, array &$primitives)
    {
        if (count($primitives) > 0) {
            // Grab the next primitive
            return array_shift($primitives);
        }

        if ($parameter->isDefaultValueAvailable()) {
            // No value was found, so use the default value
            return $parameter->getDefaultValue();
        }

        throw new IocException(sprintf('No default value available for %s in %s::%s()',
            $parameter->getName(),
            $parameter->getDeclaringClass()->getName(),
            $parameter->getDeclaringFunction()->getName()
        ));
    }
protected function resolvePrimitive ( ReflectionParameter $ parameter , array & $ primitives ) { if ( count ( $ primitives ) > 0 ) { // Grab the next primitive return array_shift ( $ primitives ) ; } if ( $ parameter -> isDefaultValueAvailable ( ) ) { // No value was found, so use the default value return $ parameter -> getDefaultValue ( ) ; } throw new IocException ( sprintf ( 'No default value available for %s in %s::%s()' , $ parameter -> getName ( ) , $ parameter -> getDeclaringClass ( ) -> getName ( ) , $ parameter -> getDeclaringFunction ( ) -> getName ( ) ) ) ; }
Resolves a primitive parameter

@param ReflectionParameter $parameter The primitive parameter to resolve
@param array $primitives The list of primitive values
@return mixed The resolved primitive
@throws IocException Thrown if there was a problem resolving the primitive
Resolves a primitive parameter