@param string $typeURI

@return self
776675
public function withType($typeURI)
    {
        if ($typeURI == 'about:blank' || filter_var($typeURI, FILTER_VALIDATE_URL) !== false) {
            $this->type = $typeURI;
        } else {
            $this->type = null;
        }

        return $this;
    }
733723
public function withUri(UriInterface $uri, $preserveHost = false)
    {
        if ($this->getUri() === $uri) {
            return $this;
        }

        $newInstance = clone $this;

        $newInstance->setUri($uri);
        if (!$preserveHost) {
            return $newInstance->withHeader('host', $uri->getHost());
        }
        return $newInstance;
    }
1269349
protected function createWhenUri($uri)
    {
        $when = static::$firing['when'];

        if (substr($when, -1) !== '/') {
            $when .= '/';
        }

        if(substr($uri, 0,1) === '/'){
            $uri = substr($uri, 1, strlen($uri));
        }

        return $when.$uri;
    }
696718
public function setBaseUri($uri) : self
    {
        $this->baseUri = $uri instanceof Uri ? $uri : new Uri($uri);

        return $this;
    }
1241557
public function compressFile( $fileUri )
	{
		if( !file_exists( $fileUri ) )
			throw new Exception( "Style File '".$fileUri."' is not existing." );

		$content	= self::compressString( file_get_contents( $fileUri ) );
		$pathName	= dirname( $fileUri );
		$styleFile	= basename( $fileUri );
		$styleName	= preg_replace( "@\.css$@", "", $styleFile );
		$fileName	= $this->prefix.$styleName.$this->suffix.".css";
		$fileUri	= $pathName."/".$fileName;
		$fileUri	= str_replace( "\\", "/", $fileUri );
		file_put_contents( $fileUri, $content );
		return $fileUri;
	}
971541
public static function with(string $type, string $value): self
    {
        $targetType = strtolower($type);

        $new = new self();
        $new->type = $targetType;

        switch ($targetType) {
            case self::CONDITION:
                $new->value = (string) Condition::fromValue($value);
                break;
            case self::TOKEN:
                $new->value = (string) RegistrationToken::fromValue($value);
                break;
            case self::TOPIC:
                $new->value = (string) Topic::fromValue($value);
                break;
            default:
                throw new InvalidArgumentException('Invalid target type "'.$type.'", valid type: "'.implode(', ', self::TYPES));
        }

        return $new;
    }
901989
public function setType(string $type):self
    {
        if (!isset($this->types[$type])) {
            Checkers::notice('Unknown response type [' . $type . ']');
        } else {
            $this->type = $type;
        }
        return $this;
    }
646372
public function withType(Type $type): self
    {
        $metadata = clone $this;
        $metadata->type = $type;

        return $metadata;
    }
50903
public function setRedirectType($type) {
        if (!is_int($type)) throw new IllegalTypeException('Illegal type of parameter $type: '.gettype($type));

        $this->redirectType = $type;
        return $this;
    }
621913
function append(iUriSequence $appendUri)
    {
        $appendPath = $appendUri->getPath();
        /*if ($appendUri->isAbsolute())
            $appendPath = $this->_makeNoneAbsolutePathSequence($appendPath);*/

        $finalPath = array_merge($this->getPath(), $appendPath);
        $this->setPath($finalPath);

        return $this;
    }
700807
public function pageType($typeOrId)
    {
        $this->pageTypeId = $typeOrId instanceof PageType ? $typeOrId->getId() : $typeOrId;
        $this->query->where('page_type', $this->pageTypeId);
        return $this;
    }
193687
public function typeIs($value)
    {
        $this->add(new Criterium(self::CRITERIUM_TYPE_IS, (int) $value));

        return $this;
    }
203064
public function withType(string $type): self
    {
        $this->type = UserPermissionEnum::ensureValid($type);
        return $this;
    }
326498
public function setUri($uri)
	{
		if (filter_var($uri, FILTER_VALIDATE_URL)) {
			$this->uri = $uri;
		} else {
			throw new RuntimeException('Invalid URI setted.');
		}
		
		return $this;
	}
788476
public function post(string $uri, $action): self
    {
        $this->routes['POST'][$this->trimTrailingSlashes($uri)] = $action;

        return $this;
    }
354463
public function setUri($uri)
    {
        if (in_array($uri, $this->uris, TRUE)) {
            throw new \Exception('Redirecting loop detected');
        }
        $this->uris[] = $uri;
        return $this;
    }
435439
public function type($type = null)
    {
        if (is_null($type)) {
            unset($this->filters['post_type']);
        } else {
            $this->filters['post_type'] = $type;
        }
        return $this;
    }