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


PHP CMbArray::countLeafs方法代码示例

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


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

示例1: array

<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage developpement
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkRead();
$root_dir = CAppUI::conf("root_dir");
$extensions = array("php");
$ignored = array("classes/", "locales/", "controllers/", "shell/", "/index.php", "/setup.php", "/config.php", "/configuration.php", "/preferences.php");
$views = CMbPath::getPathTreeUnder("{$root_dir}/modules", $ignored, $extensions);
$count = CMbArray::countLeafs($views);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("views", $views);
$smarty->assign("count", $count);
$smarty->display("regression_checker.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:regression_checker.php

示例2: testCountLeafs

 public function testCountLeafs()
 {
     $this->assertEquals(1, $this->stub->countLeafs(null));
     $this->assertEquals(3, $this->stub->countLeafs(array("val", array("val2", array("val3")))));
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:5,代码来源:CMbArrayTest.php

示例3: CMbCodeSniffer

 *
 * @package    Mediboard
 * @subpackage developpement
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkRead();
if (!class_exists("CMbCodeSniffer")) {
    CAppUI::stepMessage(UI_MSG_WARNING, "CMbCodeSniffer-error-PEAR_needed");
    return;
}
$sniffer = new CMbCodeSniffer();
$files = $sniffer->getFilesTree();
//unset($files["modules"]);
$count = CMbArray::countLeafs($files);
$reports = $sniffer->checkReports($files);
$stats = $sniffer->buildStats($files);
$types = $stats["-root-"];
$existing_reports = $reports;
CMbArray::removeValue("none", $existing_reports);
$existing_count = count($existing_reports);
// Cuz sniffer changes work dir but restores it at destruction
// Be aware that unset() won't call __destruct() anyhow
$sniffer->__destruct();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("files", $files);
$smarty->assign("count", $count);
$smarty->assign("types", $types);
$smarty->assign("reports", $reports);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:sniff_code.php


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