## Apache Zeta Components Manual :: File Source for routing_information.php

## Source for file routing_information.php

Documentation is available at routing_information.php

1. <?php
2. /**
3. * File containing the ezcMvcRoutingInformation class
4. *
5. * Licensed to the Apache Software Foundation (ASF) under one
6. * or more contributor license agreements. See the NOTICE file
7. * distributed with this work for additional information
8. * regarding copyright ownership. The ASF licenses this file
9. * to you under the Apache License, Version 2.0 (the
10. * "License"); you may not use this file except in compliance
11. * with the License. You may obtain a copy of the License at
12. *
13. * http://www.apache.org/licenses/LICENSE-2.0
14. *
15. * Unless required by applicable law or agreed to in writing,
16. * software distributed under the License is distributed on an
17. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18. * KIND, either express or implied. See the License for the
19. * specific language governing permissions and limitations
20. * under the License.
21. *
22. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
23. * @version //autogentag//
24. * @filesource
25. * @package MvcTools
26. */
28. /**
29. * This struct contains information from the router that belongs to the matched
30. * route.
31. *
32. * @package MvcTools
33. * @version //autogentag//
34. */
35. class ezcMvcRoutingInformation extends ezcBaseStruct
36. {
37. /**
38. * Contains the pattern of the matched route, to be used for view matching
39. * and filter chain selection.
40. *
41. * @var string
42. */
43. public $matchedRoute ;
45. /**
46. * Contains the class name of the controller that should be instantiated
47. * for this route.
48. *
49. * @var string
50. */
51. public $controllerClass ;
53. /**
54. * Contains the action that the controller should run.
55. *
56. * @var string
57. */
58. public $action ;
60. /**
61. * Contains a backlink to the router, so that the dispatcher can pass this
62. * on to the created controllers.
63. *
64. * @var ezcMvcRouter
65. */
66. public $router ;
68. /**
69. * Constructs a new ezcMvcRoutingInformation.
70. *
71. * @param string $matchedRoute
72. * @param string $controllerClass
73. * @param string $action
74. * @param ezcMvcRouter $router
75. */
76. public function __construct ( $matchedRoute = '', $controllerClass = '', $action = '', ezcMvcRouter $router = null )
77. {
78. $this-> matchedRoute = $matchedRoute;
79. $this-> controllerClass = $controllerClass;
80. $this-> action = $action;
81. $this-> router = $router;
82. }
84. /**
85. * Returns a new instance of this class with the data specified by $array.
86. *
87. * $array contains all the data members of this class in the form:
88. * array('member_name'=>value).
89. *
90. * __set_state makes this class exportable with var_export.
91. * var_export() generates code, that calls this method when it
92. * is parsed with PHP.
93. *
94. * @param array(string=>mixed) $array
95. * @return ezcMvcRoutingInformation
96. */
97. static public function __set_state ( array $array )
98. {
99. return new ezcMvcRoutingInformation( $array['matchedRoute'],
100. $array['controllerClass'], $array['action'], $array['router'] );
101. }
102. }
103. ?>

Documentation generated by phpDocumentor 1.4.3