Skip to content

Model & Entity

Base classes and traits for the ORM layer.

TopicPurpose
TableTable base class with extra validation rules and quality-of-life additions.
TokensOne-time token storage (used by Login Links and similar flows).
EnumNative PHP enum integration with entity properties.
StaticEnumStatic-method-based enum-like values on entities.

Native PHP enums are recommended on CakePHP 5+. Use StaticEnum only when interop with older code prevents enums.

Extend the Table and Entity base classes:

php
use Tools\Model\Table\Table;

class UsersTable extends Table {}
php
use Tools\Model\Entity\Entity;

class User extends Entity {}

Released under the MIT License.