當前位置: 首頁>>代碼示例>>PHP>>正文


PHP eqLogic::export方法代碼示例

本文整理匯總了PHP中eqLogic::export方法的典型用法代碼示例。如果您正苦於以下問題:PHP eqLogic::export方法的具體用法?PHP eqLogic::export怎麽用?PHP eqLogic::export使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在eqLogic的用法示例。


在下文中一共展示了eqLogic::export方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: export

 public function export($_withCmd = true)
 {
     if ($this->getConfiguration('device') != '') {
         return array($this->getConfiguration('device') => self::devicesParameters($this->getConfiguration('device')));
     } else {
         $info = $this->getInfo();
         $export = parent::export();
         if (isset($export['configuration']['device'])) {
             unset($export['configuration']['device']);
         }
         if (isset($export['configuration']['serverID'])) {
             unset($export['configuration']['serverID']);
         }
         if (isset($export['configuration']['createtime'])) {
             unset($export['configuration']['createtime']);
         }
         if (isset($export['configuration']['updatetime'])) {
             unset($export['configuration']['updatetime']);
         }
         if (isset($export['configuration']['applyDevice'])) {
             unset($export['configuration']['applyDevice']);
         }
         if (isset($export['eqType_name'])) {
             unset($export['eqType_name']);
         }
         if (isset($export['_object'])) {
             unset($export['_object']);
         }
         if (isset($export['configuration']) && count($export['configuration']) == 0) {
             unset($export['configuration']);
         }
         if (!isset($export['vendor'])) {
             $export['vendor'] = $info['brand']['value'];
         }
         if (!isset($export['manufacturerId'])) {
             $export['manufacturerId'] = $info['manufacturerId']['value'];
         }
         if (!isset($export['manufacturerProductType'])) {
             $export['manufacturerProductType'] = $info['manufacturerProductType']['value'];
         }
         if (!isset($export['manufacturerProductId'])) {
             $export['manufacturerProductId'] = $info['manufacturerProductId']['value'];
         }
         if (isset($export['cmd'])) {
             $export['commands'] = $export['cmd'];
             foreach ($export['commands'] as &$cmd) {
                 if (isset($cmd['eqType'])) {
                     unset($cmd['eqType']);
                 }
                 if (isset($cmd['_eqLogic'])) {
                     unset($cmd['_eqLogic']);
                 }
                 if (isset($cmd['display']['doNotShowNameOnDashboard'])) {
                     unset($cmd['display']['doNotShowNameOnDashboard']);
                 }
                 if (isset($cmd['display']['doNotShowNameOnView'])) {
                     unset($cmd['display']['doNotShowNameOnView']);
                 }
                 if (isset($cmd['display']['doNotShowStatOnDashboard'])) {
                     unset($cmd['display']['doNotShowStatOnDashboard']);
                 }
                 if (isset($cmd['display']['doNotShowStatOnView'])) {
                     unset($cmd['display']['doNotShowStatOnView']);
                 }
                 if (isset($cmd['display']['doNotShowStatOnMobile'])) {
                     unset($cmd['display']['doNotShowStatOnMobile']);
                 }
                 if (isset($cmd['display']['parameters']) && count($cmd['display']['parameters']) == 0) {
                     unset($cmd['display']['parameters']);
                 }
             }
             unset($export['cmd']);
         }
         return array('todo.todo' => $export);
     }
 }
開發者ID:ksoul78,項目名稱:plugin-zwave,代碼行數:76,代碼來源:zwave.class.php


注:本文中的eqLogic::export方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。