Had some wierd problem with closures an $this when being defined in one class and used in another (defined in Application, used in Phalcon\Di\FactoryDefault). So we move all of this to "Services" class that directly extends FactoryDefault DI. And therefore, we don't need a Application class anymore.
23 lines
428 B
PHP
23 lines
428 B
PHP
<?php
|
|
|
|
defined('APP_PATH') || define('APP_PATH', realpath('..'));
|
|
|
|
/**
|
|
* Read the configuration
|
|
*/
|
|
$config = include APP_PATH . "/app/config/config.php";
|
|
|
|
if ($config->application->debug) {
|
|
(new Phalcon\Debug)->listen();
|
|
}
|
|
|
|
/**
|
|
* Read auto-loader
|
|
*/
|
|
include APP_PATH . "/app/config/loader.php";
|
|
|
|
/**
|
|
* Handle the request
|
|
*/
|
|
$app = new Phalcon\Mvc\Application(new Httpcb\Services());
|
|
echo $app->handle()->getContent();
|