Skip to content

Commit 1177a22

Browse files
committed
Renamed ParameterMissingException to MissingParameterException
1 parent 593e4c0 commit 1177a22

4 files changed

+11
-16
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
namespace Ioc\Exceptions;
3+
4+
class MissingParameterException extends \RuntimeException {
5+
}

src/Exceptions/ParameterMissingException.php

-5
This file was deleted.

src/MethodInvoker.php

+3-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
namespace Ioc;
33

44
use Ioc\Exceptions\DefinitionNotFoundException;
5-
use Ioc\Exceptions\Exceptions\ParameterMissingException;
5+
use Ioc\Exceptions\MissingParameterException;
66

77
interface MethodInvoker {
88
/**
@@ -11,27 +11,22 @@ interface MethodInvoker {
1111
* method or a class not yet instantiated. The implementation determines how to handle the callable and find the
1212
* appropriate method for invocation. If no matching class could be found, it must throw an
1313
* Ioc\Exceptions\DefinitionNotFoundException.
14-
*
1514
* Following forms must be accepted:
16-
*
1715
* $methodInvoker->invoke(function () {}, $arguments);
1816
* A closure
19-
*
2017
* $methodInvoker->invoke(array($instance, 'methodName'), $arguments);
2118
* A classic callable with an already instantiated $instance and a methodName.
22-
*
2319
* $methodInvoker->invoke(array('Full\\Qualified\\Class\\Name', 'methodName'), $arguments);
2420
* This is not(!) a static call. Full\Qualified\Class\Name gats instantiated first before calling methodName.
25-
*
2621
* The called method could have either scalar parameters (with or without default values) or Typehinted patemeters
2722
* mixed together. Scalar-types and array-types can not be determined automatically. They must be provided through
2823
* $arguments.
2924
*
3025
* @param callable $callable
3126
* @param array $arguments Must be an array were the keys match to the Variable-Names of the __construct'ors parameters.
32-
* @throws DefinitionNotFoundException
33-
* @throws ParameterMissingException
3427
* @return mixed
28+
*@throws MissingParameterException
29+
* @throws DefinitionNotFoundException
3530
*/
3631
public function invoke($callable, array $arguments = array());
3732
}

src/ObjectFactory.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
namespace Ioc;
33

44
use Ioc\Exceptions\DefinitionNotFoundException;
5-
use Ioc\Exceptions\Exceptions\ParameterMissingException;
5+
use Ioc\Exceptions\MissingParameterException;
66

77
interface ObjectFactory {
88
/**
@@ -12,9 +12,9 @@ interface ObjectFactory {
1212
*
1313
* @param string $className Must be an fully qualified class-name.
1414
* @param array $arguments Must be an array were the keys match to the Variable-Names of the __construct'ors parameters.
15-
* @throws DefinitionNotFoundException
16-
* @throws ParameterMissingException
1715
* @return mixed
16+
*@throws MissingParameterException
17+
* @throws DefinitionNotFoundException
1818
*/
1919
public function create($className, array $arguments = array());
2020
}

0 commit comments

Comments
 (0)