DB.PHP - PHP ORM

How field attributes work

db.php uses php doc comments to gather additional information for property related fields. To set special attributes for real fields in which property values are stored (in database table record columns) we specify special keywords in property doc comments. See also php doc comments.

For example if we want to make a property related field primary we write above it (before property declaration) a doc comment:

/**
* primary
*/
public $id;

Consider that first line of doc comments always begin with following three symbols /** given on separate line and end with symbols */ on given also on separate line. Any middle line begins with single symbol *.

So for example if yo want to make a property field primary but string:

/**
* primary
* @var string
*/
public $id;