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.  */
  27.  
  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. {
  36.     /**
  37.      * Contains the pattern of the matched route, to be used for view matching
  38.      * and filter chain selection.
  39.      *
  40.      * @var string 
  41.      */
  42.     public $matchedRoute;
  43.  
  44.     /**
  45.      * Contains the class name of the controller that should be instantiated
  46.      * for this route.
  47.      *
  48.      * @var string 
  49.      */
  50.     public $controllerClass;
  51.  
  52.     /**
  53.      * Contains the action that the controller should run.
  54.      *
  55.      * @var string 
  56.      */
  57.     public $action;
  58.  
  59.     /**
  60.      * Contains a backlink to the router, so that the dispatcher can pass this
  61.      * on to the created controllers.
  62.      *
  63.      * @var ezcMvcRouter 
  64.      */
  65.     public $router;
  66.  
  67.     /**
  68.      * Constructs a new ezcMvcRoutingInformation.
  69.      *
  70.      * @param string $matchedRoute 
  71.      * @param string $controllerClass 
  72.      * @param string $action 
  73.      * @param ezcMvcRouter $router 
  74.      */
  75.     public function __construct$matchedRoute ''$controllerClass ''$action ''ezcMvcRouter $router null )
  76.     {
  77.         $this->matchedRoute = $matchedRoute;
  78.         $this->controllerClass = $controllerClass;
  79.         $this->action = $action;
  80.         $this->router = $router;
  81.     }
  82.  
  83.     /**
  84.      * Returns a new instance of this class with the data specified by $array.
  85.      *
  86.      * $array contains all the data members of this class in the form:
  87.      * array('member_name'=>value).
  88.      *
  89.      * __set_state makes this class exportable with var_export.
  90.      * var_export() generates code, that calls this method when it
  91.      * is parsed with PHP.
  92.      *
  93.      * @param array(string=>mixed) $array 
  94.      * @return ezcMvcRoutingInformation 
  95.      */
  96.     static public function __set_statearray $array )
  97.     {
  98.         return new ezcMvcRoutingInformation$array['matchedRoute'],
  99.             $array['controllerClass']$array['action']$array['router');
  100.     }
  101. }
  102. ?>
Documentation generated by phpDocumentor 1.4.3