1 | <?php |
||
5 | class AddonKeyword extends DataObject |
||
6 | { |
||
7 | |||
8 | public static $db = array( |
||
9 | 'Name' => 'Varchar(255)' |
||
10 | ); |
||
11 | |||
12 | public static $belongs_many_many = array( |
||
13 | 'Addons' => 'Addon', |
||
14 | 'Versions' => 'AddonVersion' |
||
15 | ); |
||
16 | |||
17 | /** |
||
18 | * Gets a keyword object by name, creating one if it does not exist. |
||
19 | * |
||
20 | * @param string $name |
||
21 | * @return AddonKeyword |
||
22 | */ |
||
23 | public static function get_by_name($name) |
||
36 | } |
||
37 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write 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.