protected function prepareParameters(ReflectionMethod $constructor, $additionalParameters)
    {
        $parameters = array();
        foreach ($constructor->getParameters() as $parameter) {
            $parameterValue = null;
        
            if (isset($additionalParameters[$parameter->name])) {
                $parameterValue = $additionalParameters[$parameter->name];
            } else if ($parameter->getClass() !== null) {
                $parameterValue = $this->getInstance($parameter->getClass());
            }
        
            if ($parameterValue === null) {
                throw new Exception('Cannot find correct value for parameter "' . $parameter->name . '" in class "' . $constructor->class . '".');
            }
        
            $parameters[] = $parameterValue;
        }
        
        return $parameters;
    }
protected function prepareParameters(ReflectionMethod $constructor, $additionalParameters)
    {
        $parameters = array();
        foreach ($constructor->getParameters() as $parameter) {
            $parameterValue = null;
        
            if (isset($additionalParameters[$parameter->name])) {
                $parameterValue = $additionalParameters[$parameter->name];
            } else if ($parameter->getClass() !== null) {
                $parameterValue = $this->getInstance($parameter->getClass());
            }
        
            if ($parameterValue === null) {
                throw new Exception('Cannot find correct value for parameter "' . $parameter->name . '" in class "' . $constructor->class . '".');
            }
        
            $parameters[] = $parameterValue;
        }
        
        return $parameters;
    }
protected function prepareParameters ( ReflectionMethod $ constructor , $ additionalParameters ) { $ parameters = array ( ) ; foreach ( $ constructor -> getParameters ( ) as $ parameter ) { $ parameterValue = null ; if ( isset ( $ additionalParameters [ $ parameter -> name ] ) ) { $ parameterValue = $ additionalParameters [ $ parameter -> name ] ; } else if ( $ parameter -> getClass ( ) !== null ) { $ parameterValue = $ this -> getInstance ( $ parameter -> getClass ( ) ) ; } if ( $ parameterValue === null ) { throw new Exception ( 'Cannot find correct value for parameter "' . $ parameter -> name . '" in class "' . $ constructor -> class . '".' ) ; } $ parameters [ ] = $ parameterValue ; } return $ parameters ; }
Prepares the parameters for the given constructor

@param \ReflectionMethod $constructor
@param array $additionalParameters
@return array

@throws \Zepi\Turbo\Exception Cannot find correct value for parameter "{parameterName}" in class "{className}".
Prepares the parameters for the given constructor