PHP Classes

File: test/php/out1.txt

Recommend this page to a friend!
  Classes of Nikos M.  >  Dromeo PHP Router Library  >  test/php/out1.txt  >  Download  
File: test/php/out1.txt
Role: Documentation
Content type: text/plain
Description: Documentation
Class: Dromeo PHP Router Library
Route HTTP requests to functions with URL patterns
Author: By
Last change: v.1.2.0 in progress

* onGroup method to group routes under common (literal) prefix (in progress)
* handle edge case in makePattern
* original matched extracts contain same defaults (if given)
* fix typo in PHP,JS in clearRoute
* update tests
Date: 3 months ago
Size: 2,817 bytes
 

Contents

Class file image Download
Dromeo.VERSION = 1.2.0 Route Handler Called Route: http://abc.org/users/abcd12/23/soo?preview=prev+iew&foo=bar Params: array(7) { ["foo"]=> string(3) "soo" ["once"]=> string(4) "once" ["default_part"]=> int(1) ["group"]=> string(5) "users" ["user"]=> string(6) "abcd12" ["id"]=> int(23) ["rest"]=> string(25) "?preview=prev+iew&foo=bar" } Route Handler Called Route: http://abc.org/users/abcd12/23/soo?preview=prev+iew&foo=bar Params: array(6) { ["foo"]=> string(3) "soo" ["const_pattern"]=> string(13) "const_pattern" ["group"]=> string(5) "users" ["user"]=> string(6) "abcd12" ["id"]=> int(23) ["rest"]=> string(25) "?preview=prev+iew&foo=bar" } Literal Post Handler Called Route: http://literal.abc.org/ Params: array(3) { ["foo"]=> string(3) "moo" ["extra"]=> string(5) "extra" ["literal_route"]=> int(1) } Literal Route Handler Called Route: http://literal.abc.org/ Params: array(3) { ["foo"]=> string(3) "moo" ["extra"]=> string(5) "extra" ["literal_route"]=> int(1) } Parse URI: http://abc.org/path/to/page/?abcd%5B0%5D=1&abcd%5B1%5D=2&foo=a%20string%20with%20spaces%20and%20%2B&moo%5Bsoo%5D=1&moo%5Btoo%5D=2#def%5B0%5D=1&def%5B1%5D=2&foo%5Bsoo%5D=1 Array ( [scheme] => http [host] => abc.org [path] => /path/to/page/ [query] => abcd%5B0%5D=1&abcd%5B1%5D=2&foo=a%20string%20with%20spaces%20and%20%2B&moo%5Bsoo%5D=1&moo%5Btoo%5D=2 [fragment] => def%5B0%5D=1&def%5B1%5D=2&foo%5Bsoo%5D=1 [query_params] => Array ( [abcd] => Array ( [0] => 1 [1] => 2 ) [foo] => a string with spaces and + [moo] => Array ( [soo] => 1 [too] => 2 ) ) [fragment_params] => Array ( [def] => Array ( [0] => 1 [1] => 2 ) [foo] => Array ( [soo] => 1 ) ) ) Build URI http://abc.org/path/to/page/?abcd%5B0%5D=1&abcd%5B1%5D=2&foo=a%20string%20with%20spaces%20and%20%2B&moo%5Bsoo%5D=1&moo%5Btoo%5D=2#def%5B0%5D=1&def%5B1%5D=2&foo%5Bsoo%5D=1 Parse QUERY: key1=val1&key2[key3]=val2&key2[key4]=val3&key5[key6][]=val4&key5[key6][]=val5&key7[0]=val6&key7[1]=val7 Array ( [key1] => val1 [key2] => Array ( [key3] => val2 [key4] => val3 ) [key5] => Array ( [key6] => Array ( [0] => val4 [1] => val5 ) ) [key7] => Array ( [0] => val6 [1] => val7 ) )