@@ -27,7 +27,7 @@ |
||
| 27 | 27 | * создаем сущность |
| 28 | 28 | * |
| 29 | 29 | * @param array $row |
| 30 | - * @return type |
|
| 30 | + * @return \SimpleORM\EntityInterface |
|
| 31 | 31 | */ |
| 32 | 32 | public function createEntity(array $row) { |
| 33 | 33 | return $this->buildEntity(new City(), $row); |
@@ -22,6 +22,11 @@ discard block |
||
| 22 | 22 | protected $group; |
| 23 | 23 | protected $address; |
| 24 | 24 | |
| 25 | + /** |
|
| 26 | + * @param string $name |
|
| 27 | + * @param string $email |
|
| 28 | + * @param string $password |
|
| 29 | + */ |
|
| 25 | 30 | function __construct($name, $email, $password, UserGroup $Group) { |
| 26 | 31 | $this->setName($name); |
| 27 | 32 | $this->setEmail($email); |
@@ -64,6 +69,9 @@ discard block |
||
| 64 | 69 | $this->password = $password; |
| 65 | 70 | } |
| 66 | 71 | |
| 72 | + /** |
|
| 73 | + * @param UserGroup $group |
|
| 74 | + */ |
|
| 67 | 75 | function setGroup($group) { |
| 68 | 76 | $this->group = $group; |
| 69 | 77 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | * создаем сущность |
| 28 | 28 | * |
| 29 | 29 | * @param array $row |
| 30 | - * @return type |
|
| 30 | + * @return \SimpleORM\EntityInterface |
|
| 31 | 31 | */ |
| 32 | 32 | public function createEntity(array $row) { |
| 33 | 33 | return $this->buildEntity(new UserAddress(), $row); |
@@ -18,6 +18,10 @@ |
||
| 18 | 18 | |
| 19 | 19 | protected $title; |
| 20 | 20 | |
| 21 | + /** |
|
| 22 | + * @param string $code |
|
| 23 | + * @param string $title |
|
| 24 | + */ |
|
| 21 | 25 | function __construct($code,$title){ |
| 22 | 26 | $this->setCode($code); |
| 23 | 27 | $this->setTitle($title); |
@@ -303,9 +303,9 @@ discard block |
||
| 303 | 303 | /** |
| 304 | 304 | * Подготавливаем конечный вариант Сущности |
| 305 | 305 | * |
| 306 | - * @param \Core\Infrastructure\EntityInterface $Entity |
|
| 306 | + * @param EntityInterface $Entity |
|
| 307 | 307 | * @param array $row |
| 308 | - * @return \Core\Infrastructure\EntityInterface |
|
| 308 | + * @return EntityInterface |
|
| 309 | 309 | * @throws BadMethodCallException |
| 310 | 310 | */ |
| 311 | 311 | protected function buildEntity(EntityInterface $Entity, array $row){ |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | |
| 356 | 356 | /** |
| 357 | 357 | * из объекта формирует массив |
| 358 | - * @param \Core\Infrastructure\EntityInterface $Entity |
|
| 358 | + * @param EntityInterface $Entity |
|
| 359 | 359 | * @return \Core\Infrastructure\EntityInterface |
| 360 | 360 | * @throws BadMethodCallException |
| 361 | 361 | */ |
@@ -400,6 +400,7 @@ discard block |
||
| 400 | 400 | |
| 401 | 401 | /** |
| 402 | 402 | * Установка поля для маппинга |
| 403 | + * @param string $alias |
|
| 403 | 404 | */ |
| 404 | 405 | protected function addMappingField($alias,$field = null){ |
| 405 | 406 | |
@@ -10,29 +10,29 @@ |
||
| 10 | 10 | abstract class AbstractEntity implements EntityInterface |
| 11 | 11 | { |
| 12 | 12 | |
| 13 | - protected $id; |
|
| 13 | + protected $id; |
|
| 14 | 14 | |
| 15 | 15 | protected $deleted; |
| 16 | 16 | |
| 17 | 17 | public function getId() |
| 18 | - { |
|
| 19 | - return $this->id; |
|
| 20 | - } |
|
| 18 | + { |
|
| 19 | + return $this->id; |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - public function setId($id) |
|
| 23 | - { |
|
| 24 | - if ($this->id !== null) { |
|
| 25 | - throw new BadMethodCallException( |
|
| 26 | - "Идентификатор у сущности уже установлен"); |
|
| 27 | - } |
|
| 22 | + public function setId($id) |
|
| 23 | + { |
|
| 24 | + if ($this->id !== null) { |
|
| 25 | + throw new BadMethodCallException( |
|
| 26 | + "Идентификатор у сущности уже установлен"); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - if (empty($id)) {//$id < 1 |
|
| 30 | - throw new InvalidArgumentException("Неверный индентификатор"); |
|
| 31 | - } |
|
| 29 | + if (empty($id)) {//$id < 1 |
|
| 30 | + throw new InvalidArgumentException("Неверный индентификатор"); |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - $this->id = $id; |
|
| 34 | - return $this; |
|
| 35 | - } |
|
| 33 | + $this->id = $id; |
|
| 34 | + return $this; |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | 37 | public function setDeleted($deleted){ |
| 38 | 38 | $this->deleted = $deleted; |