type = $type; $this->language = $language; $this->setValue($value); } /** * Get id * * @return int * * @since 1.0.0 */ public function getId() : int { return $this->id; } /** * Set value type * * @param int $type Type * * @return void * * @since 1.0.0 */ public function setType(int $type) : void { $this->type = $type; } /** * Set value * * @param int|string|float $value Value * * @return void * * @since 1.0.0 */ public function setValue($value) : void { if (\is_string($value)) { $this->valueStr = $value; } elseif (\is_int($value)) { $this->valueInt = $value; } elseif (\is_float($value)) { $this->valueDec = $value; } elseif ($value instanceof \DateTimeInterface) { $this->valueDat = $value; } } /** * Set value * * @param int $value Value * * @return void * * @since 1.0.0 */ public function setValueInt(int $value) : void { $this->valueInt = $value; } /** * Set value * * @param string $value Value * * @return void * * @since 1.0.0 */ public function setValueString(string $value) : void { $this->valueString = $value; } /** * Set value * * @param float $value Value * * @return void * * @since 1.0.0 */ public function setValueDecimal(float $value) : void { $this->valueDec = $value; } /** * Set value * * @param \DateTimeInterface $value Value * * @return void * * @since 1.0.0 */ public function setValueDat(\DateTimeInterface $value) : void { $this->valueDat = $value; } /** * Set default * * @param bool $isDefault Default * * @return void * * @since 1.0.0 */ public function setDefault(bool $isDefault) : void { $this->isDefault = $isDefault; } /** * Is default value? * * @return bool * * @since 1.0.0 */ public function isDefault() : bool { return $this->isDefault; } /** * Set language * * @param string $language Language * * @return void * * @since 1.0.0 */ public function setLanguage(string $language) : void { $this->language = $language; } /** * Set country * * @param string $country Country * * @return void * * @since 1.0.0 */ public function setCountry(string $country) : void { $this->country = $country; } /** * {@inheritdoc} */ public function toArray() : array { return []; } /** * {@inheritdoc} */ public function jsonSerialize() { return $this->toArray(); } }