| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 49 | public function &getInstance() |
||
| 50 | {
|
||
| 51 | if (empty($this->instance)) {
|
||
| 52 | if (null !== ($constructor = $this->getConstructor())) {
|
||
| 53 | $args = func_get_args(); |
||
| 54 | |||
| 55 | if (count($args)) {
|
||
| 56 | $this->instance = $this->newInstance(); |
||
| 57 | } else {
|
||
| 58 | $this->instance = $this->newInstanceArgs(func_get_args()); |
||
| 59 | } |
||
| 60 | } else {
|
||
| 61 | $this->instance = $this->newInstanceWithoutConstructor(); |
||
| 62 | } |
||
| 63 | } |
||
| 64 | |||
| 65 | return $this->instance; |
||
| 66 | } |
||
| 67 | } |