本文整理汇总了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);
}
}