Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | public function build($name) |
||
35 | { |
||
36 | if (!isset($this->map[$name])) { |
||
37 | throw new InvalidConfigException('Can not create presenter for class ' . $name); |
||
38 | } |
||
39 | |||
40 | if (!isset($this->cache[$name])) { |
||
41 | $this->cache[$name] = new $this->map[$name](); |
||
42 | } |
||
43 | |||
44 | return $this->cache[$name]; |
||
45 | } |
||
46 | |||
56 |