Skip to content

Commit 31c3ce8

Browse files
author
SoftLayer
committed
Removed documentation from the class since it's now in the README.
1 parent 2dcad86 commit 31c3ce8

2 files changed

Lines changed: 4 additions & 180 deletions

File tree

SoftLayer/SoapClient.class.php

Lines changed: 2 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -41,97 +41,8 @@
4141
/**
4242
* A SoftLayer API SOAP Client
4343
*
44-
* SoftLayer_SoapClient provides a simple method for connecting to and making
45-
* calls from the SoftLayer SOAP API and provides support for many of the
46-
* SoftLayer API's features. SOAP method calls and client maangement are handled
47-
* by PHP's built-in SoapClient class. Your PHP installation should load the
48-
* SOAP extension in order to use this class. Furthemore, this library is
49-
* supported by PHP versions 5.2.3 and higher. See
50-
* <http://us2.php.net/manual/en/soap.setup.php> for assistance loading the PHP
51-
* SOAP extension.
52-
*
53-
* Currently the SoftLayer API only allows connections from within the SoftLayer
54-
* private network. The system using this class must be either directly
55-
* connected to the SoftLayer private network (eg. purchased from SoftLayer) or
56-
* has access to the SoftLayer private network via a VPN connection.
57-
*
58-
* Making API calls using the SoftLayer_SoapClient class is done in the
59-
* following steps:
60-
*
61-
* 1) Instantiate a new SoftLayer_SoapClient using the
62-
* SoftLayer_SoapClient::getClient() method. Provide the name of the service
63-
* that you wish to query and optionally the id number of an object that you
64-
* wish to instantiate.
65-
*
66-
* 2) Define and add optional headers to the client, such as object masks and
67-
* result limits.
68-
*
69-
* 3) Call the API method you wish to call as if it were local to your
70-
* SoftLayer_SoapClient object. This class throws exceptions if it's unable to
71-
* execute a query, so it's best to place API method calls in try / catch
72-
* statements for proper error handling.
73-
*
74-
* Once your method is done executing you may continue using the same client if
75-
* you need to conenct to the same service or define another
76-
* SoftLayer_SoapClient object if you wish to work with multiple services at
77-
* once.
78-
*
79-
* Here's a simple usage example that retrieves account information by calling
80-
* the getObject() method in the SoftLayer_Account service:
81-
*
82-
* ----------
83-
*
84-
* // Initialize an API client for the SoftLayer_Account service.
85-
* $client = SoftLayer_SoapClient::getClient('SoftLayer_Account');
86-
*
87-
* // Retrieve our account record
88-
* try {
89-
* $account = $client->getObject();
90-
* var_dump($account);
91-
* } catch (Exception $e) {
92-
* die('Unable to retrieve account information: ' . $e->getMessage());
93-
* }
94-
*
95-
* ----------
96-
*
97-
* For a more complex example we'll retrieve a support ticket with id 123456
98-
* along with the ticket's updates, the user it's assigned to, the servers
99-
* attached to it, and the datacenter those servers are in. We'll retrieve our
100-
* extra information using a nested object mask. After we have the ticket we'll
101-
* update it with the text 'Hello!'.
102-
*
103-
* ----------
104-
*
105-
* // Initialize an API client for ticket 123456
106-
* $client = SoftLayer_SoapClient::getClient('SoftLayer_Ticket', 123456);
107-
*
108-
* // Create an object mask and assign it to our API client.
109-
* $objectMask = new SoftLayer_ObjectMask();
110-
* $objectMask->updates;
111-
* $objectMask->assignedUser;
112-
* $objectMask->attachedHardware->datacenter;
113-
* $client->setObjectMask($objectMask);
114-
*
115-
* // Retrieve the ticket record
116-
* try {
117-
* $ticket = $client->getObject();
118-
* var_dump($ticket);
119-
* } catch (Exception $e) {
120-
* die('Unable to retrieve ticket record: ' . $e->getMessage());
121-
* }
122-
*
123-
* // Update the ticket
124-
* $update = new stdClass();
125-
* $update->entry = 'Hello!';
126-
*
127-
* try {
128-
* $update = $client->addUpdate($update);
129-
* echo 'Updated ticket 123456. The new update\'s id is ' . $update->id . '.');
130-
* } catch (Exception $e) {
131-
* die('Unable to update ticket: ' . $e->getMessage());
132-
* }
133-
*
134-
* ----------
44+
* Please see the bundled README.textile file for more details and usage
45+
* information.
13546
*
13647
* This client supports sending multiple calls in parallel to the SoftLayer
13748
* API. Please see the documentation in the

SoftLayer/XmlrpcClient.class.php

Lines changed: 2 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -40,95 +40,8 @@
4040
/**
4141
* A SoftLayer API XML-RPC Client
4242
*
43-
* SoftLayer_XmlrpcClient provides a simple method for connecting to and making
44-
* calls from the SoftLayer XML-RPC API and provides support for many of the
45-
* SoftLayer API's features. XML-RPC method calls and client maangement are handled
46-
* by PHP's built-in xmlrpc extension. Your PHP installation should load the
47-
* XML-RPC extension in order to use this class. Furthemore, this library is
48-
* supported by PHP version 5 and higher. See
49-
* <http://us2.php.net/manual/en/soap.setup.php> for assistance loading the PHP
50-
* XML-RPC extension.
51-
*
52-
* Currently the SoftLayer API only allows connections from within the SoftLayer
53-
* private network. The system using this class must be either directly
54-
* connected to the SoftLayer private network (eg. purchased from SoftLayer) or
55-
* has access to the SoftLayer private network via a VPN connection.
56-
*
57-
* Making API calls using the SoftLayer_XmlrpcClient class is done in the
58-
* following steps:
59-
*
60-
* 1) Instantiate a new SoftLayer_XmlrpcClient using the
61-
* SoftLayer_XmlrpcClient::getClient() method. Provide the name of the service
62-
* that you wish to query and optionally the id number of an object that you
63-
* wish to instantiate.
64-
*
65-
* 2) Define and add optional headers to the client, such as object masks and
66-
* result limits.
67-
*
68-
* 3) Call the API method you wish to call as if it were local to your
69-
* SoftLayer_XmlrpcClient object. This class throws exceptions if it's unable to
70-
* execute a query, so it's best to place API method calls in try / catch
71-
* statements for proper error handling.
72-
*
73-
* Once your method is done executing you may continue using the same client if
74-
* you need to conenct to the same service or define another
75-
* SoftLayer_XmlrpcClient object if you wish to work with multiple services at
76-
* once.
77-
*
78-
* Here's a simple usage example that retrieves account information by calling
79-
* the getObject() method in the SoftLayer_Account service:
80-
*
81-
* ----------
82-
*
83-
* // Initialize an API client for the SoftLayer_Account service.
84-
* $client = SoftLayer_XmlrpcClient::getClient('SoftLayer_Account');
85-
*
86-
* // Retrieve our account record
87-
* try {
88-
* $account = $client->getObject();
89-
* var_dump($account);
90-
* } catch (Exception $e) {
91-
* die('Unable to retrieve account information: ' . $e->getMessage());
92-
* }
93-
*
94-
* ----------
95-
*
96-
* For a more complex example we'll retrieve a support ticket with id 123456
97-
* along with the ticket's updates, the user it's assigned to, the servers
98-
* attached to it, and the datacenter those servers are in. We'll retrieve our
99-
* extra information using a nested object mask. After we have the ticket we'll
100-
* update it with the text 'Hello!'.
101-
*
102-
* ----------
103-
*
104-
* // Initialize an API client for ticket 123456
105-
* $client = SoftLayer_XmlrpcClient::getClient('SoftLayer_Ticket', 123456);
106-
*
107-
* // Create an object mask and assign it to our API client.
108-
* $objectMask = new SoftLayer_ObjectMask();
109-
* $objectMask->updates;
110-
* $objectMask->assignedUser;
111-
* $objectMask->attachedHardware->datacenter;
112-
* $client->setObjectMask($objectMask);
113-
*
114-
* // Retrieve the ticket record
115-
* try {
116-
* $ticket = $client->getObject();
117-
* var_dump($ticket);
118-
* } catch (Exception $e) {
119-
* die('Unable to retrieve ticket record: ' . $e->getMessage());
120-
* }
121-
*
122-
* // Update the ticket
123-
* $update = new stdClass();
124-
* $update->entry = 'Hello!';
125-
*
126-
* try {
127-
* $update = $client->addUpdate($update);
128-
* echo 'Updated ticket 123456. The new update\'s id is ' . $update->id . '.');
129-
* } catch (Exception $e) {
130-
* die('Unable to update ticket: ' . $e->getMessage());
131-
* }
43+
* Please see the bundled README.textile file for more details and usage
44+
* information.
13245
*
13346
* The most up to date version of this library can be found on the SoftLayer
13447
* github public repositories: http://github.com/softlayer/ . Please post to

0 commit comments

Comments
 (0)