| 1 | <?php |
||
| 22 | class Profile implements JsonSerializable |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | * |
||
| 27 | * @ES\Id() |
||
| 28 | */ |
||
| 29 | private $id; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var string |
||
| 33 | * |
||
| 34 | * @ES\Property(name="name", type="string", options={"analyzer"="standard"}) |
||
| 35 | */ |
||
| 36 | private $name; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @var string |
||
| 40 | * |
||
| 41 | * @ES\Property(name="description", type="string", options={"analyzer"="standard"}) |
||
| 42 | */ |
||
| 43 | private $description; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getId() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $id |
||
| 55 | */ |
||
| 56 | public function setId($id) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function getName() |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @param string $name |
||
| 71 | */ |
||
| 72 | public function setName($name) |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return string |
||
| 79 | */ |
||
| 80 | public function getDescription() |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @param string $description |
||
| 87 | */ |
||
| 88 | public function setDescription($description) |
||
| 92 | |||
| 93 | function jsonSerialize() |
||
| 101 | |||
| 102 | } |
||
| 103 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.