コード例 #1
0
ファイル: API.php プロジェクト: danielsan/echosign-api-php
 /**
  * 
  * Personalize a previously created Url Widget
  * @param string $url The  Url returned by createUrlWidget
  * @param WidgetPersonalizationInfo $personalization The personalization information for the widget
  * 
  */
 function personalizeUrlWidget($url, Info\WidgetPersonalizationInfo $personalization)
 {
     if (!filter_var($url, FILTER_VALIDATE_URL)) {
         throw new \InvalidArgumentException($url . ' does not appear to be a valid Url');
     }
     $package_data = array_merge(array('apiKey' => $this->api_key), array('widgetUrl' => $url), $personalization->asArray());
     $result = $this->client->personalizeUrlWidget($package_data);
     return $result;
 }
コード例 #2
0
ファイル: API.php プロジェクト: danielsan/echosign-api-php
 /**
  * 
  * Create a Personalized Url Widget
  * @param WidgetCreationInfo $widget instance of WidgetCreationInfo
  * @param EchosignWidgetPersonalization $personalization The personalization information for the widget
  * @param SenderInfo $sender instance of SenderInfo
  * 
  */
 function createPersonalUrlWidget(WidgetCreationInfo $widget, WidgetPersonalizationInfo $personalization, SenderInfo $sender = null)
 {
     $data = array_merge(array('apiKey' => $this->api_key), $widget->asArray(), $personalization->asArray());
     if (!is_null($sender)) {
         $data = array_merge($data, $sender->asArray());
     }
     $result = $this->client->createPersonalUrlWidget($data);
     return $result;
 }