Lines Matching defs:value
23 protected $value;
37 if ($this->value === null || trim($this->value) === "") {
38 throw new ExceptionNotFound("The value was not found for the metadata ($this)");
40 return $this->value;
45 return $this->value !== null;
50 * @param null|string $value
54 public function setValue($value): Metadata
56 if ($value !== null && !is_string($value)) {
57 throw new ExceptionBadArgument("The value of the metadata ($this) is not a string", $this->getCanonical());
59 $value = trim($value);
60 if ($value === "") {
70 if (!in_array($value, $possibleValues)) {
71 throw new ExceptionBadArgument("The value ($value) for the metadata ({$this->getName()}) is not one of the possible following values: " . implode(", ", $possibleValues) . ".");
74 $this->value = $value;
82 public function setFromStoreValue($value): Metadata
84 return $this->setValue($value);
87 public function setFromStoreValueWithoutException($value): Metadata
89 if (empty($value)) {
90 $this->value = null;
93 if (!is_string($value)) {
94 LogUtility::msg("This value of a text metadata is not a string. " . var_export($value, true));
97 $this->value = $value;