Skip to content

[NFR]: Protected model properties with a getter and a setter #70

Closed

Description

@niden

devtools --get-set wrote protected properties, with a getter and a setter for each column. The bases of crest have public typed properties. A devtools project with such models cannot move to crest: a protected property in the model cannot redeclare a public property of the base, and PHP stops with a fatal error.

Scope

  • A setting for the whole project in crest.php, as models.camelCase.
  • With the setting, the base has protected properties, and a get<Name>() and a set<Name>() for each property, named from the property name (so they follow camelCase, --property and the PropertyName attributes).
  • New MVC fragment stubs for the methods, with the placeholders that a published stub needs.
  • A change of the setting, or of a property name, prints the Renamed lines for the methods too.
  • config:show shows the setting.
  • Docs: how a devtools project with --get-set models moves to crest.

Open

Done when

With the setting, crest make:model users writes a base with protected properties and a getter and a setter for each, Phalcon reads and saves a row through them, and a devtools model with --get-set properties works on the crest base.

Part of #11. Depends on #53.

Activity

  1. self-assigned this
    on Oct 19, 2026
  2. added theissue type on Oct 19, 2026
  3. added
    enhancement
    on Oct 19, 2026
  4. moved this from Backlog to Active Sprint in Phalcon v5on Oct 19, 2026
  5. niden commented on Nov 18, 2026

    @niden
    SponsorMemberAuthor

    Resolved in #79

  6. moved this from Active Sprint to Implemented in Phalcon v5on Nov 18, 2026
  7. moved this from Implemented to Released in Phalcon v5on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions