Symfony\Component\Routing\RouteCollection::__clone PHP Method

__clone() public method

public __clone ( )
    public function __clone()
    {
        foreach ($this->routes as $name => $route) {
            $this->routes[$name] = clone $route;
            if ($route instanceof RouteCollection) {
                $this->routes[$name]->setParent($this);
            }
        }
    }