Example #1
0
 /**
  * @param Route $route
  */
 private function _addRoute(Route $route)
 {
     if (!$route->getDrop()) {
         return;
     }
     if ($route->getLength() < $this->_maxKnownLength) {
         return;
     }
     if (($len = $route->getLength()) > ($drop = $route->getDrop()) + 1) {
         throw new \LogicException('Length ' . $len . ' is too large comparing to drop ' . $drop);
     }
     if ($len > $this->_maxKnownLength) {
         $this->_routes = array();
         self::_log("\tflush routes, " . $len);
     }
     $this->_routes[] = $route;
     $this->_maxKnownLength = $len;
 }