コード例 #1
0
ファイル: OriginalDocument.php プロジェクト: nsbucky/echosign
 public function __construct(array $config, Documents $documents)
 {
     foreach (['name', 'documentId', 'mimeType'] as $c) {
         $this->{$c} = \Echosign\array_get($config, $c);
     }
     $this->documents = $documents;
 }
コード例 #2
0
 /**
  * @param array $config
  * @param AgreementDocuments $agreementDocuments
  */
 public function __construct(array $config, AgreementDocuments $agreementDocuments)
 {
     foreach (['displayLabel', 'supportingDocumentId', 'fieldName', 'mimeType'] as $c) {
         $this->{$c} = \Echosign\array_get($config, $c);
     }
     $this->agreementDoc = $agreementDocuments;
 }
コード例 #3
0
ファイル: AgreementInfo.php プロジェクト: nsbucky/echosign
 public function __construct(array $response, Agreement $agreement)
 {
     $this->message = \Echosign\array_get($response, 'message');
     $this->expiration = array_key_exists('expiration', $response) ? \DateTime::createFromFormat(\DateTime::W3C, $response['expiration']) : null;
     $this->locale = \Echosign\array_get($response, 'locale');
     $this->name = \Echosign\array_get($response, 'name');
     $this->agreementId = \Echosign\array_get($response, 'agreementId');
     $this->latestVersionId = \Echosign\array_get($response, 'latestVersionId');
     if (array_key_exists('securityOptions', $response)) {
         foreach ($response['securityOptions'] as $option) {
             $doc = new DocSecurityOption($option);
             $this->securityOptions[] = $doc;
         }
     }
     $this->status = new AgreementStatus($response['status']);
     if (array_key_exists('events', $response)) {
         foreach ($response['events'] as $event) {
             $this->events[] = new DocumentHistoryEvent($event);
         }
     }
     if (array_key_exists('nextParticipantInfos', $response)) {
         foreach ($response['nextParticipantInfos'] as $npi) {
             $this->nextParticipantInfos[] = new NextParticipantInfo($npi);
         }
     }
     if (array_key_exists('participants', $response)) {
         foreach ($response['participants'] as $p) {
             $this->participants[] = new ParticipantInfo($p);
         }
     }
     $this->agreement = $agreement;
 }
コード例 #4
0
 public function __construct(array $response)
 {
     foreach (['agreementId', 'embeddedCode', 'url'] as $k) {
         $this->{$k} = \Echosign\array_get($response, $k);
     }
     if (isset($response['expiration'])) {
         $this->expiration = \DateTime::createFromFormat(\DateTime::W3C, $response['expiration']);
     }
 }
コード例 #5
0
ファイル: UserAgreement.php プロジェクト: nsbucky/echosign
 /**
  * @param array $response
  * @param Agreement $agreement
  */
 public function __construct(array $response, Agreement $agreement)
 {
     $this->displayDate = \DateTime::createFromFormat(\DateTime::W3C, $response['displayDate']);
     $this->status = new UserDocumentStatus($response['status']);
     $this->name = $response['name'];
     $this->displayUserInfo = new DisplayUserInfo(\Echosign\array_get($response['displayUserInfo'], 'company'), \Echosign\array_get($response['displayUserInfo'], 'fullNameOrEmail'));
     $this->agreementId = $response['agreementId'];
     $this->esign = (bool) $response['esign'];
     $this->latestVersionId = $response['latestVersionId'];
     $this->agreement = $agreement;
 }
コード例 #6
0
 /**
  * @param array $config
  * @param Documents $document
  */
 public function __construct(array $config, Documents $document)
 {
     foreach (['displayLabel', 'supportingDocumentId', 'mimeType'] as $c) {
         $this->{$c} = \Echosign\array_get($config, $c);
     }
     $this->document = $document;
     // there might a screw up with adobes docs. so this is why this is here.
     if (array_key_exists('fieldName', $config)) {
         $this->fieldName = $config['fieldName'];
     }
     if (array_key_exists('fieldname', $config)) {
         $this->fieldName = $config['fieldname'];
     }
 }
コード例 #7
0
 /**
  * @param array $config
  */
 public function __construct(array $config)
 {
     $this->synchronizationKey = \Echosign\array_get($config, 'synchronizationKey');
     $this->participantEmail = \Echosign\array_get($config, 'participantEmail');
     $this->description = \Echosign\array_get($config, 'description');
     $this->versionId = \Echosign\array_get($config, 'versionId');
     $this->comment = \Echosign\array_get($config, 'comment');
     $this->actingUserIpAddress = \Echosign\array_get($config, 'actingUserIpAddress');
     $this->actingUserEmail = \Echosign\array_get($config, 'actingUserEmail');
     if (array_key_exists('date', $config)) {
         $this->date = \DateTime::createFromFormat(\DateTime::W3C, $config['date']);
     }
     if (array_key_exists('type', $config)) {
         $this->type = new EventType($config['type']);
     }
     if (array_key_exists('deviceLocation', $config)) {
         $this->deviceLocation = new LibDocEventDeviceLocation($config['deviceLocation']['latitude'], $config['deviceLocation']['longitude']);
     }
 }
コード例 #8
0
 /**
  * @param array $config
  */
 public function __construct(array $config)
 {
     foreach (['title', 'email', 'company', 'name'] as $k) {
         $this->{$k} = \Echosign\array_get($config, $k);
     }
     if (array_key_exists('securityOptions', $config)) {
         foreach ($config['securityOptions'] as $o) {
             $this->securityOptions[] = new ParticipantInfoSecurityOption($o);
         }
     }
     if (array_key_exists('roles', $config)) {
         foreach ($config['roles'] as $r) {
             $this->roles[] = new ParticipantRole($r);
         }
     }
     if (array_key_exists('alternateParticipants', $config)) {
         foreach ($config['alternateParticipants'] as $p) {
             $this->alternateParticipants[] = new ParticipantInfo($config['alternateParticipants']);
         }
     }
 }
コード例 #9
0
 /**
  * @param array $response
  */
 public function __construct(array $response)
 {
     $this->message = \Echosign\array_get($response, 'message');
     $this->libraryDocumentId = $response['libraryDocumentId'];
     $this->locale = $response['locale'];
     $this->name = $response['name'];
     $this->latestVersionId = $response['latestVersionId'];
     if (array_key_exists('events', $response)) {
         foreach ($response['events'] as $event) {
             $this->events[] = new LibDocumentHistoryEvent($event);
         }
     }
     if (array_key_exists('securityOptions', $response)) {
         foreach ($response['securityOptions'] as $option) {
             $this->securityOptions[] = new LibDocSecurityOption($option);
         }
     }
     if (array_key_exists('participants', $response)) {
         foreach ($response['participants'] as $p) {
             $this->participants[] = new LibDocParticipantInfo($p);
         }
     }
     $this->status = new LibDocStatus($response['status']);
 }
コード例 #10
0
 public function __construct(array $response)
 {
     $this->message = \Echosign\array_get($response, 'message');
     $this->code = \Echosign\array_get($response, 'code');
 }
コード例 #11
0
ファイル: UserWidgets.php プロジェクト: nsbucky/echosign
 public function __construct(array $response)
 {
     foreach ($response['userWidgetList'] as $u) {
         $this->userWidgetList[] = new UserWidget(\Echosign\array_get($u, 'javascript'), \Echosign\array_get($u, 'modifiedDate'), \Echosign\array_get($u, 'name'), \Echosign\array_get($u, 'status'), \Echosign\array_get($u, 'url'), \Echosign\array_get($u, 'widgetId'));
     }
 }
コード例 #12
0
 function __construct(array $response)
 {
     $this->javascript = \Echosign\array_get($response, 'javascript');
     $this->url = \Echosign\array_get($response, 'url');
     $this->widgetId = \Echosign\array_get($response, 'widgetId');
 }