public function setSize($size) { if ($size && isset(static::$ALLOWED_SIZES[$size])) { $this->size = $size; } return $this; }