Advertisement
fruffl

URI Component as Enum

Aug 23rd, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 10.58 KB | None | 0 0
  1. <?PHP
  2.     $foo = new \ILLI\System\Uri;
  3.     $foo->host = 'pastebin.com/myworrrrrrrrrrrl';
  4.     $foo->userInfo->username = 'me';
  5.     $foo->userInfo->password = 'secret';
  6.     $foo->absolutePath = '/foobar/';
  7.     var_dump($foo->httpRequestUrL());
  8.  
  9. ?>
  10.  
  11. object(ILLI\System\Uri)#23 (13) {
  12.   ["__UriComponents":"ILLI\System\Uri":private]=>
  13.   object(ILLI\System\eUriComponents)#32 (8) {
  14.     ["__tEnum_Flag":"ILLI\Core\Enum":private]=>
  15.     object(ILLI\Core\Bitwise)#48 (1) {
  16.       ["__bits":"ILLI\Core\Bitwise":private]=>
  17.       int(61)
  18.     }
  19.     ["__tEnum_constantRequest":"ILLI\Core\Enum":private]=>
  20.     string(16) "HTTP_REQUEST_URL"
  21.     ["__tEnum_variableRequest":"ILLI\Core\Enum":private]=>
  22.     string(14) "httpRequestUrl"
  23.     ["__tEnum_methodRequest":"ILLI\Core\Enum":private]=>
  24.     string(14) "httpRequestUrL"
  25.     ["__tEnum_variablesHook":"ILLI\Core\Enum":private]=>
  26.     array(5) {
  27.       [1]=>
  28.       string(6) "scheme"
  29.       [4]=>
  30.       string(4) "host"
  31.       [8]=>
  32.       string(4) "port"
  33.       [16]=>
  34.       string(9) "localPath"
  35.       [32]=>
  36.       string(5) "query"
  37.     }
  38.     ["__tEnum_constantsHook":"ILLI\Core\Enum":private]=>
  39.     array(5) {
  40.       [1]=>
  41.       string(6) "SCHEME"
  42.       [4]=>
  43.       string(4) "HOST"
  44.       [8]=>
  45.       string(4) "PORT"
  46.       [16]=>
  47.       string(10) "LOCAL_PATH"
  48.       [32]=>
  49.       string(5) "QUERY"
  50.     }
  51.     ["__tEnum_integerHook":"ILLI\Core\Enum":private]=>
  52.     array(5) {
  53.       [0]=>
  54.       int(1)
  55.       [1]=>
  56.       int(4)
  57.       [2]=>
  58.       int(8)
  59.       [3]=>
  60.       int(16)
  61.       [4]=>
  62.       int(32)
  63.     }
  64.     ["__tEnum_bitwiseHook":"ILLI\Core\Enum":private]=>
  65.     array(6) {
  66.       [0]=>
  67.       string(1) "1"
  68.       [1]=>
  69.       string(1) "0"
  70.       [2]=>
  71.       string(1) "1"
  72.       [3]=>
  73.       string(1) "1"
  74.       [4]=>
  75.       string(1) "1"
  76.       [5]=>
  77.       string(1) "1"
  78.     }
  79.   }
  80.   ["__tSplHashRegister_Address":"ILLI\Core\Object":private]=>
  81.   string(32) "000000003626257a0000000011bfc5d8"
  82.   ["__tAdapter_tracesEnabled":"ILLI\Core\Object":private]=>
  83.   bool(false)
  84.   ["__tAdapter_traces":"ILLI\Core\Object":private]=>
  85.   array(0) {
  86.   }
  87.   ["__tAdapter_hook":protected]=>
  88.   array(0) {
  89.   }
  90.   ["__tObserver_tracesEnabled":"ILLI\Core\Object":private]=>
  91.   bool(false)
  92.   ["__tObserver_traces":"ILLI\Core\Object":private]=>
  93.   array(0) {
  94.   }
  95.   ["__tObserver_hook":protected]=>
  96.   array(0) {
  97.   }
  98.   ["__tFilter_tracesEnabled":"ILLI\Core\Object":private]=>
  99.   bool(false)
  100.   ["__tFilter_traces":"ILLI\Core\Object":private]=>
  101.   array(0) {
  102.   }
  103.   ["__tFilter_hook":protected]=>
  104.   array(1) {
  105.     ["ILLI\Core\Table::__set"]=>
  106.     array(1) {
  107.       [0]=>
  108.       object(ILLI\Core\ConcreteCallableFilter)#70 (3) {
  109.         ["__event":"ILLI\Core\ConcreteCallableFilter":private]=>
  110.         int(61442)
  111.         ["__Trigger":"ILLI\Core\ConcreteCallableFilter":private]=>
  112.         object(ILLI\Core\Method)#71 (3) {
  113.           ["__class":protected]=>
  114.           string(15) "ILLI\Core\Table"
  115.           ["__function":protected]=>
  116.           string(5) "__set"
  117.           ["__method":protected]=>
  118.           string(22) "ILLI\Core\Table::__set"
  119.         }
  120.         ["__Callable":protected]=>
  121.         object(ILLI\Core\InvokeClosure)#72 (1) {
  122.           ["__Callable":protected]=>
  123.           object(Closure)#69 (3) {
  124.             ["static"]=>
  125.             array(1) {
  126.               ["self"]=>
  127.               *RECURSION*
  128.             }
  129.             ["this"]=>
  130.             *RECURSION*
  131.             ["parameter"]=>
  132.             array(1) {
  133.               ["$data"]=>
  134.               string(10) "<required>"
  135.             }
  136.           }
  137.         }
  138.       }
  139.     }
  140.   }
  141.   ["__tVirtualMethod_hook":protected]=>
  142.   array(0) {
  143.   }
  144.   ["__tStorage_Data":"ILLI\Core\Table":private]=>
  145.   object(ILLI\Core\FacadeArrayList)#67 (1) {
  146.     ["__Collection":protected]=>
  147.     object(ILLI\Core\Collection)#68 (6) {
  148.       ["__data":"ILLI\Core\Collection":private]=>
  149.       array(21) {
  150.         ["absolutePath"]=>
  151.         string(8) "/foobar/"
  152.         ["absoluteUri"]=>
  153.         string(0) ""
  154.         ["authority"]=>
  155.         string(0) ""
  156.         ["dnsSafeHost"]=>
  157.         string(0) ""
  158.         ["fragment"]=>
  159.         string(0) ""
  160.         ["host"]=>
  161.         string(12) "pastebin.com"
  162.         ["hostNameType"]=>
  163.         string(0) ""
  164.         ["isAbsolute"]=>
  165.         bool(false)
  166.         ["isDefaultPort"]=>
  167.         bool(false)
  168.         ["isFile"]=>
  169.         bool(false)
  170.         ["isLoopBack"]=>
  171.         bool(false)
  172.         ["isUnc"]=>
  173.         bool(false)
  174.         ["isUserEscaped"]=>
  175.         bool(false)
  176.         ["localPath"]=>
  177.         string(0) ""
  178.         ["originalString"]=>
  179.         string(0) ""
  180.         ["pathAndQuery"]=>
  181.         string(0) ""
  182.         ["port"]=>
  183.         string(0) ""
  184.         ["query"]=>
  185.         string(0) ""
  186.         ["scheme"]=>
  187.         string(0) ""
  188.         ["segments"]=>
  189.         array(0) {
  190.         }
  191.         ["userInfo"]=>
  192.         object(ILLI\System\UserInfo)#50 (12) {
  193.           ["__tSplHashRegister_Address":"ILLI\Core\Object":private]=>
  194.           string(32) "000000003626255f0000000011bfc5d8"
  195.           ["__tAdapter_tracesEnabled":"ILLI\Core\Object":private]=>
  196.           bool(false)
  197.           ["__tAdapter_traces":"ILLI\Core\Object":private]=>
  198.           array(0) {
  199.           }
  200.           ["__tAdapter_hook":protected]=>
  201.           array(0) {
  202.           }
  203.           ["__tObserver_tracesEnabled":"ILLI\Core\Object":private]=>
  204.           bool(false)
  205.           ["__tObserver_traces":"ILLI\Core\Object":private]=>
  206.           array(0) {
  207.           }
  208.           ["__tObserver_hook":protected]=>
  209.           array(0) {
  210.           }
  211.           ["__tFilter_tracesEnabled":"ILLI\Core\Object":private]=>
  212.           bool(false)
  213.           ["__tFilter_traces":"ILLI\Core\Object":private]=>
  214.           array(0) {
  215.           }
  216.           ["__tFilter_hook":protected]=>
  217.           array(1) {
  218.             ["ILLI\Core\Table::__set"]=>
  219.             array(1) {
  220.               [0]=>
  221.               object(ILLI\Core\ConcreteCallableFilter)#61 (3) {
  222.                 ["__event":"ILLI\Core\ConcreteCallableFilter":private]=>
  223.                 int(61442)
  224.                 ["__Trigger":"ILLI\Core\ConcreteCallableFilter":private]=>
  225.                 object(ILLI\Core\Method)#63 (3) {
  226.                   ["__class":protected]=>
  227.                   string(15) "ILLI\Core\Table"
  228.                   ["__function":protected]=>
  229.                   string(5) "__set"
  230.                   ["__method":protected]=>
  231.                   string(22) "ILLI\Core\Table::__set"
  232.                 }
  233.                 ["__Callable":protected]=>
  234.                 object(ILLI\Core\InvokeClosure)#66 (1) {
  235.                   ["__Callable":protected]=>
  236.                   object(Closure)#58 (3) {
  237.                     ["static"]=>
  238.                     array(1) {
  239.                       ["self"]=>
  240.                       *RECURSION*
  241.                     }
  242.                     ["this"]=>
  243.                     *RECURSION*
  244.                     ["parameter"]=>
  245.                     array(1) {
  246.                       ["$data"]=>
  247.                       string(10) "<required>"
  248.                     }
  249.                   }
  250.                 }
  251.               }
  252.             }
  253.           }
  254.           ["__tVirtualMethod_hook":protected]=>
  255.           array(0) {
  256.           }
  257.           ["__tStorage_Data":"ILLI\Core\Table":private]=>
  258.           object(ILLI\Core\FacadeArrayList)#53 (1) {
  259.             ["__Collection":protected]=>
  260.             object(ILLI\Core\Collection)#56 (6) {
  261.               ["__data":"ILLI\Core\Collection":private]=>
  262.               array(2) {
  263.                 ["username"]=>
  264.                 string(2) "me"
  265.                 ["password"]=>
  266.                 string(6) "secret"
  267.               }
  268.               ["__offsets":"ILLI\Core\Collection":private]=>
  269.               array(2) {
  270.                 [0]=>
  271.                 string(8) "username"
  272.                 [1]=>
  273.                 string(8) "password"
  274.               }
  275.               ["__indexes":"ILLI\Core\Collection":private]=>
  276.               array(2) {
  277.                 ["username"]=>
  278.                 int(0)
  279.                 ["password"]=>
  280.                 int(1)
  281.               }
  282.               ["__iteratorIndex":"ILLI\Core\Collection":private]=>
  283.               int(0)
  284.               ["__lastOffsetUpdate":"ILLI\Core\Collection":private]=>
  285.               string(8) "password"
  286.               ["__lastOffsetInsert":"ILLI\Core\Collection":private]=>
  287.               NULL
  288.             }
  289.           }
  290.         }
  291.       }
  292.       ["__offsets":"ILLI\Core\Collection":private]=>
  293.       array(21) {
  294.         [0]=>
  295.         string(12) "absolutePath"
  296.         [1]=>
  297.         string(11) "absoluteUri"
  298.         [2]=>
  299.         string(9) "authority"
  300.         [3]=>
  301.         string(11) "dnsSafeHost"
  302.         [4]=>
  303.         string(8) "fragment"
  304.         [5]=>
  305.         string(4) "host"
  306.         [6]=>
  307.         string(12) "hostNameType"
  308.         [7]=>
  309.         string(10) "isAbsolute"
  310.         [8]=>
  311.         string(13) "isDefaultPort"
  312.         [9]=>
  313.         string(6) "isFile"
  314.         [10]=>
  315.         string(10) "isLoopBack"
  316.         [11]=>
  317.         string(5) "isUnc"
  318.         [12]=>
  319.         string(13) "isUserEscaped"
  320.         [13]=>
  321.         string(9) "localPath"
  322.         [14]=>
  323.         string(14) "originalString"
  324.         [15]=>
  325.         string(12) "pathAndQuery"
  326.         [16]=>
  327.         string(4) "port"
  328.         [17]=>
  329.         string(5) "query"
  330.         [18]=>
  331.         string(6) "scheme"
  332.         [19]=>
  333.         string(8) "segments"
  334.         [20]=>
  335.         string(8) "userInfo"
  336.       }
  337.       ["__indexes":"ILLI\Core\Collection":private]=>
  338.       array(21) {
  339.         ["absolutePath"]=>
  340.         int(0)
  341.         ["absoluteUri"]=>
  342.         int(1)
  343.         ["authority"]=>
  344.         int(2)
  345.         ["dnsSafeHost"]=>
  346.         int(3)
  347.         ["fragment"]=>
  348.         int(4)
  349.         ["host"]=>
  350.         int(5)
  351.         ["hostNameType"]=>
  352.         int(6)
  353.         ["isAbsolute"]=>
  354.         int(7)
  355.         ["isDefaultPort"]=>
  356.         int(8)
  357.         ["isFile"]=>
  358.         int(9)
  359.         ["isLoopBack"]=>
  360.         int(10)
  361.         ["isUnc"]=>
  362.         int(11)
  363.         ["isUserEscaped"]=>
  364.         int(12)
  365.         ["localPath"]=>
  366.         int(13)
  367.         ["originalString"]=>
  368.         int(14)
  369.         ["pathAndQuery"]=>
  370.         int(15)
  371.         ["port"]=>
  372.         int(16)
  373.         ["query"]=>
  374.         int(17)
  375.         ["scheme"]=>
  376.         int(18)
  377.         ["segments"]=>
  378.         int(19)
  379.         ["userInfo"]=>
  380.         int(20)
  381.       }
  382.       ["__iteratorIndex":"ILLI\Core\Collection":private]=>
  383.       int(0)
  384.       ["__lastOffsetUpdate":"ILLI\Core\Collection":private]=>
  385.       string(12) "absolutePath"
  386.       ["__lastOffsetInsert":"ILLI\Core\Collection":private]=>
  387.       NULL
  388.     }
  389.   }
  390. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement