Record properties

From Sunhill Framework Documentation
Revision as of 23:48, 28 September 2024 by Klaus (talk | contribs) (Created page with "'''Record properties''' are properties that consist of other properties (even other record properties). The elements of a record properties are accessed just like a object in php. Example: $record_property->integer_property = 5; // calls $integer_property->setValue(5); == Defining member properties == Any record property consist at least of one member property. There are three ways to tell the record what members it has === Defining a initializeRecord() method === =...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Record properties are properties that consist of other properties (even other record properties). The elements of a record properties are accessed just like a object in php.

Example:

$record_property->integer_property = 5; // calls $integer_property->setValue(5);

Defining member properties

Any record property consist at least of one member property. There are three ways to tell the record what members it has

Defining a initializeRecord() method

Passing a callback to the constructor or the setupRecord() method

Adding runtime properties called attributes

Exploring members

hasElement(string $name): bool

elementCount(): int

Traversing elements