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


PHP Host::getImageMemberFromHostID方法代码示例

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


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

示例1: deploy

 public function deploy()
 {
     try {
         $Host = new Host($_REQUEST['id']);
         // Title
         $this->title = $this->foglang['QuickImageMenu'];
         unset($this->headerData);
         $this->attributes = array(array());
         $this->templates = array('${task_started}');
         if (!$Host->getImageMemberFromHostID($_REQUEST['id'])) {
             throw new Exception($this->foglang['ErrorImageAssoc']);
         }
         if (!$Host->createImagePackage('1', "Mobile: " . $ImageMembers->getHost()->get('name'), false, false, true, false, $_SESSION['FOG_USERNAME'])) {
             throw new Exception($this->foglang['FailedTask']);
         }
         $this->data[] = array($this->foglang['TaskStarted']);
     } catch (Exception $e) {
         $this->data[] = array($e->getMessage());
     }
     $this->render();
     $this->FOGCore->redirect('?node=tasks');
 }
开发者ID:bramverstraten,项目名称:fogproject,代码行数:22,代码来源:HostMobile.class.php

示例2: strtoupper

         $realhost = strtoupper($autoregSysName) == 'MAC' ? $macsimple : str_replace($paddingString, $paddedInsert, $autoregSysName);
         $FOGCore->setSetting('FOG_QUICKREG_SYS_NUMBER', $autoregSysNumber + 1);
     } else {
         $realhost = strtoupper($autoregSysName) == 'MAC' ? $macsimple : $autoregSysName;
     }
     if (!$Host || !$Host->isValid()) {
         $Host = new Host(array('name' => $realhost, 'description' => sprintf('%s %s', _('Created by FOG Reg on'), date('F j, Y, g:i a')), 'imageID' => $realimageid, 'createdTime' => $FOGCore->formatTime('now', 'Y-m-d H:i:s'), 'createdBy' => 'FOGREG'));
     }
     $Host->addModule($ids);
     $Host->addGroup($groupid);
     $Host->addPriMAC($PriMAC);
     $Host->addAddMAC($MACs);
     if (!$Host->save()) {
         throw new Exception(_('Failed to save new Host!'));
     }
     if ($Image->isValid() && $Host->getImageMemberFromHostID()) {
         if ($Host->createImagePackage(1, 'AutoRegTask')) {
             print _('Done, with imaging!');
         } else {
             print _('Done, but unable to create task!');
         }
     } else {
         print _('Done!');
     }
 } else {
     $realhost = $macsimple;
     if (!$Host || !$Host->isValid()) {
         $Host = new Host(array('name' => $realhost, 'description' => sprintf('%s %s', _('Created by FOG Reg on'), date('F j, Y, g:i a')), 'createdTime' => $FOGCore->formatTime('now', 'Y-m-d H:i:s'), 'createdBy' => 'FOGREG'));
         $Host->addPriMAC($PriMAC);
         $Host->addAddMAC($MACs);
         $Host->addModule($ids);
开发者ID:bramverstraten,项目名称:fogproject,代码行数:31,代码来源:auto.register.php


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