Skip to content

Commit f07bb0b

Browse files
committed
Initial import
1 parent 7b54344 commit f07bb0b

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/InstanceContainer.php

+3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
22
namespace Ioc;
33

4+
use Ioc\Exceptions\DefinitionNotFoundException;
5+
46
interface InstanceContainer {
57
/**
68
* Returns an instance of $className. Is no instance of $className exists, it will be created.
79
* If no matching class could be found, it must throw an Ioc\Exceptions\DefinitionNotFoundException.
810
*
911
* @param string $className
12+
* @throws DefinitionNotFoundException
1013
* @return object
1114
*/
1215
public function get($className);

src/MethodInvoker.php

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22
namespace Ioc;
33

4+
use Ioc\Exceptions\DefinitionNotFoundException;
5+
46
interface MethodInvoker {
57
/**
68
* Invokes the callable $callable with the arguments $arguments. If arguments were missing in $arguments, the
@@ -11,6 +13,7 @@ interface MethodInvoker {
1113
*
1214
* @param callable $callable
1315
* @param array $arguments
16+
* @throws DefinitionNotFoundException
1417
* @return mixed
1518
*/
1619
public function invoke($callable, array $arguments = array());

src/ObjectFactory.php

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22
namespace Ioc;
33

4+
use Ioc\Exceptions\DefinitionNotFoundException;
5+
46
interface ObjectFactory {
57
/**
68
* The object-factory creates a class with the name $className and the __construct-arguments $arguments. If
@@ -9,6 +11,7 @@ interface ObjectFactory {
911
*
1012
* @param string $className
1113
* @param array $arguments
14+
* @throws DefinitionNotFoundException
1215
* @return mixed
1316
*/
1417
public function create($className, array $arguments = array());

0 commit comments

Comments
 (0)