当前位置: 首页>>代码示例>>PHP>>正文


PHP PHP_Depend_Code_NodeI::getUuid方法代码示例

本文整理汇总了PHP中PHP_Depend_Code_NodeI::getUuid方法的典型用法代码示例。如果您正苦于以下问题:PHP PHP_Depend_Code_NodeI::getUuid方法的具体用法?PHP PHP_Depend_Code_NodeI::getUuid怎么用?PHP PHP_Depend_Code_NodeI::getUuid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHP_Depend_Code_NodeI的用法示例。


在下文中一共展示了PHP_Depend_Code_NodeI::getUuid方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getStats

 /**
  * Returns the statistics for the requested node.
  *
  * @param PHP_Depend_Code_NodeI $node The context node instance.
  *
  * @return array
  */
 public function getStats(PHP_Depend_Code_NodeI $node)
 {
     if (isset($this->stats[$node->getUuid()])) {
         return $this->stats[$node->getUuid()];
     }
     return array();
 }
开发者ID:KingNoosh,项目名称:Teknik,代码行数:14,代码来源:DependencyAnalyzer.php

示例2: initNode

 /**
  * Initializes the temporary node container for the given <b>$node</b>.
  *
  * @param PHP_Depend_Code_NodeI $node The context node instance.
  *
  * @return void
  */
 protected function initNode(PHP_Depend_Code_NodeI $node)
 {
     if (!isset($this->nodes[$node->getUuid()])) {
         $this->nodes[$node->getUuid()] = array('in' => array(), 'out' => array(), 'name' => $node->getName(), 'type' => get_class($node));
     }
 }
开发者ID:KingNoosh,项目名称:Teknik,代码行数:13,代码来源:InheritanceStrategy.php

示例3: getNodeMetrics

 /**
  * This method will return an <b>array</b> with all generated metric values
  * for the node with the given <b>$uuid</b> identifier. If there are no
  * metrics for the requested node, this method will return an empty <b>array</b>.
  *
  * <code>
  * array(
  *     'npath'  =>  '17'
  * )
  * </code>
  *
  * @param PHP_Depend_Code_NodeI $node The context node instance.
  *
  * @return array
  */
 public function getNodeMetrics(PHP_Depend_Code_NodeI $node)
 {
     $metric = array();
     if (isset($this->metrics[$node->getUuid()])) {
         $metric = array(self::M_NPATH_COMPLEXITY => $this->metrics[$node->getUuid()]);
     }
     return $metric;
 }
开发者ID:CobaltBlueDW,项目名称:oddsandends,代码行数:23,代码来源:Analyzer.php

示例4: getCycle

 /**
  * Returns an array of nodes that build a cycle for the requested node or it
  * returns <b>null</b> if no cycle exists .
  *
  * @param PHP_Depend_Code_NodeI $node The context node instance.
  * @return PHP_Depend_Code_NodeI[]
  */
 public function getCycle(PHP_Depend_Code_NodeI $node)
 {
     if (array_key_exists($node->getUuid(), $this->collectedCycles)) {
         return $this->collectedCycles[$node->getUuid()];
     }
     $list = array();
     if ($this->collectCycle($list, $node)) {
         $this->collectedCycles[$node->getUuid()] = $list;
     } else {
         $this->collectedCycles[$node->getUuid()] = null;
     }
     return $this->collectedCycles[$node->getUuid()];
 }
开发者ID:KingNoosh,项目名称:Teknik,代码行数:20,代码来源:Analyzer.php

示例5: getNodeMetrics

 /**
  * This method will return an <b>array</b> with all generated metric values
  * for the given <b>$node</b> instance. If there are no metrics for the
  * requested node, this method will return an empty <b>array</b>.
  *
  * <code>
  * array(
  *     'loc'    =>  23,
  *     'cloc'   =>  17,
  *     'eloc'   =>  17,
  *     'ncloc'  =>  42
  * )
  * </code>
  *
  * @param PHP_Depend_Code_NodeI $node The context node instance.
  *
  * @return array
  */
 public function getNodeMetrics(PHP_Depend_Code_NodeI $node)
 {
     $metrics = array();
     if (isset($this->metrics[$node->getUuid()])) {
         $metrics = $this->metrics[$node->getUuid()];
     }
     return $metrics;
 }
开发者ID:KingNoosh,项目名称:Teknik,代码行数:26,代码来源:Analyzer.php

示例6: restoreFromCache

 /**
  * Tries to restore the metrics for a cached node. If this method has
  * restored the metrics it will return <b>TRUE</b>, otherwise the return
  * value will be <b>FALSE</b>.
  *
  * @param PHP_Depend_Code_NodeI $node The context node instance.
  *
  * @return boolean
  */
 protected function restoreFromCache(PHP_Depend_Code_NodeI $node)
 {
     $uuid = $node->getUuid();
     if ($node->isCached() && isset($this->metricsCached[$uuid])) {
         $this->metrics[$uuid] = $this->metricsCached[$uuid];
         return true;
     }
     return false;
 }
开发者ID:KingNoosh,项目名称:Teknik,代码行数:18,代码来源:AbstractCachingAnalyzer.php


注:本文中的PHP_Depend_Code_NodeI::getUuid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。