/** * Generates an identifier for the given source item. * * @param PHP_Depend_Code_AbstractItem $item The context source item. * @param string $prefix The item type identifier. * * @return string */ protected function forOffsetItem(PHP_Depend_Code_AbstractItem $item, $prefix) { $fileHash = $item->getSourceFile()->getUUID(); $itemHash = $this->hash($prefix . ':' . strtolower($item->getName())); $offset = $this->getOffsetInFile($fileHash, $itemHash); return sprintf('%s-%s-%s', $fileHash, $itemHash, $offset); }
/** * Returns the source name for this node, maybe a class or interface name, * or a package, method, function name. * * @return string */ public function getName() { return $this->_node->getName(); }