Example #1
0
 public function getValue(string $field, $value)
 {
     $this->checkConstraints($field, $value);
     if ($this->transformer) {
         return $this->transformer->transform($value);
     }
     return $value;
 }
Example #2
0
 public function getValue(string $field, $value)
 {
     if ($this->allowNull() && $value === null) {
         return $value;
     }
     $this->checkConstraints($field, $value);
     if ($this->transformer) {
         return $this->transformer->transform($value);
     }
     return $value;
 }