本文整理汇总了PHP中Repository::getDvd方法的典型用法代码示例。如果您正苦于以下问题:PHP Repository::getDvd方法的具体用法?PHP Repository::getDvd怎么用?PHP Repository::getDvd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Repository
的用法示例。
在下文中一共展示了Repository::getDvd方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dvdParam
function dvdParam($key)
{
if (isset($_REQUEST[$key])) {
if (strlen($_REQUEST[$key]) > 0) {
return Repository::getDvd($_REQUEST[$key]);
}
return new DVD();
}
return NULL;
}
示例2: __get
public function __get($name)
{
switch ($name) {
// booleans
case 'bioslogofadein':
case 'bioslogofadeout':
case 'acpi':
case 'ioapic':
case 'pae':
case 'hpet':
case 'rtcuseutc':
case 'hwvirtex':
// case 'hwvirtexexcl':
// case 'hwvirtexexcl':
case 'nestedpaging':
case 'largepages':
case 'pagefusion':
case 'vtxvpid':
case 'synthcpu':
case 'accelerate2dvideo':
case 'accelerate3d':
case 'usb':
case 'usbehci':
case 'vrde':
return $this->get($name, 'off') == 'on';
// integers
// integers
case 'cpus':
case 'memory':
case 'vram':
case 'bioslogodisplaytime':
case 'biossystemtimeoffset':
return intval($this->get($name, '0'));
// storage controllers
// storage controllers
case 'storage0':
case 'storage1':
case 'storage2':
case 'storage3':
case 'storage4':
case 'storage5':
case 'storage6':
case 'storage7':
$i = substr($name, 7);
if (!$this->has('storagecontrollername' . $i)) {
break;
}
$name = $this->get('storagecontrollername' . $i, '');
$ports = intval($this->get('storagecontrollerportcount' . $i, '0'));
$maxdevices = intval($this->get('storagecontrollermaxdeviceperport' . $i, '0'));
$devices = array();
for ($j = 0; $j < $ports; $j++) {
for ($k = 0; $k < $maxdevices; $k++) {
$slot = $name . '-' . $j . '-' . $k;
if (!$this->has($slot)) {
continue;
}
if ($this->endsWith($slot, '.vdi') || $this->endsWith($slot, '.vmdk')) {
$devices[$j][$k] = Repository::getHdd($this->get($slot));
} else {
if ($this->get($slot) == 'emptydrive') {
$devices[$j][$k] = new DVD();
} else {
$devices[$j][$k] = Repository::getDvd($this->get($slot));
}
}
}
}
return array('name' => $name, 'type' => $this->get('storagecontrollertype' . $i, 'none'), 'instance' => intval($this->get('storagecontrollerinstance' . $i, '0')), 'ports' => array('count' => $ports, 'min' => intval($this->get('storagecontrollerminportcount' . $i, '0')), 'max' => intval($this->get('storagecontrollermaxportcount' . $i, '0')), 'maxdevices' => $maxdevices), 'devices' => $devices);
// fdd controllers
// fdd controllers
case 'fd0':
case 'fd1':
$slot = 'FLOPPY-0-0';
switch ($name) {
case 'fd0':
$slot = 'FLOPPY-0-0';
break;
case 'fd1':
$slot = 'FLOPPY-0-1';
break;
}
if (!$this->has($slot)) {
break;
}
if ($this->get($slot) == 'emptydrive') {
return new FDD();
}
return Repository::getFdd($this->get($slot));
// ide controllers
// ide controllers
case 'ide0':
case 'ide1':
case 'ide2':
case 'ide3':
$slot = 'IDE-0-0';
switch ($name) {
case 'ide0':
$slot = 'IDE-0-0';
break;
//.........这里部分代码省略.........