public function set($route)
    {
        if (is_string($route)) {
            $this->routes[] = array(
                    'pattern' => $route
                ) + $this->routeOptions;
        } elseif (is_array($route)) {
            $this->routes[] = $route + $this->routeOptions;
        } else {
            throw new \InvalidArgumentException(sprintf(
                'Expected argument of type string or array, "%s" given',
                is_object($route) ? get_class($route) : gettype($route)
            ));
        }

        return $this;
    }
public function set($route)
    {
        if (is_string($route)) {
            $this->routes[] = array(
                    'pattern' => $route
                ) + $this->routeOptions;
        } elseif (is_array($route)) {
            $this->routes[] = $route + $this->routeOptions;
        } else {
            throw new \InvalidArgumentException(sprintf(
                'Expected argument of type string or array, "%s" given',
                is_object($route) ? get_class($route) : gettype($route)
            ));
        }

        return $this;
    }
public function set ( $ route ) { if ( is_string ( $ route ) ) { $ this -> routes [ ] = array ( 'pattern' => $ route ) + $ this -> routeOptions ; } elseif ( is_array ( $ route ) ) { $ this -> routes [ ] = $ route + $ this -> routeOptions ; } else { throw new \ InvalidArgumentException ( sprintf ( 'Expected argument of type string or array, "%s" given' , is_object ( $ route ) ? get_class ( $ route ) : gettype ( $ route ) ) ) ; } return $ this ; }
Add one route

@param  array $route the options of the route
@throws \InvalidArgumentException When argument is not string or array
@return $this
Add one route