We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Consider adding a flag to make dev tools generate chainable setters

I would like to see an additional flag go along with "model" or "all-models": --chainable This would make every setter return $this, for chaining purposes, which would then allow us to do this:

$myModel
    ->setProperty1('myProp')
    ->setProperty2(5)
    ->save();

@swader That is a great suggestion. I will try and get something done today if not tomorrow and let you know.

Just a FYI, NFRs like this one should be posted on Github as issues. It makes it a lot easier for us to handle :)

Thanks for the suggestion. I will update the issue once the NFR is implemented.

Ah, ok, roger that, will post feature requests there from now on, thanks :)

@swader This has been addressed

https://github.com/phalcon/phalcon-devtools/pull/64

Devtools will now create chainable setters by default.

Wow, that was super fast, thanks!