web/lib/Zend/Controller/Router/Route/Static.php
changeset 1230 68c69c656a2c
parent 807 877f952ae2bd
--- a/web/lib/Zend/Controller/Router/Route/Static.php	Thu May 07 15:10:09 2015 +0200
+++ b/web/lib/Zend/Controller/Router/Route/Static.php	Thu May 07 15:16:02 2015 +0200
@@ -15,8 +15,8 @@
  * @category   Zend
  * @package    Zend_Controller
  * @subpackage Router
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @version    $Id: Static.php 24593 2012-01-05 20:35:02Z matthew $
+ * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @version    $Id$
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
@@ -30,16 +30,33 @@
  *
  * @package    Zend_Controller
  * @subpackage Router
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 class Zend_Controller_Router_Route_Static extends Zend_Controller_Router_Route_Abstract
 {
 
+    /**
+     * Route
+     *
+     * @var string|null
+     */
     protected $_route = null;
+
+    /**
+     * Default values for the route (ie. module, controller, action, params)
+     *
+     * @var array
+     */
     protected $_defaults = array();
 
-    public function getVersion() {
+    /**
+     * Get the version of the route
+     *
+     * @return int
+     */
+    public function getVersion()
+    {
         return 1;
     }
 
@@ -47,22 +64,24 @@
      * Instantiates route based on passed Zend_Config structure
      *
      * @param Zend_Config $config Configuration object
+     * @return Zend_Controller_Router_Route_Static
      */
     public static function getInstance(Zend_Config $config)
     {
         $defs = ($config->defaults instanceof Zend_Config) ? $config->defaults->toArray() : array();
+
         return new self($config->route, $defs);
     }
 
     /**
      * Prepares the route for mapping.
      *
-     * @param string $route Map used to match with later submitted URL path
-     * @param array $defaults Defaults for map variables with keys as variable names
+     * @param string $route    Map used to match with later submitted URL path
+     * @param array  $defaults Defaults for map variables with keys as variable names
      */
     public function __construct($route, $defaults = array())
     {
-        $this->_route = trim($route, self::URI_DELIMITER);
+        $this->_route    = trim($route, self::URI_DELIMITER);
         $this->_defaults = (array) $defaults;
     }
 
@@ -80,6 +99,7 @@
                 || (substr($path, 0, strlen($this->_route)) === $this->_route)
             ) {
                 $this->setMatchedPath($this->_route);
+
                 return $this->_defaults;
             }
         } else {
@@ -108,10 +128,12 @@
      * @param string $name Array key of the parameter
      * @return string Previously set default
      */
-    public function getDefault($name) {
+    public function getDefault($name)
+    {
         if (isset($this->_defaults[$name])) {
             return $this->_defaults[$name];
         }
+
         return null;
     }
 
@@ -120,8 +142,8 @@
      *
      * @return array Route defaults
      */
-    public function getDefaults() {
+    public function getDefaults()
+    {
         return $this->_defaults;
     }
-
 }