コード例 #1
0
 function prepare()
 {
     foreach (array_keys($this->attributeNodes) as $key) {
         $this->attributeNodes[$key]->prepare();
     }
     parent::prepare();
 }
コード例 #2
0
 function prepare()
 {
     $this->expression->prepare();
     parent::prepare();
 }
コード例 #3
0
 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');
 }
コード例 #4
0
 function __construct($location, $text)
 {
     parent::__construct($location);
     $this->contents = $text;
 }
コード例 #5
0
 function generate($code_writer)
 {
     $code_writer->writeHTML($this->contents);
     parent::generate($code_writer);
 }
コード例 #6
0
 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();
 }
コード例 #7
0
 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');
 }