We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e17f527 + 211518c commit 9ed02c4Copy full SHA for 9ed02c4
1 file changed
src/Json/JsonInspector.php
@@ -13,8 +13,17 @@ class JsonInspector
13
14
public function __construct($evaluationMode)
15
{
16
+ $magicMethods = defined(PropertyAccessor::class.'::DISALLOW_MAGIC_METHODS')
17
+ ? PropertyAccessor::MAGIC_GET | PropertyAccessor::MAGIC_SET
18
+ : false
19
+ ;
20
+ $throwException = defined(PropertyAccessor::class.'::DO_NOT_THROW')
21
+ ? PropertyAccessor::THROW_ON_INVALID_INDEX | PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH
22
+ : true
23
24
+
25
$this->evaluationMode = $evaluationMode;
- $this->accessor = new PropertyAccessor(false, true);
26
+ $this->accessor = new PropertyAccessor($magicMethods, $throwException);
27
}
28
29
public function evaluate(Json $json, $expression)
0 commit comments