1 /*
2   +----------------------------------------------------------------------+
3   | Yet Another Framework                                                |
4   +----------------------------------------------------------------------+
5   | This source file is subject to version 3.01 of the PHP license,      |
6   | that is bundled with this package in the file LICENSE, and is        |
7   | available through the world-wide-web at the following url:           |
8   | http://www.php.net/license/3_01.txt                                  |
9   | If you did not receive a copy of the PHP license and are unable to   |
10   | obtain it through the world-wide-web, please send a note to          |
11   | license@php.net so we can mail you a copy immediately.               |
12   +----------------------------------------------------------------------+
13   | Author: Xinchen Hui  <laruence@php.net>                              |
14   +----------------------------------------------------------------------+
15 */
16 
17 #ifndef YAF_ROUTER_REWRITE_H
18 #define YAF_ROUTER_REWRITE_H
19 
20 typedef struct {
21 	zend_object  std;
22 	zend_string *match;
23 	zend_array  *router;
24 	zend_array  *verify;
25 	zend_array  *properties;
26 } yaf_route_rewrite_object;
27 
28 #define Z_YAFROUTEREWRITEOBJ(zv)    ((yaf_route_rewrite_object*)(Z_OBJ(zv)))
29 #define Z_YAFROUTEREWRITEOBJ_P(zv)  Z_YAFROUTEREWRITEOBJ(*zv)
30 
31 extern zend_class_entry *yaf_route_rewrite_ce;
32 
33 void yaf_route_rewrite_instance(yaf_route_t *route, zend_string *match, zval *router, zval *verify);
34 int yaf_route_rewrite_route(yaf_route_t *route, yaf_request_t *req);
35 
36 YAF_STARTUP_FUNCTION(route_rewrite);
37 
38 #endif
39 /*
40  * Local variables:
41  * tab-width: 4
42  * c-basic-offset: 4
43  * End:
44  * vim600: noet sw=4 ts=4 fdm=marker
45  * vim<600: noet sw=4 ts=4
46  */
47