Zend Framework 2 basic service manager and application startup

Posted on February 02, 2013

WARNING: Please note that this article was published a long time ago. The information contained might be outdated.

Quick note on how to startup a Zend Framework 2 application with service manager.

<?php
use ZendServiceManagerServiceManager;
use ZendMvcApplication

/* some configuration code */

$services = new ServiceManager($servicesConfig);
$application = new Application($applicationConfig, $services);
$app->bootstrap();
$response = $app->run();
$response->send();