| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | public function register(Container $container) |
||
| 21 | { |
||
| 22 | $configuration = $container->resolve('Darya\Foundation\Configuration'); |
||
| 23 | |||
| 24 | $basePath = $container->get('path'); |
||
| 25 | $namespace = $configuration->get('project.namespace', 'Application'); |
||
| 26 | |||
| 27 | // Map the configured namespace to the application directory |
||
| 28 | $autoloader = new Autoloader($basePath, array( |
||
| 29 | $namespace => 'application' |
||
| 30 | )); |
||
| 31 | |||
| 32 | $autoloader->register(); |
||
| 33 | |||
| 34 | $container->register(array( |
||
| 35 | 'Darya\Common\Autoloader' => $autoloader |
||
| 36 | )); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |