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);
        }
    }
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);
        }
    }
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 ) ; } }
Set the substring attribute.

@param boolean $substring A boolean value.
@throws \InvalidArgumentException If $substring is not a boolean.
@deprecated
Set the substring attribute .