Class AndOperator
Implementierung der UND-Regel. Es werden von den beiden Operanden jeweils die Constraint::isValid Methode aufgerufen und das Ergebnis mit UND verknüpft.
$operatorA = new \Alvine\Util\Constraint\Number(10, 40, true, true, 0); $operatorB = new \Alvine\Util\Constraint\Number(30, 70, true, true, 0); // Einzelprüfung echo $operatorA->isValid(12)?'true':'false'; // false echo $operatorB->isValid(70)?'true':'false'; // true // Und-Operation (Wert soll im BereichA oder B liegen) $or = new Alvine\Util\Constraint\AndOperator($operatorA, $operatorB); echo $or->isValid(30)?'true':'false'; // true echo $or->isValid(38)?'true':'false'; // true echo $or->isValid(45)?'true':'false'; // false
Der Aufruf der Regeln erfolgt rekursiv durch alle verknüpfte Constraints. Nur wenn alle Constraint true zurückgeben ist das Gesamtergebnis true
- Alvine\Core\Alvine implements Serializable uses Alvine\Core\SerializableImplementation
- Alvine\Util\Constraint
- Alvine\Util\Constraint\Operator
- Alvine\Util\Constraint\AndOperator
Namespace: Alvine\Util\Constraint
Package: Alvine\Util\Constraint
Category: Framework
License: Licence
Author: schukai GmbH info@schukai.de
Version: Release: $Revision: 173 $
Since: 20110904
Link: Alvine
Link: Constraintprogrammierung (Wikipedia)
Located at util/constraint/AndOperator.class.php
Package: Alvine\Util\Constraint
Category: Framework
License: Licence
Author: schukai GmbH info@schukai.de
Version: Release: $Revision: 173 $
Since: 20110904
Link: Alvine
Link: Constraintprogrammierung (Wikipedia)
Located at util/constraint/AndOperator.class.php
public
boolean
|
__construct()
|
__call(),
__clone(),
__get(),
__set(),
__toString(),
equals(),
getClass(),
getClone(),
getClosure(),
getHashCode(),
getID(),
getShortID(),
isCallable(),
isInstanceOf(),
propertyExists()
|
serialize(),
unserialize()
|
checkAndAdjustSerialisation(),
serialize(),
unserialize()
|
APIVERSION,
IDENTIFICATION,
SERIALVERSION,
VERSION
|
$operantA,
$operantB
|
$hash,
$properties
|