/** * @param mixed $subType */ public function __construct($subType = null) { if ($subType !== null) { $subType = strtoupper((string) $subType); } parent::__construct($subType); }
/** * @param mixed $type */ public function __construct($type = NULL) { if ($type !== NULL) { $type = strtoupper((string) $type); } parent::__construct($type); }
/** * @param mixed $value */ public function __construct($value = null) { if (isset(static::$legacyValueMap[$value])) { GeneralUtility::deprecationLog('Using ' . $value . ' for resolving conflicts in file names is deprecated. Make use of the enumeration "\\TYPO3\\CMS\\Core\\Resource\\DuplicationBehavior" instead.'); $value = static::$legacyValueMap[$value]; } parent::__construct($value); }
/** * Set the Enumeration value to the associated enumeration value by a loose comparison. * The value, that is used as the enumeration value, will be of the same type like defined in the enumeration * * @param mixed $value * @throws Exception\InvalidEnumerationValueException */ protected function setValue($value) { if ($value < 255) { if (($value & self::$allowedValues) !== $value) { throw new Exception\InvalidEnumerationValueException(sprintf('Invalid value %s for %s', $value, __CLASS__), 1457175152); } $this->value = $value; } else { parent::setValue($value); } }