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


PHP Cabinet::ListCabinets方法代码示例

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


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

示例1: elseif

<?php 
} elseif (isset($_GET["cab"])) {
    if ($cab->CabinetID > 0) {
        $cab->GetCabinet();
    } else {
        $cab->CabinetID = null;
        $cab->DataCenterID = null;
        $cab->Location = null;
        $cab->CabinetHeight = null;
        $cab->Model = null;
        $cab->MaxKW = null;
        $cab->MaxWeight = null;
        $cab->InstallationDate = date('m/d/Y');
    }
    $deptList = $dept->GetDepartmentList();
    $cabList = $cab->ListCabinets();
    ?>

<div class='page installer'>
<div id="sidebar">
<ul>
<a href="?dept&preflight-ok"><li>Departments</li></a>
<a href="?dc&preflight-ok"><li>Data Centers</li></a>
<a><li class="active">Cabinets</li></a>
<?php 
    if (isset($complete)) {
        echo '<a href="?complete&preflight-ok"><li>Complete</li></a>';
    }
    ?>
</ul>
</div>
开发者ID:Gusenichka,项目名称:openDCIM,代码行数:31,代码来源:install.php

示例2: buildNavTreeArray

 function buildNavTreeArray()
 {
     $con = new Container();
     $cabs = Cabinet::ListCabinets();
     $menu = array();
     function processcontainer($container, $cabs)
     {
         $menu = array($container);
         foreach ($container->GetChildren() as $child) {
             if (get_class($child) == 'Container') {
                 $menu[] = processcontainer($child, $cabs);
             } elseif (get_class($child) == 'DataCenter') {
                 $menu[] = processdatacenter($child, $cabs);
             }
         }
         return $menu;
     }
     function processdatacenter($dc, $cabs)
     {
         $menu = array($dc);
         foreach ($dc->GetChildren() as $child) {
             if (get_class($child) == 'Zone') {
                 $menu[] = processzone($child, $cabs);
             } elseif (get_class($child) == 'CabRow') {
                 $menu[] = processcabrow($child, $cabs);
             } else {
                 $menu[] = processcab($child, $cabs);
             }
         }
         return $menu;
     }
     function processzone($zone, $cabs)
     {
         $menu = array($zone);
         foreach ($zone->GetChildren() as $child) {
             if (get_class($child) == 'CabRow') {
                 $menu[] = processcabrow($child, $cabs);
             } else {
                 $menu[] = processcab($child, $cabs);
             }
         }
         return $menu;
     }
     function processcabrow($row, $cabs)
     {
         $menu = array($row);
         foreach ($cabs as $cab) {
             if ($cab->CabRowID == $row->CabRowID) {
                 $menu[] = processcab($cab, $cabs);
             }
         }
         return $menu;
     }
     function processcab($cab, $cabs)
     {
         return $cab;
     }
     foreach ($con->GetChildren() as $child) {
         if (get_class($child) == 'Container') {
             $menu[] = processcontainer($child, $cabs);
         } elseif (get_class($child) == 'DataCenter') {
             $menu[] = processdatacenter($child, $cabs);
         }
     }
     return $menu;
 }
开发者ID:paragm,项目名称:openDCIM,代码行数:66,代码来源:misc.inc.php


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