1 | <?php namespace Arcanesoft\Seo\Helpers; |
||
11 | class SeoChecker |
||
12 | { |
||
13 | /* ----------------------------------------------------------------- |
||
14 | | Constants |
||
15 | | ----------------------------------------------------------------- |
||
16 | */ |
||
17 | |||
18 | const STATUS_DANGER = 'danger'; |
||
19 | const STATUS_GOOD = 'good'; |
||
20 | const STATUS_WARNING = 'warning'; |
||
21 | |||
22 | /* ----------------------------------------------------------------- |
||
23 | | Main Methods |
||
24 | | ----------------------------------------------------------------- |
||
25 | */ |
||
26 | /** |
||
27 | * Check the title content. |
||
28 | * |
||
29 | * @param string $title |
||
30 | * @param int $min |
||
31 | * @param int $max |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | public static function checkTitle($title, $min = 40, $max = 60) |
||
39 | |||
40 | /** |
||
41 | * Check the description content. |
||
42 | * |
||
43 | * @param string $description |
||
44 | * @param int $min |
||
45 | * @param int $max |
||
46 | * |
||
47 | * @return string |
||
48 | */ |
||
49 | public static function checkDescription($description, $min = 140, $max = 160) |
||
53 | |||
54 | /** |
||
55 | * Get the label class for the given status. |
||
56 | * |
||
57 | * @param string $status |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public static function label($status) |
||
71 | |||
72 | /* ----------------------------------------------------------------- |
||
73 | | Other Methods |
||
74 | | ----------------------------------------------------------------- |
||
75 | */ |
||
76 | |||
77 | /** |
||
78 | * Check the value with min & max length. |
||
79 | * |
||
80 | * @param string $value |
||
81 | * @param int $min |
||
82 | * @param int $max |
||
83 | * |
||
84 | * @return string |
||
85 | */ |
||
86 | protected static function check($value, $min, $max) |
||
98 | } |
||
99 |