@@ -323,26 +323,26 @@ public function setInitParameter($id)
323
323
* Set an object mask to a SoftLayer API call
324
324
*
325
325
* Use an object mask to retrieve data related your API call's result.
326
- * Object masks are skeleton objects that define nested relational
326
+ * Object masks are skeleton objects or strings that define nested relational
327
327
* properties to retrieve along with an object's local properties.
328
328
*
329
329
* @see SoftLayer_ObjectMask
330
- * @link http://sldn.softlayer.com/wiki/index.php/Using_Object_Masks_in_the_SoftLayer_API Using object masks in the SoftLayer API
331
- * @link http://sldn.softlayer.com/wiki/index.php/Category:API_methods_that_can_use_object_masks API methods that can use object masks
330
+ * @link http://sldn.softlayer.com/article/Using-Object-Masks-SoftLayer-API Using object masks in the SoftLayer API
332
331
* @param object $mask The object mask you wish to define
333
- * @return SoftLayer_XmlrpcClient
332
+ * @return SoftLayer_SoapClient
334
333
*/
335
334
public function setObjectMask ($ mask )
336
335
{
337
336
if (!is_null ($ mask )) {
338
- if (!($ mask instanceof SoftLayer_ObjectMask)) {
339
- throw new Exception ('Please provide a SoftLayer_ObjectMask to define an object mask. ' );
337
+ $ header = 'SoftLayer_ObjectMask ' ;
338
+
339
+ if ($ mask instanceof SoftLayer_ObjectMask) {
340
+ $ header = sprintf ('%sObjectMask ' , $ this ->_serviceName );
340
341
}
341
342
342
343
$ objectMask = new stdClass ();
343
344
$ objectMask ->mask = $ mask ;
344
-
345
- $ this ->addHeader ($ this ->_serviceName . 'ObjectMask ' , $ objectMask );
345
+ $ this ->addHeader ($ header , $ objectMask );
346
346
}
347
347
348
348
return $ this ;
0 commit comments