public function setAlt($alt)
    {
        if (is_string($alt)) {
            $this->alt = $alt;
        } else {
            $msg = "The 'alt' argument must be a string, '" . gettype($alt) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setAlt($alt)
    {
        if (is_string($alt)) {
            $this->alt = $alt;
        } else {
            $msg = "The 'alt' argument must be a string, '" . gettype($alt) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setAlt ( $ alt ) { if ( is_string ( $ alt ) ) { $ this -> alt = $ alt ; } else { $ msg = "The 'alt' argument must be a string, '" . gettype ( $ alt ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the alt attribute.

@param string $alt A string
@throws \InvalidArgumentException If $alt is not a string.
Set the alt attribute .