@@ -323,26 +323,26 @@ public function setInitParameter($id)
323323 * Set an object mask to a SoftLayer API call
324324 *
325325 * 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
327327 * properties to retrieve along with an object's local properties.
328328 *
329329 * @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
332331 * @param object $mask The object mask you wish to define
333- * @return SoftLayer_XmlrpcClient
332+ * @return SoftLayer_SoapClient
334333 */
335334 public function setObjectMask ($ mask )
336335 {
337336 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 );
340341 }
341342
342343 $ objectMask = new stdClass ();
343344 $ objectMask ->mask = $ mask ;
344-
345- $ this ->addHeader ($ this ->_serviceName . 'ObjectMask ' , $ objectMask );
345+ $ this ->addHeader ($ header , $ objectMask );
346346 }
347347
348348 return $ this ;
0 commit comments