public function setSubstring($substring)
    {
        if (is_bool($substring)) {
            $this->substring = $substring;
        } else {
            $msg = "The substring argument must be a boolean, '" . gettype($substring) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }