This class handles the occurance of runtime registered tags like datatypes (fileset, patternset, etc) and it's possible nested tags. It introspects the implementation of the class and sets up the data structures.
Author: Andreas Aderhold (andi@binarycloud.com)
Inheritance: extends AbstractHandler
コード例 #1
0
 /**
  * Checks for nested tags within the current one. Creates and calls
  * handlers respectively.
  *
  * @param  string  the tag that comes in
  * @param  array   attributes the tag carries
  * @access public
  */
 function startElement($name, $attrs)
 {
     //print(get_class($this) . " name = $name, attrs = " . implode(",",$attrs) . "\n");
     if ($this->child instanceof TaskContainer) {
         // taskcontainer nested element can contain other tasks - no other
         // nested elements possible
         $tc = new TaskHandler($this->parser, $this, $this->configurator, $this->child, $this->childWrapper, $this->target);
         $tc->init($name, $attrs);
     } else {
         $neh = new NestedElementHandler($this->parser, $this, $this->configurator, $this->child, $this->childWrapper, $this->target);
         $neh->init($name, $attrs);
     }
 }
コード例 #2
0
ファイル: TaskHandler.php プロジェクト: sensorsix/app
 /**
  * Checks for nested tags within the current one. Creates and calls
  * handlers respectively.
  *
  * @param string $name The tag that comes in
  * @param array $attrs Attributes the tag carries
  */
 function startElement($name, $attrs)
 {
     $project = $this->configurator->project;
     if ($this->task instanceof TaskContainer) {
         //print("TaskHandler::startElement() (TaskContainer) name = $name, attrs = " . implode(",",$attrs) . "\n");
         $th = new TaskHandler($this->parser, $this, $this->configurator, $this->task, $this->wrapper, $this->target);
         $th->init($name, $attrs);
     } else {
         //print("TaskHandler::startElement() name = $name, attrs = " . implode(",",$attrs) . "\n");
         $tmp = new NestedElementHandler($this->parser, $this, $this->configurator, $this->task, $this->wrapper, $this->target);
         $tmp->init($name, $attrs);
     }
 }
コード例 #3
0
 /**
  * Checks for nested tags within the current one. Creates and calls
  * handlers respectively.
  *
  * @param  string  the tag that comes in
  * @param  array   attributes the tag carries
  * @access public
  */
 function startElement($name, $attrs)
 {
     $nef = new NestedElementHandler($this->parser, $this, $this->configurator, $this->element, $this->wrapper, $this->target);
     $nef->init($name, $attrs);
 }