| 1 | <?php |
||
| 22 | class Studioforty9_Recaptcha_Model_Routes implements Countable |
||
| 23 | { |
||
| 24 | /** @var array */ |
||
| 25 | protected $routes = array(); |
||
|
|
|||
| 26 | |||
| 27 | /** |
||
| 28 | * Add a route. |
||
| 29 | * |
||
| 30 | * @param string $route |
||
| 31 | * @param string $label |
||
| 32 | * @return self |
||
| 33 | */ |
||
| 34 | public function add($route, $label) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Remove a route. |
||
| 46 | * |
||
| 47 | * @param string $route |
||
| 48 | * @return self |
||
| 49 | */ |
||
| 50 | public function remove($route) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Find a route. |
||
| 61 | * |
||
| 62 | * @param string $route |
||
| 63 | * @return array |
||
| 64 | */ |
||
| 65 | public function find($route) |
||
| 75 | |||
| 76 | /** |
||
| 77 | * Clear all routes. |
||
| 78 | * |
||
| 79 | * @return self |
||
| 80 | */ |
||
| 81 | public function clear() |
||
| 87 | |||
| 88 | /** |
||
| 89 | * Count the number routes. |
||
| 90 | * |
||
| 91 | * @return int |
||
| 92 | */ |
||
| 93 | public function count() |
||
| 97 | |||
| 98 | /** |
||
| 99 | * Cast the object to an array. |
||
| 100 | * |
||
| 101 | * @return aray |
||
| 102 | */ |
||
| 103 | public function toArray() |
||
| 107 | } |
||
| 108 |