/** * Construct the exception. Note: The message is NOT binary safe. * @link http://php.net/manual/en/exception.construct.php * @param \ReflectionFunctionAbstract $reflection The reflected method or function. * @param \ReflectionParameter $parameter The paramter failed to resolve. * @param string $message [optional] The Exception message to throw. * @param int $code [optional] The Exception code. * @param Exception $previous [optional] The previous exception used for the exception chaining. Since 5.3.0 * @since 5.1.0 */ public function __construct(\ReflectionFunctionAbstract $reflection, \ReflectionParameter $parameter, $message = null, $code = 0, Exception $previous = null) { // Default Exception message if (is_null($message)) { $message = 'Unable to resolve parameter `%1$s` for function/method `%2$s`.'; } parent::__construct(sprintf($message, $this->getReflectionParameterName($parameter), $this->getReflectionFunctionName($reflection)), $code, $previous); }
public function __construct(array $depencesStack) { $msg = ""; foreach ($depencesStack as $dependence) { $msg .= $dependence . " -> "; } $msg .= current($depencesStack); parent::__construct("Auto build can't slove dependence cycle:\n" . $msg); }
/** * @param \ReflectionParameter $parameter * @param \ReflectionFunctionAbstract $context */ public function __construct(\ReflectionParameter $parameter, \ReflectionFunctionAbstract $context) { $this->parameter = $parameter; $this->context = $context; $name = $context->getName(); if ($context instanceof \ReflectionMethod) { $name = $context->class . '::' . $name; } parent::__construct("Unable to resolve '{$parameter->name}' argument in '{$name}'."); }
public function __construct($type, $key) { $msg = "Register type {$type}[{$key}] is not exist."; parent::__construct($msg); }
public function __construct($type, $key) { $msg = "Register type {$type}[{$key}] has already registed."; parent::__construct($msg); }
public function __construct($type, $key) { $msg = "Instance registering is not type of {$type}[{$key}]."; parent::__construct($msg, $code, $previous); }
public function __construct($type) { $msg = "Make instance of {$type} failed."; parent::__construct($msg); }
function __construct($id) { parent::__construct("Service with id '{$id}' was not found in container"); }
public function __construct($type, $key) { $msg = "Get instance of {$type}[{$key}] is not registed."; parent::__construct($msg); }
public function __construct(\ReflectionParameter $parameter) { $msg = "Unresolvable dependency resolving [{$parameter}] in class {$parameter->getDeclaringClass()->getName()}"; parent::__construct($msg); }