| 1 | <?php |
||
| 15 | class ViewHelper |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * This class should not be instantiate. |
||
| 19 | */ |
||
| 20 | private function __construct() |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Returns side CSS class for block. This method should use in loops. |
||
| 26 | * |
||
| 27 | * @param string $right CSS class for right block. |
||
| 28 | * @param string $left CSS class for left block. |
||
| 29 | * |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | public static function sideCssClass($right = 'right', $left = 'left') |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Check whether is last iteration of the loop. |
||
| 40 | * |
||
| 41 | * @param int $total |
||
| 42 | * |
||
| 43 | * @return bool |
||
| 44 | */ |
||
| 45 | public static function isLast($total) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * If number less than 9 before this number will be added zero. |
||
| 53 | * |
||
| 54 | * @param int|string $number |
||
| 55 | * |
||
| 56 | * @return int|string |
||
| 57 | */ |
||
| 58 | public static function zeroNumber($number) |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Generates even numbers. |
||
| 65 | * |
||
| 66 | * @return int Returns even number. |
||
| 67 | */ |
||
| 68 | public static function evenNumber() |
||
| 76 | |||
| 77 | /** |
||
| 78 | * Generates odd numbers. |
||
| 79 | * |
||
| 80 | * @return int Returns add number. |
||
| 81 | */ |
||
| 82 | public static function oddNumber() |
||
| 90 | } |
||
| 91 |