1 | <?php |
||
7 | class Keywords implements Countable |
||
8 | { |
||
9 | /** |
||
10 | * @var array |
||
11 | */ |
||
12 | protected $items = []; |
||
13 | |||
14 | /** |
||
15 | * @var int |
||
16 | */ |
||
17 | protected $maxWords; |
||
18 | |||
19 | /** |
||
20 | * Create a new keywords instance. |
||
21 | * |
||
22 | * @param array $config |
||
23 | */ |
||
24 | public function __construct(array $config = []) |
||
28 | |||
29 | /** |
||
30 | * Init config. |
||
31 | * |
||
32 | * @param array $config |
||
33 | * @return void |
||
34 | */ |
||
35 | protected function initConfig(array $config) |
||
43 | |||
44 | public function setMaxWords($max) |
||
50 | |||
51 | public function getMaxWords() |
||
55 | |||
56 | public function add($items) |
||
62 | |||
63 | public function set($items) |
||
67 | |||
68 | public function get() |
||
74 | |||
75 | public function clear() |
||
79 | |||
80 | public function count() |
||
84 | |||
85 | protected function clean($items) |
||
93 | |||
94 | public function toString() |
||
98 | |||
99 | public function __toString() |
||
103 | } |
||
104 |