| Conditions | 3 |
| Paths | 4 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | protected static function initAutoloader() { |
||
| 19 | $vendorPath = static::findParentPath('vendor'); |
||
| 20 | |||
| 21 | if (file_exists($vendorPath . '/autoload.php')) { |
||
| 22 | include $vendorPath . '/autoload.php'; |
||
| 23 | } |
||
| 24 | |||
| 25 | if (!class_exists('Zend\Loader\AutoloaderFactory')) { |
||
| 26 | throw new RuntimeException( |
||
| 27 | 'Unable to load ZF2. Run `php composer.phar install`' |
||
| 28 | ); |
||
| 29 | } |
||
| 30 | |||
| 31 | AutoloaderFactory::factory(array( |
||
| 32 | 'Zend\Loader\StandardAutoloader' => array( |
||
| 33 | 'autoregister_zf' => true, |
||
| 34 | 'namespaces' => array( |
||
| 35 | __NAMESPACE__ => __DIR__ . '/' . __NAMESPACE__, |
||
| 36 | ), |
||
| 37 | ), |
||
| 38 | )); |
||
| 39 | } |
||
| 40 | |||
| 56 | Bootstrap::init(); |