Slide 5
Slide 5 text
Annotations
What does it look like
/**
* @property string Title
* @property string Content
* @property string URLSegment
* @property string FAIcon
* @method SpecialPage SpecialPage
* @method Image Impression
*/
This is the class
class Special extends DataObject
{
public static $db = array(
'Title' => 'Varchar(255)',
'Content' => 'HTMLText',
'URLSegment' => 'Varchar(255)',
'FAIcon' => 'Varchar(255)'
);
public static $has_one = array(
'SpecialPage' => 'SpecialPage',
'Impression' => 'Image',
);
}
16 march, 2016 • Wellington • Simon Erkelens
Docblocks in your files