PartKeepr\ImageBundle\Entity\Image::setType PHP Method

setType() protected method

Sets the type of the image. Once the type is set, it may not be changed later.
protected setType ( string $type )
$type string The type for the image, one of the IMAGE_ constants.
    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);
        }
    }