From fb123f93f9f5ce42c8e5785d2f8e0edaf951740e Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Wed, 26 Mar 2014 19:21:20 +0000 Subject: Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2. --- src/VBox/Main/webservice/websrv-php.xsl | 339 +++++++++++++++++--------------- 1 file changed, 185 insertions(+), 154 deletions(-) (limited to 'src/VBox/Main/webservice/websrv-php.xsl') diff --git a/src/VBox/Main/webservice/websrv-php.xsl b/src/VBox/Main/webservice/websrv-php.xsl index 28773502..42591dca 100644 --- a/src/VBox/Main/webservice/websrv-php.xsl +++ b/src/VBox/Main/webservice/websrv-php.xsl @@ -11,7 +11,7 @@ Contributed by James Lucas (mjlucas at eng.uts.edu.au). - Copyright (C) 2008-2010 Oracle Corporation + Copyright (C) 2008-2014 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; @@ -29,7 +29,7 @@ encoding="utf-8" indent="no"/> - + @@ -119,17 +119,18 @@ - public function () { - $request = new stdClass(); - $request->_this = $this->handle; - $response = $this->connection->__soapCall('_', array((array)$request)); - return - - - - - ; - } + public function () + { + $request = new stdClass(); + $request->_this = $this->handle; + $response = $this->connection->__soapCall('_', array((array)$request)); + return + + + + + ; + } @@ -138,18 +139,23 @@ - public function ($value) { - $request = new stdClass(); - $request->_this = $this->handle; - if (is_null($value) || is_scalar($value)) { + 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 - { + } + else + { $request-> = $value->handle; - } - $this->connection->__soapCall('_', array((array)$request)); - } + } + $this->connection->__soapCall('_', array((array)$request)); + } @@ -158,15 +164,15 @@ /** -* Generated VBoxWebService Interface Wrapper -*/ + * Generated VBoxWebService Interface Wrapper + */ - - + + - + @@ -181,6 +187,7 @@ + @@ -200,6 +207,7 @@ + @@ -207,23 +215,25 @@ + } - + /** -* Generated VBoxWebService Managed Object Collection -*/ -class Collection extends VBox_ManagedObjectCollection { - protected $_interfaceName = ""; + * Generated VBoxWebService Managed Object Collection + */ +class Collection extends VBox_ManagedObjectCollection +{ + protected $_interfaceName = ""; } @@ -231,21 +241,20 @@ class Collection extends VBox_ManagedObjectColle /** -* Generated VBoxWebService Struct -*/ -class extends VBox_Struct { - - protected $; - - public function __construct($connection, $values) { - $this->connection = $connection; - - $this-> = $values->; - - } + * Generated VBoxWebService Struct + */ +class extends VBox_Struct +{ + protected $; + + public function __construct($connection, $values) + { + $this->connection = $connection; + $this-> = $values->; + } - - public function () { + public function () + { return @@ -253,36 +262,33 @@ class extends VBox_Struct { ; } - - -} +} /** -* Generated VBoxWebService Struct Collection -*/ -class Collection extends VBox_StructCollection { - protected $_interfaceName = ""; + * 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( - + + $request = new stdClass(); + + $request->_this = $this->handle; + + $request-> = $arg_; + + $response = $this->connection->__soapCall('_', array((array)$request)); + return + array( + @@ -310,26 +316,27 @@ class Collection extends VBox_StructCollection { - - public function ( - - - , - - - ) { - - } + + public function ( + + + , + + + ) { + + } /** -* Generated VBoxWebService ENUM -*/ -class extends VBox_Enum { - public $NameMap = array( => '', ); - public $ValueMap = array('' => , ); + * Generated VBoxWebService ENUM + */ +class extends VBox_Enum +{ + public $NameMap = array( => '', ); + public $ValueMap = array('' => , ); } @@ -337,22 +344,23 @@ class extends VBox_Enum { /** -* Generated VBoxWebService Enum Collection -*/ -class Collection extends VBox_EnumCollection { - protected $_interfaceName = ""; + * Generated VBoxWebService Enum Collection + */ +class Collection extends VBox_EnumCollection +{ + protected $_interfaceName = ""; } - const = ; + const = ; <?php /* - * Copyright (C) 2008-2010 Oracle Corporation + * Copyright (C) 2008-2014 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 @@ -407,44 +415,50 @@ class VBox_ManagedObject 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) {} - } + 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 { +abstract class VBox_Collection implements ArrayAccess, Iterator, Countable +{ protected $_connection; protected $_values; protected $_objects; protected $_interfaceName; - public function __construct($soap, array $values = array()) { + public function __construct($soap, array $values = array()) + { $this->_connection = $soap; $this->_values = $values; $this->_soapToObject(); } - protected function _soapToObject() { + protected function _soapToObject() + { $this->_objects = array(); foreach($this->_values as $value) { @@ -453,7 +467,8 @@ abstract class VBox_Collection implements ArrayAccess, Iterator, Countable { } /** ArrayAccess Functions **/ - public function offsetSet($offset, $value) { + public function offsetSet($offset, $value) + { if ($value instanceof $this->_interfaceName) { if ($offset) @@ -471,60 +486,72 @@ abstract class VBox_Collection implements ArrayAccess, Iterator, Countable { } } - public function offsetExists($offset) { + public function offsetExists($offset) + { return isset($this->_objects[$offset]); } - public function offsetUnset($offset) { + public function offsetUnset($offset) + { unset($this->_objects[$offset]); } - public function offsetGet($offset) { + public function offsetGet($offset) + { return isset($this->_objects[$offset]) ? $this->_objects[$offset] : null; } /** Iterator Functions **/ - public function rewind() { + public function rewind() + { reset($this->_objects); } - public function current() { + public function current() + { return current($this->_objects); } - public function key() { + public function key() + { return key($this->_objects); } - public function next() { + public function next() + { return next($this->_objects); } - public function valid() { + public function valid() + { return ($this->current() !== false); } /** Countable Functions **/ - public function count() { + public function count() + { return count($this->_objects); } } -class VBox_ManagedObjectCollection extends VBox_Collection { +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(); + 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 { +abstract class VBox_Struct +{ protected $connection; public function __get($attr) @@ -537,7 +564,8 @@ abstract class VBox_Struct { } } -abstract class VBox_StructCollection extends VBox_Collection { +abstract class VBox_StructCollection extends VBox_Collection +{ public function __construct($soap, array $values = array()) { @@ -549,33 +577,36 @@ abstract class VBox_StructCollection extends VBox_Collection { } } -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_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 { +abstract class VBox_EnumCollection extends VBox_Collection +{ } /** -* VirtualBox COM result codes -*/ -class VirtualBox_COM_result_codes { + * VirtualBox COM result codes + */ +class VirtualBox_COM_result_codes +{ @@ -587,7 +618,7 @@ class VirtualBox_COM_result_codes { - + -- cgit v1.2.1