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


PHP PHP_CodeCoverage_Report_Node::getPathAsArray方法代码示例

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


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

示例1: getPathAsArray

 /**
  * @return array
  */
 public function getPathAsArray()
 {
     if ($this->pathArray === NULL) {
         if ($this->parent === NULL) {
             $this->pathArray = array();
         } else {
             $this->pathArray = $this->parent->getPathAsArray();
         }
         $this->pathArray[] = $this;
     }
     return $this->pathArray;
 }
开发者ID:habibmasuro,项目名称:Bitcoin-PHP-API,代码行数:15,代码来源:Node.php

示例2: getBreadcrumbs

 protected function getBreadcrumbs(PHP_CodeCoverage_Report_Node $node)
 {
     $breadcrumbs = '';
     $path = $node->getPathAsArray();
     $pathToRoot = array();
     $max = count($path);
     if ($node instanceof PHP_CodeCoverage_Report_Node_File) {
         $max--;
     }
     for ($i = 0; $i < $max; $i++) {
         $pathToRoot[] = str_repeat('../', $i);
     }
     foreach ($path as $step) {
         if ($step !== $node) {
             $breadcrumbs .= $this->getInactiveBreadcrumb($step, array_pop($pathToRoot));
         } else {
             $breadcrumbs .= $this->getActiveBreadcrumb($step);
         }
     }
     return $breadcrumbs;
 }
开发者ID:MachiavelliQ,项目名称:www,代码行数:21,代码来源:Renderer.php

示例3: getBreadcrumbs

 protected function getBreadcrumbs(PHP_CodeCoverage_Report_Node $node)
 {
     $breadcrumbs = '';
     $path = $node->getPathAsArray();
     foreach ($path as $step) {
         if ($step !== $node) {
             $breadcrumbs .= sprintf('        <li><a href="%s.html">%s</a> <span class="divider">/</span></li>' . "\n", $step->getId(), $step->getName());
         } else {
             $breadcrumbs .= sprintf('        <li class="active">%s</li>' . "\n", $step->getName());
             if ($node instanceof PHP_CodeCoverage_Report_Node_Directory) {
                 $breadcrumbs .= sprintf('        <li>(<a href="%s.dashboard.html">Dashboard</a>)</li>' . "\n", $step->getId());
             }
         }
     }
     return $breadcrumbs;
 }
开发者ID:manzapanza,项目名称:cakephp-api-utils,代码行数:16,代码来源:Renderer.php

示例4: setCommonTemplateVariables

 /**
  * @param Text_Template                $template
  * @param string                       $title
  * @param PHP_CodeCoverage_Report_Node $node
  */
 protected function setCommonTemplateVariables(Text_Template $template, $title, PHP_CodeCoverage_Report_Node $node = NULL)
 {
     $link = '';
     if ($node !== NULL) {
         $path = $node->getPathAsArray();
         foreach ($path as $step) {
             $link .= sprintf('%s<a href="%s.html">%s</a>', !empty($link) ? '/' : '', $step->getId(), $step->getName());
         }
     }
     $template->setVar(array('title' => $title, 'link' => $link, 'charset' => $this->charset, 'date' => $this->date, 'version' => '1.1.2', 'php_version' => PHP_VERSION, 'generator' => $this->generator, 'low_upper_bound' => $this->lowUpperBound, 'high_lower_bound' => $this->highLowerBound));
 }
开发者ID:DaveNascimento,项目名称:civicrm-packages,代码行数:16,代码来源:Renderer.php

示例5: getBreadcrumbs

 protected function getBreadcrumbs(PHP_CodeCoverage_Report_Node $node)
 {
     $breadcrumbs = '';
     $path = $node->getPathAsArray();
     foreach ($path as $step) {
         if ($step !== $node) {
             $breadcrumbs .= $this->getInactiveBreadcrumb($step);
         } else {
             $breadcrumbs .= $this->getActiveBreadcrumb($step, $node instanceof PHP_CodeCoverage_Report_Node_Directory);
         }
     }
     return $breadcrumbs;
 }
开发者ID:altesien,项目名称:FinalProject,代码行数:13,代码来源:Renderer.php


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