Real Dreams
Real Dreams

Reputation: 18020

$view->start(); and $view->finish(); in Phalcon

In following Phalcon code what do start() and finish() functions do?
It seems they could be embedded in render()

$view->start();
$view->render("products", "list");
$view->finish();

Upvotes: 0

Views: 350

Answers (2)

twistedxtra
twistedxtra

Reputation: 2699

The start and finish calls are automatically done by Phalcon\Mvc\Application::handle, You can see an approximate behavior of this function in PHP here

Upvotes: 0

Ofir Baruch
Ofir Baruch

Reputation: 10346

According to the Phalcon manual:

public start () Starts rendering process enabling the output buffering

public finish () Finishes the render process by stopping the output buffering

So it can not be embeded in the render.

Upvotes: 1

Related Questions