| 1 | <?php |
||
| 21 | class Book implements ResourceInterface, TranslatableInterface |
||
|
|
|||
| 22 | { |
||
| 23 | use TranslatableTrait { |
||
| 24 | __construct as private initializeTranslationsCollection; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var int |
||
| 29 | */ |
||
| 30 | private $id; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | private $author; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return int |
||
| 39 | */ |
||
| 40 | public function getId() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getTitle() |
||
| 49 | { |
||
| 50 | return $this->getTranslation()->getTitle(); |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $title |
||
| 55 | */ |
||
| 56 | public function setTitle($title) |
||
| 57 | { |
||
| 58 | $this->getTranslation()->setTitle($title); |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function getAuthor() |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @param string $author |
||
| 71 | */ |
||
| 72 | public function setAuthor($author) |
||
| 76 | |||
| 77 | /** |
||
| 78 | * {@inheritdoc} |
||
| 79 | */ |
||
| 80 | protected function createTranslation() |
||
| 84 | } |
||
| 85 |