EntityInterface::update()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
1
<?php
2
/**
3
 * @file
4
 * Contains \TheSportsDb\Entity\EntityInterface.
5
 */
6
7
namespace TheSportsDb\Entity;
8
9
/**
10
 * Interface for entities.
11
 *
12
 * @author Jelle Sebreghts
13
 */
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);
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

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.

Loading history...
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