/** * @param array|\stdClass $source * @param bool $ignoreGetOnly Don't thrown an exception if Get only property found in the array * @return static */ public function fromArray($source, $ignoreGetOnly = true) { ArrayParser::fromArray($this, $source, $ignoreGetOnly); return $this; }
/** * @expectedException \Objection\Exceptions\ReadOnlyPropertyException */ public function test_fromArray_IgnoreFlagIsFalse_GetOnlyPropertyNotIgnored() { $o = new TestObject_ArrayParser(); ArrayParser::fromArray($o, ['PropGetOnly' => "5"], false); }