public function setUrlType($type)
    {
        if (!in_array($type, [self::URL_APPEND, self::URL_CLEAN])) {
            throw new \Exception("Unsupported Url type.");
        }

        $this->urlType = $type;
        return $this;
    }
public function setUrlType($type)
    {
        if (!in_array($type, [self::URL_APPEND, self::URL_CLEAN])) {
            throw new \Exception("Unsupported Url type.");
        }

        $this->urlType = $type;
        return $this;
    }
public function setUrlType ( $ type ) { if ( ! in_array ( $ type , [ self :: URL_APPEND , self :: URL_CLEAN ] ) ) { throw new \ Exception ( "Unsupported Url type." ) ; } $ this -> urlType = $ type ; return $ this ; }
Set the type of urls to be generated, URL_CLEAN, URL_APPEND.

@param string $type what type of urls to create.

@return $this
Set the type of urls to be generated URL_CLEAN URL_APPEND .