Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | interface EntityInterface { |
||
15 | |||
16 | /** |
||
17 | * Creates a new entity. |
||
18 | * |
||
19 | * @param \stdClass $values |
||
20 | * The values to create this entity with. |
||
21 | */ |
||
22 | public function __construct(\stdClass $values); |
||
23 | |||
24 | /** |
||
25 | * Updates the entity. |
||
26 | * |
||
27 | * @param \stdClass $values |
||
28 | * The values to update the entity with |
||
29 | * |
||
30 | * @return void |
||
31 | */ |
||
32 | public function update(\stdClass $values); |
||
33 | |||
34 | /** |
||
35 | * Get this entity as a raw (\stdClass) object. |
||
36 | * |
||
37 | * @return \stdClass |
||
38 | * The raw entity values. |
||
39 | */ |
||
40 | public function raw(); |
||
41 | |||
42 | /** |
||
43 | * Gets the entity type of this entity class. |
||
44 | * |
||
45 | * @return string |
||
46 | * The entity type of this entity class. |
||
47 | */ |
||
48 | public static function getEntityType(); |
||
49 | |||
50 | /** |
||
51 | * Gets the property map for this entity class. |
||
52 | * |
||
53 | * @return array |
||
54 | * The property map definition. |
||
55 | */ |
||
56 | public static function getPropertyMapDefinition(); |
||
57 | } |
||
58 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@return
doc comment to communicate to implementors of these methods what they are expected to return.