/** * @param string $field * @param mixed $value */ public function __set($field, $value) { if (!isset($this->setup[$field])) { throw new PropertyNotFoundException($this->parent, $field); } $value = ValueValidation::fixValue($this->setup[$field], $value); $this->ref_data[$field] = $value; }
/** * @param string $name * @param mixed $value */ public function __set($name, $value) { $this->validateFieldAccess($name, AccessRestriction::NO_SET); $value = ValueValidation::fixValue($this->data[$name], $value); $this->values[$name] = $value; $this->invokeOnSet($name, $value); }
/** * @expectedException \Objection\Exceptions\InvalidValueTypeException */ public function test_fixValue_InvalidInstanceType_ExceptionThrown() { ValueValidation::fixValue(LiteSetup::createInstanceOf(self::class), new \stdClass()); }