File tree 3 files changed +9
-0
lines changed
3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
namespace Ioc ;
3
3
4
+ use Ioc \Exceptions \DefinitionNotFoundException ;
5
+
4
6
interface InstanceContainer {
5
7
/**
6
8
* Returns an instance of $className. Is no instance of $className exists, it will be created.
7
9
* If no matching class could be found, it must throw an Ioc\Exceptions\DefinitionNotFoundException.
8
10
*
9
11
* @param string $className
12
+ * @throws DefinitionNotFoundException
10
13
* @return object
11
14
*/
12
15
public function get ($ className );
Original file line number Diff line number Diff line change 1
1
<?php
2
2
namespace Ioc ;
3
3
4
+ use Ioc \Exceptions \DefinitionNotFoundException ;
5
+
4
6
interface MethodInvoker {
5
7
/**
6
8
* Invokes the callable $callable with the arguments $arguments. If arguments were missing in $arguments, the
@@ -11,6 +13,7 @@ interface MethodInvoker {
11
13
*
12
14
* @param callable $callable
13
15
* @param array $arguments
16
+ * @throws DefinitionNotFoundException
14
17
* @return mixed
15
18
*/
16
19
public function invoke ($ callable , array $ arguments = array ());
Original file line number Diff line number Diff line change 1
1
<?php
2
2
namespace Ioc ;
3
3
4
+ use Ioc \Exceptions \DefinitionNotFoundException ;
5
+
4
6
interface ObjectFactory {
5
7
/**
6
8
* The object-factory creates a class with the name $className and the __construct-arguments $arguments. If
@@ -9,6 +11,7 @@ interface ObjectFactory {
9
11
*
10
12
* @param string $className
11
13
* @param array $arguments
14
+ * @throws DefinitionNotFoundException
12
15
* @return mixed
13
16
*/
14
17
public function create ($ className , array $ arguments = array ());
You can’t perform that action at this time.
0 commit comments