1 | <?php |
||
22 | trait ArrayWordsTrait { |
||
23 | |||
24 | /** |
||
25 | * Words. |
||
26 | * |
||
27 | * @var Word[] |
||
28 | */ |
||
29 | private $words; |
||
30 | |||
31 | /** |
||
32 | * Add a word. |
||
33 | * |
||
34 | * @param Word $word The word. |
||
35 | */ |
||
36 | public function addWord(Word $word) { |
||
40 | |||
41 | /** |
||
42 | * Get the number of words. |
||
43 | * |
||
44 | * @return int Returns the number of words. |
||
45 | */ |
||
46 | public function getNumberWords() { |
||
49 | |||
50 | /** |
||
51 | * Get the words. |
||
52 | * |
||
53 | * @return Word[] Returns the words. |
||
54 | */ |
||
55 | public function getWords() { |
||
58 | |||
59 | /** |
||
60 | * Determines if this instance has words. |
||
61 | * |
||
62 | * @return bool Returns true in case of success, false otherwise. |
||
63 | */ |
||
64 | public function hasWords() { |
||
67 | |||
68 | /** |
||
69 | * Set the words. |
||
70 | * |
||
71 | * @param Word[] $words The words. |
||
72 | */ |
||
73 | protected function setWords(array $words) { |
||
77 | } |