Файл: sngine-v2.8/Script/includes/libs/Twilio/Rest/Authy/V1/FormContext.php
Строк: 80
<?php
/**
* This code was generated by
* / _ _ _| _ _
* | (_)/(_)(_|/| |(/_ v1.0.0
* / /
*/
namespace TwilioRestAuthyV1;
use TwilioExceptionsTwilioException;
use TwilioInstanceContext;
use TwilioValues;
use TwilioVersion;
/**
* PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
*/
class FormContext extends InstanceContext {
/**
* Initialize the FormContext
*
* @param Version $version Version that contains the resource
* @param string $formType The Type of this Form
*/
public function __construct(Version $version, $formType) {
parent::__construct($version);
// Path Solution
$this->solution = ['formType' => $formType, ];
$this->uri = '/Forms/' . rawurlencode($formType) . '';
}
/**
* Fetch the FormInstance
*
* @return FormInstance Fetched FormInstance
* @throws TwilioException When an HTTP error occurs.
*/
public function fetch(): FormInstance {
$payload = $this->version->fetch('GET', $this->uri);
return new FormInstance($this->version, $payload, $this->solution['formType']);
}
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
public function __toString(): string {
$context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Authy.V1.FormContext ' . implode(' ', $context) . ']';
}
}