protected function resolveNonClassArg(ReflectionParameter $param, array $params, ReflectionFunctionAbstract $func)
	{
		$name = '$'.$param->getName();

		if ($params && array_key_exists($name, $params)) {
			$argument = $params[$name];

			if (is_array($argument) && isset($this->factories[$argument[0]])) {
				$argument = $this->callFactory($argument[0], $argument[1]);
			}

			return $argument;
		}

		if ($param->isDefaultValueAvailable()) {
			return $param->getDefaultValue();
		}

		throw Exception\UnresolvableArgumentException::fromReflectionParam($param, $func);
	}
protected function resolveNonClassArg(ReflectionParameter $param, array $params, ReflectionFunctionAbstract $func)
	{
		$name = '$'.$param->getName();

		if ($params && array_key_exists($name, $params)) {
			$argument = $params[$name];

			if (is_array($argument) && isset($this->factories[$argument[0]])) {
				$argument = $this->callFactory($argument[0], $argument[1]);
			}

			return $argument;
		}

		if ($param->isDefaultValueAvailable()) {
			return $param->getDefaultValue();
		}

		throw Exception\UnresolvableArgumentException::fromReflectionParam($param, $func);
	}
protected function resolveNonClassArg ( ReflectionParameter $ param , array $ params , ReflectionFunctionAbstract $ func ) { $ name = '$' . $ param -> getName ( ) ; if ( $ params && array_key_exists ( $ name , $ params ) ) { $ argument = $ params [ $ name ] ; if ( is_array ( $ argument ) && isset ( $ this -> factories [ $ argument [ 0 ] ] ) ) { $ argument = $ this -> callFactory ( $ argument [ 0 ] , $ argument [ 1 ] ) ; } return $ argument ; } if ( $ param -> isDefaultValueAvailable ( ) ) { return $ param -> getDefaultValue ( ) ; } throw Exception \ UnresolvableArgumentException :: fromReflectionParam ( $ param , $ func ) ; }
Resolve a non-class function argument.

@param  ReflectionParameter        $param
@param  array                      $params
@param  ReflectionFunctionAbstract $func

@return mixed
Resolve a non - class function argument .