1 | <?php |
||
12 | class WordRankManager |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */private $sentence; |
||
17 | |||
18 | /** |
||
19 | * WordRankManager constructor. |
||
20 | * |
||
21 | * @param string $sentence |
||
22 | */ |
||
23 | public function __construct($sentence = '') |
||
24 | { |
||
25 | $this->sentence = $sentence; |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * Return sentence to show occurence |
||
30 | * |
||
31 | * @return string |
||
32 | */ |
||
33 | public function getWord() |
||
34 | { |
||
35 | return $this->sentence; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Rank occurence of words in a sentence |
||
40 | * |
||
41 | * @return array |
||
42 | * |
||
43 | * @throws \John\Exceptions\WordRankManagerException |
||
44 | */ |
||
45 | public function ranker() |
||
69 | } |
||
70 |