Ejemplo n.º 1
0
 /**
  * Registers an existing template into the Cloud.com cloud.
  *
  * @param RegisterTemplateData $requestData Register template request data
  * @return TemplateResponseData
  */
 public function registerTemplate(RegisterTemplateData $requestData)
 {
     $result = null;
     $response = $this->getClient()->call('registerTemplate', $requestData->toArray());
     if ($response->hasError() === false) {
         $resultObject = $response->getResult();
         if (!empty($resultObject)) {
             $result = $this->_loadTemplateResponseData($resultObject);
         }
     }
     return $result;
 }
Ejemplo n.º 2
0
 /**
  * Registers an existing template into the Cloud.com cloud.
  *
  * @param RegisterTemplateData|array $request Register template request data
  * @return TemplateResponseData
  */
 public function register($request)
 {
     if ($request !== null && !$request instanceof RegisterTemplateData) {
         $request = RegisterTemplateData::initArray($request);
     }
     return $this->getApiHandler()->registerTemplate($request);
 }