Beispiel #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')));
     }
 }
Beispiel #2
0
 public function __clone()
 {
     parent::__clone();
     $oldParams = $this->params;
     $this->params = [];
     foreach ($oldParams as $param) {
         $this->params[] = clone $param;
     }
 }
 /**
  * @param Element $element
  * @param string  $kind
  * @param bool    $caseInsensitive
  */
 private function add(Element $element, $kind, $caseInsensitive = true)
 {
     $fqnameOrig = $fqname = $element->getName();
     if ($caseInsensitive) {
         $fqname = strtolower($fqname);
     }
     $this->indexData['fqnames'][$kind][$fqname][] = $this->path;
     $name = $this->getShortName($fqname);
     $this->indexData['names'][$kind][$name][] = $fqname;
     $this->indexData['files'][$this->path][$kind][$fqname] = $fqnameOrig;
 }
Beispiel #4
0
 protected function addBackslash(Element $element)
 {
     $element->setName('\\' . $element->getName());
 }