Hoa central
Router.php
Go to the documentation of this file.
1 <?php
2 
37 namespace Hoa\Router;
38 
39 use Hoa\Core;
40 
49 interface Router
50 {
56  const VISIBILITY_PUBLIC = 0;
57 
63  const VISIBILITY_PRIVATE = 1;
64 
70  const RULE_VISIBILITY = 0;
71 
77  const RULE_ID = 1;
78 
84  const RULE_METHODS = 2;
85 
91  const RULE_PATTERN = 3;
92 
98  const RULE_CALL = 4;
99 
105  const RULE_ABLE = 5;
106 
112  const RULE_VARIABLES = 6;
113 
125  public function addRule(
126  $id,
127  Array $methods,
128  $pattern,
129  $call = null,
130  $able = null,
131  Array $variables = []
132  );
133 
145  public function addPrivateRule(
146  $id,
147  Array $methods,
148  $pattern,
149  $call = null,
150  $able = null,
151  Array $variables = []
152  );
153 
160  public function removeRule($id);
161 
168  public function ruleExists($id);
169 
175  public function &getTheRule();
176 
183  public function route();
184 
192  public function unroute($id, Array $variables = []);
193 
199  public function getMethod();
200 
206  public function isAsynchronous();
207 }
208 
212 Core\Consistency::flexEntity('Hoa\Router\Router');
const RULE_METHODS
Definition: Router.php:84
const VISIBILITY_PUBLIC
Definition: Router.php:56
const RULE_VARIABLES
Definition: Router.php:112
const RULE_VISIBILITY
Definition: Router.php:70
const VISIBILITY_PRIVATE
Definition: Router.php:63
const RULE_PATTERN
Definition: Router.php:91
addPrivateRule($id, Array $methods, $pattern, $call=null, $able=null, Array $variables=[])
addRule($id, Array $methods, $pattern, $call=null, $able=null, Array $variables=[])
const RULE_CALL
Definition: Router.php:98
unroute($id, Array $variables=[])