TYPO3
7.6
|
Public Member Functions | |
__construct (\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode) | |
getComparator () | |
getSyntaxTreeNode () | |
getLeftSide () | |
getRightSide () | |
evaluate (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) | |
Public Member Functions inherited from AbstractNode | |
evaluateChildNodes (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) | |
getChildNodes () | |
addChildNode (\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $childNode) | |
Static Public Member Functions | |
static | evaluateComparator ($comparator, $evaluatedLeftSide, $evaluatedRightSide) |
static | convertToBoolean ($value) |
Protected Member Functions | |
getComparatorFromString ($string) | |
Static Protected Member Functions | |
static | isComparable ($evaluatedLeftSide, $evaluatedRightSide) |
Protected Attributes | |
$leftSide | |
$rightSide | |
$comparator | |
$syntaxTreeNode | |
Protected Attributes inherited from AbstractNode | |
$childNodes = array() | |
Static Protected Attributes | |
static | $comparators = array('==', '!=', '%', '>=', '>', '<=', '<') |
static | $booleanExpressionTextNodeCheckerRegularExpression |
A node which is used inside boolean arguments
Definition at line 17 of file BooleanNode.php.
__construct | ( | \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode | $syntaxTreeNode | ) |
Constructor. Parses the syntax tree node and fills $this->leftSide, $this->rightSide, $this->comparator and $this->syntaxTreeNode.
\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode | $syntaxTreeNode |
\TYPO3\CMS\Fluid\Core\Parser\Exception |
Definition at line 98 of file BooleanNode.php.
References AbstractNode\$childNodes, BooleanNode\$syntaxTreeNode, elseif, and BooleanNode\getComparatorFromString().
|
static |
Convert argument strings to their equivalents. Needed to handle strings with a boolean meaning.
Must be public and static as it is used from inside cached templates.
mixed | $value | Value to be converted to boolean |
Definition at line 326 of file BooleanNode.php.
evaluate | ( | \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface | $renderingContext | ) |
\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface | $renderingContext |
Implements NodeInterface.
Definition at line 195 of file BooleanNode.php.
|
static |
Do the actual comparison. Compares $leftSide and $rightSide with $comparator and emits a boolean value.
Some special rules apply:
This function must be static public, as it is also directly called from cached templates.
string | $comparator | |
mixed | $evaluatedLeftSide | |
mixed | $evaluatedRightSide |
\TYPO3\CMS\Fluid\Core\Parser\Exception |
Definition at line 225 of file BooleanNode.php.
References BooleanNode\$comparator.
getComparator | ( | ) |
|
protected |
Determine if there is a comparator inside $string, and if yes, returns it.
string | $string | string to check for a comparator inside |
Definition at line 308 of file BooleanNode.php.
References BooleanNode\$comparator.
Referenced by BooleanNode\__construct().
getLeftSide | ( | ) |
getRightSide | ( | ) |
getSyntaxTreeNode | ( | ) |
|
staticprotected |
Checks whether two operands are comparable (based on their types). This implements the "Comparison with various types" table from http://php.net/manual/en/language.operators.comparison.php, only leaving out "array" with "anything" and "object" with anything; as we specify that arrays and objects are incomparable with anything else than their type.
mixed | $evaluatedLeftSide | |
mixed | $evaluatedRightSide |
Definition at line 280 of file BooleanNode.php.
|
staticprotected |
Definition at line 36 of file BooleanNode.php.
|
protected |
Definition at line 81 of file BooleanNode.php.
Referenced by BooleanNode\evaluateComparator(), BooleanNode\getComparator(), and BooleanNode\getComparatorFromString().
|
staticprotected |
Definition at line 28 of file BooleanNode.php.
|
protected |
Definition at line 65 of file BooleanNode.php.
Referenced by BooleanNode\getLeftSide().
|
protected |
Definition at line 72 of file BooleanNode.php.
Referenced by BooleanNode\getRightSide().
|
protected |
Definition at line 89 of file BooleanNode.php.
Referenced by BooleanNode\__construct(), and BooleanNode\getSyntaxTreeNode().