1 | <?php |
||
8 | class DomainService extends Model |
||
9 | { |
||
10 | const SERVICE_OPERATION_PURCHASE = 'purchase'; |
||
11 | const SERVICE_OPERATION_RENEW = 'renew'; |
||
12 | |||
13 | /** |
||
14 | * @var string Human-readable name |
||
15 | */ |
||
16 | public $name; |
||
17 | |||
18 | /** |
||
19 | * @var string Service type |
||
20 | */ |
||
21 | public $type; |
||
22 | |||
23 | /** @var DomainResource[] */ |
||
24 | public $resources; |
||
25 | |||
26 | /** |
||
27 | * Returns resource for $operation |
||
28 | * |
||
29 | * @param string $operation |
||
30 | * @return DomainResource |
||
31 | */ |
||
32 | public function getResource($operation) |
||
36 | |||
37 | /** |
||
38 | * Tries to assign a resource in this service, if the type is correct |
||
39 | * |
||
40 | * @param DomainResource $resource |
||
41 | * @return bool |
||
42 | */ |
||
43 | public function tryResourceAssignation(DomainResource $resource) |
||
52 | |||
53 | /** |
||
54 | * Check whether $resource belongs to this service type |
||
55 | * |
||
56 | * @param DomainResource $resource |
||
57 | * @return false|string operation type or false, if resource does not match this service |
||
58 | */ |
||
59 | protected function matchType(DomainResource $resource) |
||
69 | |||
70 | /** |
||
71 | * @return array available operations |
||
72 | */ |
||
73 | public static function getOperations() |
||
80 | |||
81 | /** |
||
82 | * @return bool whether service contains all necessary resources |
||
83 | */ |
||
84 | public function isFulfilled() |
||
88 | |||
89 | } |
||
90 |
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@property
annotation 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.