| Conditions | 2 |
| Paths | 2 |
| Total Lines | 22 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 71 | public function fetch($file=null) |
||
| 72 | { |
||
| 73 | if (!$file) { |
||
| 74 | $file = $this->_file; |
||
| 75 | } |
||
| 76 | |||
| 77 | // Extract the vars to local namespace |
||
| 78 | extract($this->_vars); |
||
| 79 | |||
| 80 | // Start output buffering |
||
| 81 | ob_start(); |
||
| 82 | |||
| 83 | include(APP_ROOT.$file); |
||
| 84 | |||
| 85 | // Get the contents of the buffer |
||
| 86 | $contents = ob_get_contents(); |
||
| 87 | |||
| 88 | // End buffering and discard |
||
| 89 | ob_end_clean(); |
||
| 90 | |||
| 91 | return $contents; |
||
| 92 | } |
||
| 93 | } |
||
| 94 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.