1 | <?php |
||
7 | class Factory implements FactoryInterface |
||
8 | { |
||
9 | private $map = array( |
||
10 | 'AuthInterface' => 'Njasm\\Soundcloud\\Auth\\Auth', |
||
11 | 'RequestInterface' => 'Njasm\\Soundcloud\\Request\\Request', |
||
12 | 'ResponseInterface' => 'Njasm\\Soundcloud\\Request\\Response', |
||
13 | 'ResourceInterface' => 'Njasm\\Soundcloud\\Resource\\Resource', |
||
14 | 'UrlBuilderInterface' => 'Njasm\\Soundcloud\\UrlBuilder\\UrlBuilder', |
||
15 | 'FactoryInterface' => 'Njasm\\Soundcloud\\Factory\\Factory' |
||
16 | ); |
||
17 | |||
18 | 1 | public function register($interface, $class) |
|
25 | |||
26 | /** |
||
27 | * @param string $interface |
||
28 | * @param array $params |
||
29 | * @return object |
||
30 | */ |
||
31 | 9 | public function make($interface, array $params = array()) |
|
47 | |||
48 | 10 | public function has($interface) |
|
52 | |||
53 | /** |
||
54 | * @param string $interface |
||
55 | * @throws \InvalidArgumentException |
||
56 | */ |
||
57 | 10 | private function validate($interface) |
|
63 | } |
||
64 |