Why my code doesn't work? Controller:
use Phalcon\Tag;
class TicketsController extends ControllerBase
{
public function initialize()
{
$this->view->setTemplateBefore('public');
Tag::setTitle('Билеты');
}
public function indexAction()
{
}
public function eventIdAction()
{
Tag::appendTitle(' на событие');
}
}
in action view I want get current title:
<?php
var_dump(Phalcon\Tag::getTitle());
?>
and get this: string(28) " " string is empty but size 28 characters