for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* 2016 Romain CANON <[email protected]>
*
* This file is part of the TYPO3 Formz project.
* It is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License, either
* version 3 of the License, or any later version.
* For the full copyright and license information, see:
* http://www.gnu.org/licenses/gpl-3.0.html
*/
namespace Romm\Formz\Condition\Parser;
use Romm\Formz\Condition\Parser\Node\NodeInterface;
use Romm\Formz\Condition\Processor\ConditionProcessor;
use TYPO3\CMS\Extbase\Error\Result;
/**
* @todo
class ConditionTree
{
* @var NodeInterface
private $rootNode;
* @var Result
private $result;
* @var ConditionProcessor
private $conditionProcessor;
* @param NodeInterface $rootNode
* @param Result $result
public function __construct(NodeInterface $rootNode, Result $result)
$this->rootNode = $rootNode;
$this->result = $result;
}
* @param ConditionProcessor $conditionProcessor
* @return $this
public function attachConditionProcessor(ConditionProcessor $conditionProcessor)
$this->conditionProcessor = $conditionProcessor;
return $this;
* @return array
public function getCssConditions()
return $this->rootNode->getCssResult();
public function getJavaScriptConditions()
return $this->rootNode->getJavaScriptResult();
* @return bool
public function getPhp()
return $this->rootNode->getPhpResult();
* @return Result
public function getResult()
return $this->result;