Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Call to undefined method setVar

Hello, i'm new to Phalcon and im stuck at this point of tutorial,

class LoginController extends \Phalcon\Mvc\Controller
    public function indexAction()
        echo "Login";

    // /login/proces/<username/<age>
    public function processAction($username = false, $age = 12)
        $this->setVar('username', $username);
        $this->setVar('age', $age);

and get this error:

Fatal error: Call to undefined method LoginController::setVar() in C:\xampp\htdocs\phalcon\app\controllers\LoginController.php on line 14




Is the tutorial documentation wrong?

no, I am blind,

thank you now works fine