function prepare() { foreach (array_keys($this->attributeNodes) as $key) { $this->attributeNodes[$key]->prepare(); } parent::prepare(); }
function prepare() { $this->expression->prepare(); parent::prepare(); }
function testGenerateCicleForPropertyExpression() { $code_writer = new WactCodeWriter(); $property = new WactCompilerPropertyDBETestVersion(); $context = new WactCompileTreeNode(); $context->registerProperty('Test', $property); $DBE = new WactDataBindingExpressionNode('Test', $context); $DBE->generatePreStatement($code_writer); $DBE->generateExpression($code_writer); $DBE->generatePostStatement($code_writer); $this->assertEqual($code_writer->getCode(), '<?php generatePreStatementOutput' . 'generateExpressionOutput' . 'generatePostStatementOutput'); }
function __construct($location, $text) { parent::__construct($location); $this->contents = $text; }
function generate($code_writer) { $code_writer->writeHTML($this->contents); parent::generate($code_writer); }
function testDuplicateIdIsLegalInDifferentBranches() { $root = new WactCompileTreeNode(); $Branch = new WactCompileTreeNode(); $root->addChild($Branch); $child1 = new WactCompileTreeNode(); $child1->ServerId = 'my_tag'; $Branch->addChild($child1); $child2 = new MockWactCompileTreeNode(); $child2->ServerId = 'my_tag'; $root->addChild($child2); $root->checkChildrenServerIds(); }
function testGetValueForDBE() { $context = new WactCompileTreeNode(); $property = new WactConstantProperty('hello'); $context->registerProperty('Test', $property); $expression = new WactExpression('Test', $context, $this->filter_dictionary); $this->assertEqual($expression->getValue(), 'hello'); }