diff --git a/src/Exceptions/MissingParameterException.php b/src/Exceptions/MissingParameterException.php new file mode 100644 index 0000000..fa27b3a --- /dev/null +++ b/src/Exceptions/MissingParameterException.php @@ -0,0 +1,5 @@ +invoke(function () {}, $arguments); * A closure - * * $methodInvoker->invoke(array($instance, 'methodName'), $arguments); * A classic callable with an already instantiated $instance and a methodName. - * * $methodInvoker->invoke(array('Full\\Qualified\\Class\\Name', 'methodName'), $arguments); * This is not(!) a static call. Full\Qualified\Class\Name gats instantiated first before calling methodName. - * * The called method could have either scalar parameters (with or without default values) or Typehinted patemeters * mixed together. Scalar-types and array-types can not be determined automatically. They must be provided through * $arguments. * * @param callable $callable * @param array $arguments Must be an array were the keys match to the Variable-Names of the __construct'ors parameters. - * @throws DefinitionNotFoundException - * @throws ParameterMissingException * @return mixed + *@throws MissingParameterException + * @throws DefinitionNotFoundException */ public function invoke($callable, array $arguments = array()); } diff --git a/src/ObjectFactory.php b/src/ObjectFactory.php index e385f99..ecfec59 100644 --- a/src/ObjectFactory.php +++ b/src/ObjectFactory.php @@ -2,7 +2,7 @@ namespace Ioc; use Ioc\Exceptions\DefinitionNotFoundException; -use Ioc\Exceptions\Exceptions\ParameterMissingException; +use Ioc\Exceptions\MissingParameterException; interface ObjectFactory { /** @@ -12,9 +12,9 @@ interface ObjectFactory { * * @param string $className Must be an fully qualified class-name. * @param array $arguments Must be an array were the keys match to the Variable-Names of the __construct'ors parameters. - * @throws DefinitionNotFoundException - * @throws ParameterMissingException * @return mixed + *@throws MissingParameterException + * @throws DefinitionNotFoundException */ public function create($className, array $arguments = array()); } \ No newline at end of file