/**
* Sets the type of the image. Once the type is set,
* it may not be changed later.
*
* @param string $type The type for the image, one of the IMAGE_ constants.
*
* @throws InvalidImageTypeException
*/
protected function setType($type)
{
switch ($type) {
case self::IMAGE_ICLOGO:
case self::IMAGE_TEMP:
case self::IMAGE_PART:
case self::IMAGE_FOOTPRINT:
case self::IMAGE_STORAGELOCATION:
parent::setType($type);
break;
default:
throw new InvalidImageTypeException($type);
}
}