public function setExtensions(array $extensions, $merge = true)
    {
        if ($merge) {
            $extensions = array_unique(array_merge(
                $this->_extensions,
                $extensions
            ));
        }
        $this->_extensions = $extensions;

        return $this;
    }
public function setExtensions(array $extensions, $merge = true)
    {
        if ($merge) {
            $extensions = array_unique(array_merge(
                $this->_extensions,
                $extensions
            ));
        }
        $this->_extensions = $extensions;

        return $this;
    }
public function setExtensions ( array $ extensions , $ merge = true ) { if ( $ merge ) { $ extensions = array_unique ( array_merge ( $ this -> _extensions , $ extensions ) ) ; } $ this -> _extensions = $ extensions ; return $ this ; }
Set the extensions that the route collection can handle.

@param array $extensions The list of extensions to set.
@param bool $merge Whether to merge with or override existing extensions.
Defaults to `true`.
@return $this
Set the extensions that the route collection can handle .