Skip to content

Instantly share code, notes, and snippets.

@toopay
Created August 11, 2012 05:59
Show Gist options
  • Save toopay/3321609 to your computer and use it in GitHub Desktop.
Save toopay/3321609 to your computer and use it in GitHub Desktop.
Routes Juriya
;;;;;;;;;;;;;;;;;;;;
; routes.conf.ini ;
;;;;;;;;;;;;;;;;;;;;
; Request routes configuration
[ROUTES]
; Register and enable route rule
; Prototype :
; dummy.controller = Dummy
; dummy.arguments.0 = user
; dummy.arguments.1 = "/^[0-9]+$/"
; Expected :
; [HTTP]
; GET /dummy/<arg1>/<arg2>
; POST /dummy/<arg1>/<arg2>
; PUT /dummy/<arg1>/<arg2>
; DELETE /dummy/<arg1>/<arg2>
; [CLI]
; php index.php dummy <arg1> <arg2>
;Result :
; success : GET /dummy/user/1
; fail : GET /dummy/anything_else/1
; fail : GET /dummy/user/not_number
; Default route
default.controller = Hello
default.arguments.0 = hello_world
default.arguments.1 = "/^[a-zA-Z0-9_:@\-\s]+$/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment