|
40 | 40 | /** |
41 | 41 | * A SoftLayer API XML-RPC Client |
42 | 42 | * |
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. |
132 | 45 | * |
133 | 46 | * The most up to date version of this library can be found on the SoftLayer |
134 | 47 | * github public repositories: http://github.com/softlayer/ . Please post to |
|
0 commit comments