| 1 | <?php |
||
| 5 | class AddonLink extends DataObject |
||
| 6 | { |
||
| 7 | |||
| 8 | public static $db = array( |
||
| 9 | 'Name' => 'Varchar(100)', |
||
| 10 | 'Type' => 'Enum(array("require", "require-dev", "suggest", "provide", "conflict", "replace"))', |
||
| 11 | 'Constraint' => 'Varchar(100)', |
||
| 12 | 'Description' => 'Varchar(255)' |
||
| 13 | ); |
||
| 14 | |||
| 15 | public static $has_one = array( |
||
| 16 | 'Source' => 'AddonVersion', |
||
| 17 | 'Target' => 'Addon' |
||
| 18 | ); |
||
| 19 | |||
| 20 | public function Link() |
||
| 32 | } |
||
| 33 |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.