Phalcon cheat sheet

Disable view

$this->view->disable();

Change main view

$this->view->setMainView('public');

Set headears

$this->response->setContentType('text/plain')->sendHeaders();

 

Links to documentation

Registering Router instance

404 on Micro application

$app->notFound(
    function () use ($app) {
        $app->response->setStatusCode(404, "Not Found")->sendHeaders();
        echo 'This is crazy, but this page was not found!';
    }
);