Ejemplo n.º 1
0
 private function parse_exitTagContext()
 {
     $current = $this->current;
     if (isset($this->currentScalarProperty)) {
         $prop = $this->currentScalarProperty;
         $v = $this->currentScalarValue;
         $this->currentScalarProperty = null;
         $this->currentScalarValue = '';
         if (Expression::isBindingExpression($v)) {
             $this->current->bind($prop, $v);
         } else {
             $this->current->props->{$prop} = $v;
         }
     } else {
         $this->text_optimize($current);
         $parent = $current->parent;
         $current->onParsingComplete();
         //Note: calling this method may unset the 'parent' property (ex. with macros, which are immediately removed from the DOM).
         // Check if the metadata context is being closed.
         if (isset($this->metadataContainer) && $this->current === $this->metadataContainer) {
             $this->metadataContainer = null;
         }
         $this->current = $parent;
         //also discards the current scalar parameter, if that is the case.
     }
 }