public function addMapping($destinationPattern, $controllerClass, $actionName)
    {
        $mapping = new Route\Mapping($destinationPattern, $controllerClass, $actionName);

        $this->reverseMapping[$controllerClass][$actionName] = $mapping;

        $destinationPieces = explode('/', $destinationPattern);

        $mappingNode = &$this->routeMapping;
        foreach($destinationPieces as $destinationPiece) {
            if ($this->isWildcard($destinationPiece)) {
                if (!isset($mappingNode['_wildcard'])) {
                    $mappingNode['_wildcard'] = null;
                }
                $mappingNode = &$mappingNode['_wildcard'];
            } else {
                if (!isset($mappingNode[$destinationPiece])) {
                    $mappingNode[$destinationPiece] = null;
                }
                $mappingNode = &$mappingNode[$destinationPiece];
            }
        }
        $mappingNode['_mapping'] = $mapping;

        return $mapping;
    }
public function addMapping($destinationPattern, $controllerClass, $actionName)
    {
        $mapping = new Route\Mapping($destinationPattern, $controllerClass, $actionName);

        $this->reverseMapping[$controllerClass][$actionName] = $mapping;

        $destinationPieces = explode('/', $destinationPattern);

        $mappingNode = &$this->routeMapping;
        foreach($destinationPieces as $destinationPiece) {
            if ($this->isWildcard($destinationPiece)) {
                if (!isset($mappingNode['_wildcard'])) {
                    $mappingNode['_wildcard'] = null;
                }
                $mappingNode = &$mappingNode['_wildcard'];
            } else {
                if (!isset($mappingNode[$destinationPiece])) {
                    $mappingNode[$destinationPiece] = null;
                }
                $mappingNode = &$mappingNode[$destinationPiece];
            }
        }
        $mappingNode['_mapping'] = $mapping;

        return $mapping;
    }
public function addMapping ( $ destinationPattern , $ controllerClass , $ actionName ) { $ mapping = new Route \ Mapping ( $ destinationPattern , $ controllerClass , $ actionName ) ; $ this -> reverseMapping [ $ controllerClass ] [ $ actionName ] = $ mapping ; $ destinationPieces = explode ( '/' , $ destinationPattern ) ; $ mappingNode = & $ this -> routeMapping ; foreach ( $ destinationPieces as $ destinationPiece ) { if ( $ this -> isWildcard ( $ destinationPiece ) ) { if ( ! isset ( $ mappingNode [ '_wildcard' ] ) ) { $ mappingNode [ '_wildcard' ] = null ; } $ mappingNode = & $ mappingNode [ '_wildcard' ] ; } else { if ( ! isset ( $ mappingNode [ $ destinationPiece ] ) ) { $ mappingNode [ $ destinationPiece ] = null ; } $ mappingNode = & $ mappingNode [ $ destinationPiece ] ; } } $ mappingNode [ '_mapping' ] = $ mapping ; return $ mapping ; }
Add route mapping

@param string $destinationPattern Destination pattern
@param string $controllerClass    Controller class
@param string $actionName         Action name

@return \Shade\Route\Mapping

@throws Exception
Add route mapping