modifs.mineures sans commentaires
This commit is contained in:
parent
2136b45183
commit
16134f7dcd
|
@ -10,13 +10,13 @@ use nur\sery\schema\types\IType;
|
||||||
use nur\sery\schema\Value;
|
use nur\sery\schema\Value;
|
||||||
|
|
||||||
class ScalarValue extends Value {
|
class ScalarValue extends Value {
|
||||||
function __construct(ScalarSchema $schema, &$dest=null, $destKey=null, bool $defaultVerifix=true, bool $defaultThrow=true) {
|
function __construct(ScalarSchema $schema, &$dest=null, $destKey=null, bool $defaultVerifix=true, ?bool $defaultThrow=null) {
|
||||||
$this->schema = $schema;
|
$this->schema = $schema;
|
||||||
$this->defaultVerifix = $defaultVerifix;
|
$this->defaultVerifix = $defaultVerifix;
|
||||||
$this->defaultThrow = false;
|
$this->defaultThrow = $defaultThrow !== null? $defaultThrow: false;
|
||||||
$this->result = new ScalarResult();
|
$this->result = new ScalarResult();
|
||||||
$this->reset($dest, $destKey);
|
$this->reset($dest, $destKey);
|
||||||
$this->defaultThrow = $defaultThrow;
|
$this->defaultThrow = $defaultThrow !== null? $defaultThrow: true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isScalar(?ScalarValue &$scalar=null): bool { $scalar = $this; return true; }
|
function isScalar(?ScalarValue &$scalar=null): bool { $scalar = $this; return true; }
|
||||||
|
|
Loading…
Reference in New Issue