Пример #1
0
 /**
  * Extracts a template
  *
  * @param ExtractTemplateData $requestData Extract template request data
  * @return ExtractTemplateResponseData
  */
 public function extractTemplate(ExtractTemplateData $requestData)
 {
     $result = null;
     $response = $this->getClient()->call('extractTemplate', $requestData->toArray());
     if ($response->hasError() === false) {
         $resultObject = $response->getResult();
         if (!empty($resultObject)) {
             $result = $this->_loadExtractTemplateData($resultObject);
         }
     }
     return $result;
 }
Пример #2
0
 /**
  * Extracts a template
  *
  * @param ExtractTemplateData|array $request Extract template request data
  * @return ExtractTemplateResponseData
  */
 public function extract($request)
 {
     if ($request !== null && !$request instanceof ExtractTemplateData) {
         $request = ExtractTemplateData::initArray($request);
     }
     return $this->getApiHandler()->extractTemplate($request);
 }