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