Пример #1
0
 /**
  * @param Element $element
  * @param Node    $node
  */
 protected function init(Element $element, Node $node)
 {
     $element->setName($node->hasAttribute('namespacedName') ? Type::nameToString($node->getAttribute('namespacedName')) : $node->name);
     if ($node->hasAttribute('startFilePos')) {
         $element->setLocation(new OffsetLocation($this->path, $node->getAttribute('startFilePos')));
     }
 }
Пример #2
0
 protected function addBackslash(Element $element)
 {
     $element->setName('\\' . $element->getName());
 }