string bool int float VBox_ManagedObject new Collection ($this->connection, (array)) new ($this->connection, ) (array) () public function () { $request = new stdClass(); $request->_this = $this->handle; $response = $this->connection->__soapCall('_', array((array)$request)); return ; } public function ($value) { $request = new stdClass(); $request->_this = $this->handle; if (is_array($value) || is_null($value) || is_scalar($value)) if (is_null($value) || is_scalar($value)) { $request-> = $value; } else { $request-> = $value->handle; } $this->connection->__soapCall('_', array((array)$request)); } /** * Generated VBoxWebService Interface Wrapper */ readonly attribute :: read/write attribute :: } /** * Generated VBoxWebService Managed Object Collection */ class Collection extends VBox_ManagedObjectCollection { protected $_interfaceName = ""; } /** * Generated VBoxWebService Struct */ class extends VBox_Struct { protected $; public function __construct($connection, $values) { $this->connection = $connection; $this-> = $values->; } public function () { return ; } } /** * Generated VBoxWebService Struct Collection */ class Collection extends VBox_StructCollection { protected $_interfaceName = ""; } $request = new stdClass(); $request->_this = $this->handle; $request-> = $arg_; $response = $this->connection->__soapCall('_', array((array)$request)); return array( , , ) ; public function ( , ) { } /** * Generated VBoxWebService ENUM */ class extends VBox_Enum { public $NameMap = array( => '', ); public $ValueMap = array('' => , ); } /** * Generated VBoxWebService Enum Collection */ class Collection extends VBox_EnumCollection { protected $_interfaceName = ""; } const = ; <?php /* * Copyright (C) 2008-2020 Oracle Corporation * * This file is part of a free software library; you can redistribute * it and/or modify it under the terms of the GNU Lesser General * Public License version 2.1 as published by the Free Software * Foundation and shipped in the "COPYING.LIB" file with this library. * The library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY of any kind. * * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if * any license choice other than GPL or LGPL is available it will * apply instead, Oracle elects to use only the Lesser General Public * License version 2.1 (LGPLv2) at this time for any software where * a choice of LGPL license versions is made available with the * language indicating that LGPLv2 or any later version may be used, * or where a choice of which version of the LGPL is applied is * otherwise unspecified. * * This file is autogenerated from VirtualBox.xidl, DO NOT EDIT! */ class VBox_ManagedObject { protected $connection; protected $handle; public function __construct($soap, $handle = null) { $this->connection = $soap; $this->handle = $handle; } public function __toString() { return (string)$this->handle; } public function __set($attr, $value) { $methodName = "set" . $attr; if (method_exists($this, $methodName)) $this->$methodName($value); else throw new Exception("Attribute does not exist"); } public function __get($attr) { $methodName = "get" . $attr; if (method_exists($this, $methodName)) return $this->$methodName(); else throw new Exception("Attribute does not exist"); } public function getHandle() { return $this->handle; } public function cast($class) { if (is_subclass_of($class, 'VBox_ManagedObject')) { return new $class($this->connection, $this->handle); } throw new Exception('Cannot cast VBox_ManagedObject to non-child class VBox_ManagedObject'); } public function releaseRemote() { try { $request = new stdClass(); $request->_this = $this->handle; $this->connection->__soapCall('IManagedObjectRef_release', array((array)$request)); } catch (Exception $ex) { } } } abstract class VBox_Collection implements ArrayAccess, Iterator, Countable { protected $_connection; protected $_values; protected $_objects; protected $_interfaceName; public function __construct($soap, array $values = array()) { $this->_connection = $soap; $this->_values = $values; $this->_soapToObject(); } protected function _soapToObject() { $this->_objects = array(); foreach($this->_values as $value) { $this->_objects[] = new $this->_interfaceName($this->_connection, $value); } } /** ArrayAccess Functions **/ public function offsetSet($offset, $value) { if ($value instanceof $this->_interfaceName) { if ($offset) { $this->_objects[$offset] = $value; } else { $this->_objects[] = $value; } } else { throw new Exception("Value must be a instance of " . $this->_interfaceName); } } public function offsetExists($offset) { return isset($this->_objects[$offset]); } public function offsetUnset($offset) { unset($this->_objects[$offset]); } public function offsetGet($offset) { return isset($this->_objects[$offset]) ? $this->_objects[$offset] : null; } /** Iterator Functions **/ public function rewind() { reset($this->_objects); } public function current() { return current($this->_objects); } public function key() { return key($this->_objects); } public function next() { return next($this->_objects); } public function valid() { return ($this->current() !== false); } /** Countable Functions **/ public function count() { return count($this->_objects); } } class VBox_ManagedObjectCollection extends VBox_Collection { protected $_interfaceName = 'VBox_ManagedObject'; // Result is undefined if this is called AFTER any call to VBox_Collection::offsetSet or VBox_Collection::offsetUnset public function setInterfaceName($interface) { if (!is_subclass_of($interface, 'VBox_ManagedObject')) { throw new Exception('Cannot set collection interface to non-child class of VBox_ManagedObject'); } $this->_interfaceName = $interface; $this->_soapToObject(); } } abstract class VBox_Struct { protected $connection; public function __get($attr) { $methodName = "get" . $attr; if (method_exists($this, $methodName)) return $this->$methodName(); else throw new Exception("Attribute does not exist"); } } abstract class VBox_StructCollection extends VBox_Collection { public function __construct($soap, array $values = array()) { if (!(array_values($values) === $values)) { $values = array((object)$values); //Fix for when struct return value only contains one list item (e.g. one medium attachment) } parent::__construct($soap, $values); } } abstract class VBox_Enum { protected $_handle; public function __construct($connection, $handle) { if (is_string($handle)) $this->_handle = $this->ValueMap[$handle]; else $this->_handle = $handle; } public function __toString() { return (string)$this->NameMap[$this->_handle]; } } abstract class VBox_EnumCollection extends VBox_Collection { } /** * VirtualBox COM result codes */ class VirtualBox_COM_result_codes { }