code
stringlengths 15
9.96M
| docstring
stringlengths 1
10.1k
| func_name
stringlengths 1
124
| language
stringclasses 1
value | repo
stringlengths 7
63
| path
stringlengths 6
186
| url
stringlengths 50
236
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
public function __construct(Version $version, Response $response, array $solution)
{
parent::__construct($version, $response);
// Path Solution
$this->solution = $solution;
} | @param Version $version Version that contains the resource
@param Response $response Response from the API
@param array $solution The context solution | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenPage.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenPage.php | MIT |
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
$this->solution = [];
} | Initialize the CredentialInstance
@param Version $version Version that contains the resource
@param mixed[] $payload The response payload | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/CredentialInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/CredentialInstance.php | MIT |
public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
}
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
return $this->$method();
}
throw new TwilioException('Unknown property: ' . $name);
} | Magic getter to access properties
@param string $name Property to access
@return mixed The requested property
@throws TwilioException For unknown properties | __get | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/CredentialInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/CredentialInstance.php | MIT |
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
// Marshaled Properties
$this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'secondaryAuthToken' => Values::array_get($payload, 'secondary_auth_token'),
'url' => Values::array_get($payload, 'url'),
];
$this->solution = [];
} | Initialize the SecondaryAuthTokenInstance
@param Version $version Version that contains the resource
@param mixed[] $payload The response payload | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenInstance.php | MIT |
public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
}
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
return $this->$method();
}
throw new TwilioException('Unknown property: ' . $name);
} | Magic getter to access properties
@param string $name Property to access
@return mixed The requested property
@throws TwilioException For unknown properties | __get | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenInstance.php | MIT |
public function __construct(Version $version, Response $response, array $solution)
{
parent::__construct($version, $response);
// Path Solution
$this->solution = $solution;
} | @param Version $version Version that contains the resource
@param Response $response Response from the API
@param array $solution The context solution | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/BulkContactsPage.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/BulkContactsPage.php | MIT |
public function __construct(Version $version, Response $response, array $solution)
{
parent::__construct($version, $response);
// Path Solution
$this->solution = $solution;
} | @param Version $version Version that contains the resource
@param Response $response Response from the API
@param array $solution The context solution | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/BulkConsentsPage.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/BulkConsentsPage.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
$this->uri = '/SafeList/Numbers';
} | Construct the SafelistList
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/SafelistList.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/SafelistList.php | MIT |
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
// Marshaled Properties
$this->properties = [
'items' => Values::array_get($payload, 'items'),
];
$this->solution = [];
} | Initialize the BulkConsentsInstance
@param Version $version Version that contains the resource
@param mixed[] $payload The response payload | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/BulkConsentsInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/BulkConsentsInstance.php | MIT |
public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
}
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
return $this->$method();
}
throw new TwilioException('Unknown property: ' . $name);
} | Magic getter to access properties
@param string $name Property to access
@return mixed The requested property
@throws TwilioException For unknown properties | __get | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/BulkConsentsInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/BulkConsentsInstance.php | MIT |
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
// Marshaled Properties
$this->properties = [
'items' => Values::array_get($payload, 'items'),
];
$this->solution = [];
} | Initialize the BulkContactsInstance
@param Version $version Version that contains the resource
@param mixed[] $payload The response payload | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/BulkContactsInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/BulkContactsInstance.php | MIT |
public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
}
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
return $this->$method();
}
throw new TwilioException('Unknown property: ' . $name);
} | Magic getter to access properties
@param string $name Property to access
@return mixed The requested property
@throws TwilioException For unknown properties | __get | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/BulkContactsInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/BulkContactsInstance.php | MIT |
public function __construct(Version $version, Response $response, array $solution)
{
parent::__construct($version, $response);
// Path Solution
$this->solution = $solution;
} | @param Version $version Version that contains the resource
@param Response $response Response from the API
@param array $solution The context solution | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/Credential/PublicKeyPage.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyPage.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
$this->uri = '/Credentials/AWS';
} | Construct the AwsList
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/Credential/AwsList.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/Credential/AwsList.php | MIT |
public function __construct(Version $version, Response $response, array $solution)
{
parent::__construct($version, $response);
// Path Solution
$this->solution = $solution;
} | @param Version $version Version that contains the resource
@param Response $response Response from the API
@param array $solution The context solution | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/Credential/AwsPage.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/Credential/AwsPage.php | MIT |
public function __construct(
Version $version,
$sid
) {
parent::__construct($version);
// Path Solution
$this->solution = [
'sid' =>
$sid,
];
$this->uri = '/Credentials/PublicKeys/' . \rawurlencode($sid)
.'';
} | Initialize the PublicKeyContext
@param Version $version Version that contains the resource
@param string $sid The Twilio-provided string that uniquely identifies the PublicKey resource to delete. | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/Credential/PublicKeyContext.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyContext.php | MIT |
public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
}
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
return $this->$method();
}
throw new TwilioException('Unknown property: ' . $name);
} | Magic getter to access properties
@param string $name Property to access
@return mixed The requested property
@throws TwilioException For unknown properties | __get | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/Credential/PublicKeyInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyInstance.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
$this->uri = '/Credentials/PublicKeys';
} | Construct the PublicKeyList
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/Credential/PublicKeyList.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyList.php | MIT |
public function __construct(
Version $version,
$sid
) {
parent::__construct($version);
// Path Solution
$this->solution = [
'sid' =>
$sid,
];
$this->uri = '/Credentials/AWS/' . \rawurlencode($sid)
.'';
} | Initialize the AwsContext
@param Version $version Version that contains the resource
@param string $sid The Twilio-provided string that uniquely identifies the AWS resource to delete. | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/Credential/AwsContext.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/Credential/AwsContext.php | MIT |
public function __construct(
string $friendlyName = Values::NONE,
string $accountSid = Values::NONE
) {
$this->options['friendlyName'] = $friendlyName;
$this->options['accountSid'] = $accountSid;
} | @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
@param string $accountSid The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.php | MIT |
public function __construct(
string $friendlyName = Values::NONE
) {
$this->options['friendlyName'] = $friendlyName;
} | @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long. | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.php | MIT |
public function __construct(
string $friendlyName = Values::NONE,
string $accountSid = Values::NONE
) {
$this->options['friendlyName'] = $friendlyName;
$this->options['accountSid'] = $accountSid;
} | @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
@param string $accountSid The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request. | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.php | MIT |
public function __construct(
string $friendlyName = Values::NONE
) {
$this->options['friendlyName'] = $friendlyName;
} | @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long. | __construct | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.php | MIT |
public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
}
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
return $this->$method();
}
throw new TwilioException('Unknown property: ' . $name);
} | Magic getter to access properties
@param string $name Property to access
@return mixed The requested property
@throws TwilioException For unknown properties | __get | php | twilio/twilio-php | src/Twilio/Rest/Accounts/V1/Credential/AwsInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/Accounts/V1/Credential/AwsInstance.php | MIT |
public function __construct(Domain $domain)
{
parent::__construct($domain);
$this->version = 'v2';
} | Construct the V2 version of FlexApi
@param Domain $domain Domain that contains the version | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V2.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V2.php | MIT |
public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
return $this->$method();
}
throw new TwilioException('Unknown resource ' . $name);
} | Magic getter to lazy load root resources
@param string $name Resource to return
@return \Twilio\ListResource The requested resource
@throws TwilioException For unknown resource | __get | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V2.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V2.php | MIT |
public function __construct(Domain $domain)
{
parent::__construct($domain);
$this->version = 'v1';
} | Construct the V1 version of FlexApi
@param Domain $domain Domain that contains the version | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1.php | MIT |
public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
return $this->$method();
}
throw new TwilioException('Unknown resource ' . $name);
} | Magic getter to lazy load root resources
@param string $name Resource to return
@return \Twilio\ListResource The requested resource
@throws TwilioException For unknown resource | __get | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1.php | MIT |
public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
}
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
return $this->$method();
}
throw new TwilioException('Unknown property: ' . $name);
} | Magic getter to access properties
@param string $name Property to access
@return mixed The requested property
@throws TwilioException For unknown properties | __get | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/PluginReleaseInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/PluginReleaseInstance.php | MIT |
public function __construct(
string $authorization = Values::NONE
) {
$this->options['authorization'] = $authorization;
} | @param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentOptions.php | MIT |
public function __construct(
string $segmentId = Values::NONE,
string $agentId = Values::NONE,
string $authorization = Values::NONE
) {
$this->options['segmentId'] = $segmentId;
$this->options['agentId'] = $agentId;
$this->options['authorization'] = $authorization;
} | @param string $segmentId The id of the segment.
@param string $agentId The id of the agent.
@param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentOptions.php | MIT |
public function __construct(Version $version, Response $response, array $solution)
{
parent::__construct($version, $response);
// Path Solution
$this->solution = $solution;
} | @param Version $version Version that contains the resource
@param Response $response Response from the API
@param array $solution The context solution | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentPage.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentPage.php | MIT |
public function __construct(
string $authorization = Values::NONE
) {
$this->options['authorization'] = $authorization;
} | @param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.php | MIT |
public function __construct(
string $authorization = Values::NONE
) {
$this->options['authorization'] = $authorization;
} | @param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.php | MIT |
public function __construct(
string $authorization = Values::NONE
) {
$this->options['authorization'] = $authorization;
} | @param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.php | MIT |
public function __construct(
string $authorization = Values::NONE
) {
$this->options['authorization'] = $authorization;
} | @param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.php | MIT |
public function __construct(
Version $version,
$questionnaireSid
) {
parent::__construct($version);
// Path Solution
$this->solution = [
'questionnaireSid' =>
$questionnaireSid,
];
$this->uri = '/Insights/QualityManagement/Questionnaires/' . \rawurlencode($questionnaireSid)
.'';
} | Initialize the InsightsQuestionnairesContext
@param Version $version Version that contains the resource
@param string $questionnaireSid The SID of the questionnaire | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesContext.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesContext.php | MIT |
public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
}
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
return $this->$method();
}
throw new TwilioException('Unknown property: ' . $name);
} | Magic getter to access properties
@param string $name Property to access
@return mixed The requested property
@throws TwilioException For unknown properties | __get | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionInstance.php | MIT |
public function __construct(
string $friendlyName = Values::NONE,
string $description = Values::NONE,
string $flexMetadata = Values::NONE
) {
$this->options['friendlyName'] = $friendlyName;
$this->options['description'] = $description;
$this->options['flexMetadata'] = $flexMetadata;
} | @param string $friendlyName The Flex Plugin's friendly name.
@param string $description A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long
@param string $flexMetadata The Flex-Metadata HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/PluginOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/PluginOptions.php | MIT |
public function __construct(
string $flexMetadata = Values::NONE
) {
$this->options['flexMetadata'] = $flexMetadata;
} | @param string $flexMetadata The Flex-Metadata HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/PluginOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/PluginOptions.php | MIT |
public function __construct(
string $flexMetadata = Values::NONE
) {
$this->options['flexMetadata'] = $flexMetadata;
} | @param string $flexMetadata The Flex-Metadata HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/PluginOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/PluginOptions.php | MIT |
public function __construct(
string $friendlyName = Values::NONE,
string $description = Values::NONE,
string $flexMetadata = Values::NONE
) {
$this->options['friendlyName'] = $friendlyName;
$this->options['description'] = $description;
$this->options['flexMetadata'] = $flexMetadata;
} | @param string $friendlyName The Flex Plugin's friendly name.
@param string $description A descriptive string that you update to describe the plugin resource. It can be up to 500 characters long
@param string $flexMetadata The Flex-Metadata HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/PluginOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/PluginOptions.php | MIT |
public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
}
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
return $this->$method();
}
throw new TwilioException('Unknown property: ' . $name);
} | Magic getter to access properties
@param string $name Property to access
@return mixed The requested property
@throws TwilioException For unknown properties | __get | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/FlexFlowInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/FlexFlowInstance.php | MIT |
public function __construct(
string $authorization = Values::NONE
) {
$this->options['authorization'] = $authorization;
} | @param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentOptions.php | MIT |
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
// Marshaled Properties
$this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'attributes' => Values::array_get($payload, 'attributes'),
'status' => Values::array_get($payload, 'status'),
'taskrouterWorkspaceSid' => Values::array_get($payload, 'taskrouter_workspace_sid'),
'taskrouterTargetWorkflowSid' => Values::array_get($payload, 'taskrouter_target_workflow_sid'),
'taskrouterTargetTaskqueueSid' => Values::array_get($payload, 'taskrouter_target_taskqueue_sid'),
'taskrouterTaskqueues' => Values::array_get($payload, 'taskrouter_taskqueues'),
'taskrouterSkills' => Values::array_get($payload, 'taskrouter_skills'),
'taskrouterWorkerChannels' => Values::array_get($payload, 'taskrouter_worker_channels'),
'taskrouterWorkerAttributes' => Values::array_get($payload, 'taskrouter_worker_attributes'),
'taskrouterOfflineActivitySid' => Values::array_get($payload, 'taskrouter_offline_activity_sid'),
'runtimeDomain' => Values::array_get($payload, 'runtime_domain'),
'messagingServiceInstanceSid' => Values::array_get($payload, 'messaging_service_instance_sid'),
'chatServiceInstanceSid' => Values::array_get($payload, 'chat_service_instance_sid'),
'flexServiceInstanceSid' => Values::array_get($payload, 'flex_service_instance_sid'),
'flexInstanceSid' => Values::array_get($payload, 'flex_instance_sid'),
'uiLanguage' => Values::array_get($payload, 'ui_language'),
'uiAttributes' => Values::array_get($payload, 'ui_attributes'),
'uiDependencies' => Values::array_get($payload, 'ui_dependencies'),
'uiVersion' => Values::array_get($payload, 'ui_version'),
'serviceVersion' => Values::array_get($payload, 'service_version'),
'callRecordingEnabled' => Values::array_get($payload, 'call_recording_enabled'),
'callRecordingWebhookUrl' => Values::array_get($payload, 'call_recording_webhook_url'),
'crmEnabled' => Values::array_get($payload, 'crm_enabled'),
'crmType' => Values::array_get($payload, 'crm_type'),
'crmCallbackUrl' => Values::array_get($payload, 'crm_callback_url'),
'crmFallbackUrl' => Values::array_get($payload, 'crm_fallback_url'),
'crmAttributes' => Values::array_get($payload, 'crm_attributes'),
'publicAttributes' => Values::array_get($payload, 'public_attributes'),
'pluginServiceEnabled' => Values::array_get($payload, 'plugin_service_enabled'),
'pluginServiceAttributes' => Values::array_get($payload, 'plugin_service_attributes'),
'integrations' => Values::array_get($payload, 'integrations'),
'outboundCallFlows' => Values::array_get($payload, 'outbound_call_flows'),
'serverlessServiceSids' => Values::array_get($payload, 'serverless_service_sids'),
'queueStatsConfiguration' => Values::array_get($payload, 'queue_stats_configuration'),
'notifications' => Values::array_get($payload, 'notifications'),
'markdown' => Values::array_get($payload, 'markdown'),
'url' => Values::array_get($payload, 'url'),
'flexInsightsHr' => Values::array_get($payload, 'flex_insights_hr'),
'flexInsightsDrilldown' => Values::array_get($payload, 'flex_insights_drilldown'),
'flexUrl' => Values::array_get($payload, 'flex_url'),
'channelConfigs' => Values::array_get($payload, 'channel_configs'),
'debuggerIntegration' => Values::array_get($payload, 'debugger_integration'),
'flexUiStatusReport' => Values::array_get($payload, 'flex_ui_status_report'),
'agentConvEndMethods' => Values::array_get($payload, 'agent_conv_end_methods'),
'citrixVoiceVdi' => Values::array_get($payload, 'citrix_voice_vdi'),
'offlineConfig' => Values::array_get($payload, 'offline_config'),
];
$this->solution = [];
} | Initialize the ConfigurationInstance
@param Version $version Version that contains the resource
@param mixed[] $payload The response payload | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/ConfigurationInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/ConfigurationInstance.php | MIT |
public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
}
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
return $this->$method();
}
throw new TwilioException('Unknown property: ' . $name);
} | Magic getter to access properties
@param string $name Property to access
@return mixed The requested property
@throws TwilioException For unknown properties | __get | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/ConfigurationInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/ConfigurationInstance.php | MIT |
public function __construct(
string $uiVersion = Values::NONE
) {
$this->options['uiVersion'] = $uiVersion;
} | @param string $uiVersion The Pinned UI version of the Configuration resource to fetch. | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.php | MIT |
public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
}
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
return $this->$method();
}
throw new TwilioException('Unknown property: ' . $name);
} | Magic getter to access properties
@param string $name Property to access
@return mixed The requested property
@throws TwilioException For unknown properties | __get | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/ChannelInstance.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/ChannelInstance.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
$this->uri = '/Insights/UserRoles';
} | Initialize the InsightsUserRolesContext
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsUserRolesContext.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsUserRolesContext.php | MIT |
public function __construct(
string $flexMetadata = Values::NONE
) {
$this->options['flexMetadata'] = $flexMetadata;
} | @param string $flexMetadata The Flex-Metadata HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/PluginVersionArchiveOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/PluginVersionArchiveOptions.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
$this->uri = '/Configuration';
} | Initialize the ConfigurationContext
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/ConfigurationContext.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/ConfigurationContext.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
$this->uri = '/Insights/QualityManagement/Questions';
} | Construct the InsightsQuestionnairesQuestionList
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionList.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionList.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
$this->uri = '/Interactions';
} | Construct the InteractionList
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InteractionList.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InteractionList.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
$this->uri = '/Insights/QualityManagement/Assessments';
} | Construct the AssessmentsList
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/AssessmentsList.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/AssessmentsList.php | MIT |
public function __construct(
string $description = Values::NONE,
bool $active = Values::BOOL_NONE,
array $questionSids = Values::ARRAY_NONE,
string $authorization = Values::NONE
) {
$this->options['description'] = $description;
$this->options['active'] = $active;
$this->options['questionSids'] = $questionSids;
$this->options['authorization'] = $authorization;
} | @param string $description The description of this questionnaire
@param bool $active The flag to enable or disable questionnaire
@param string[] $questionSids The list of questions sids under a questionnaire
@param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.php | MIT |
public function __construct(
string $authorization = Values::NONE
) {
$this->options['authorization'] = $authorization;
} | @param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.php | MIT |
public function __construct(
string $authorization = Values::NONE
) {
$this->options['authorization'] = $authorization;
} | @param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.php | MIT |
public function __construct(
bool $includeInactive = Values::BOOL_NONE,
string $authorization = Values::NONE
) {
$this->options['includeInactive'] = $includeInactive;
$this->options['authorization'] = $authorization;
} | @param bool $includeInactive Flag indicating whether to include inactive questionnaires or not
@param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.php | MIT |
public function __construct(
string $name = Values::NONE,
string $description = Values::NONE,
array $questionSids = Values::ARRAY_NONE,
string $authorization = Values::NONE
) {
$this->options['name'] = $name;
$this->options['description'] = $description;
$this->options['questionSids'] = $questionSids;
$this->options['authorization'] = $authorization;
} | @param string $name The name of this questionnaire
@param string $description The description of this questionnaire
@param string[] $questionSids The list of questions sids under a questionnaire
@param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.php | MIT |
public function __construct(
array $routing = Values::ARRAY_NONE,
string $interactionContextSid = Values::NONE
) {
$this->options['routing'] = $routing;
$this->options['interactionContextSid'] = $interactionContextSid;
} | @param array $routing The Interaction's routing logic.
@param string $interactionContextSid The Interaction context sid is used for adding a context lookup sid | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InteractionOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InteractionOptions.php | MIT |
public function __construct(Version $version, Response $response, array $solution)
{
parent::__construct($version, $response);
// Path Solution
$this->solution = $solution;
} | @param Version $version Version that contains the resource
@param Response $response Response from the API
@param array $solution The context solution | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsPage.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsPage.php | MIT |
public function __construct(
string $description = Values::NONE,
string $authorization = Values::NONE
) {
$this->options['description'] = $description;
$this->options['authorization'] = $authorization;
} | @param string $description The description for the question.
@param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.php | MIT |
public function __construct(
string $authorization = Values::NONE
) {
$this->options['authorization'] = $authorization;
} | @param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.php | MIT |
public function __construct(
array $categorySid = Values::ARRAY_NONE,
string $authorization = Values::NONE
) {
$this->options['categorySid'] = $categorySid;
$this->options['authorization'] = $authorization;
} | @param string[] $categorySid The list of category SIDs
@param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.php | MIT |
public function __construct(
string $categorySid = Values::NONE,
string $question = Values::NONE,
string $description = Values::NONE,
string $answerSetId = Values::NONE,
string $authorization = Values::NONE
) {
$this->options['categorySid'] = $categorySid;
$this->options['question'] = $question;
$this->options['description'] = $description;
$this->options['answerSetId'] = $answerSetId;
$this->options['authorization'] = $authorization;
} | @param string $categorySid The SID of the category
@param string $question The question.
@param string $description The description for the question.
@param string $answerSetId The answer_set for the question.
@param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.php | MIT |
public function __construct(Version $version, Response $response, array $solution)
{
parent::__construct($version, $response);
// Path Solution
$this->solution = $solution;
} | @param Version $version Version that contains the resource
@param Response $response Response from the API
@param array $solution The context solution | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/ProvisioningStatusPage.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/ProvisioningStatusPage.php | MIT |
public function __construct(
string $flexMetadata = Values::NONE
) {
$this->options['flexMetadata'] = $flexMetadata;
} | @param string $flexMetadata The Flex-Metadata HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/PluginReleaseOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/PluginReleaseOptions.php | MIT |
public function __construct(
string $flexMetadata = Values::NONE
) {
$this->options['flexMetadata'] = $flexMetadata;
} | @param string $flexMetadata The Flex-Metadata HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/PluginReleaseOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/PluginReleaseOptions.php | MIT |
public function __construct(
string $flexMetadata = Values::NONE
) {
$this->options['flexMetadata'] = $flexMetadata;
} | @param string $flexMetadata The Flex-Metadata HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/PluginReleaseOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/PluginReleaseOptions.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
} | Construct the PluginConfigurationArchiveList
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/PluginConfigurationArchiveList.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/PluginConfigurationArchiveList.php | MIT |
public function __construct(
Version $version,
$sid
) {
parent::__construct($version);
// Path Solution
$this->solution = [
'sid' =>
$sid,
];
$this->uri = '/Interactions/' . \rawurlencode($sid)
.'';
} | Initialize the InteractionContext
@param Version $version Version that contains the resource
@param string $sid The SID of the Interaction resource to fetch. | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InteractionContext.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InteractionContext.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
$this->uri = '/Insights/QualityManagement/Settings/AnswerSets';
} | Construct the InsightsSettingsAnswerSetsList
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsList.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsList.php | MIT |
public function __construct(Version $version, Response $response, array $solution)
{
parent::__construct($version, $response);
// Path Solution
$this->solution = $solution;
} | @param Version $version Version that contains the resource
@param Response $response Response from the API
@param array $solution The context solution | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/PluginConfigurationArchivePage.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/PluginConfigurationArchivePage.php | MIT |
public function __construct(
Version $version,
$questionSid
) {
parent::__construct($version);
// Path Solution
$this->solution = [
'questionSid' =>
$questionSid,
];
$this->uri = '/Insights/QualityManagement/Questions/' . \rawurlencode($questionSid)
.'';
} | Initialize the InsightsQuestionnairesQuestionContext
@param Version $version Version that contains the resource
@param string $questionSid The SID of the question | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionContext.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionContext.php | MIT |
public function __construct(
Version $version,
$sid
) {
parent::__construct($version);
// Path Solution
$this->solution = [
'sid' =>
$sid,
];
$this->uri = '/PluginService/Configurations/' . \rawurlencode($sid)
.'/Archive';
} | Initialize the PluginConfigurationArchiveContext
@param Version $version Version that contains the resource
@param string $sid The SID of the Flex Plugin Configuration resource to archive. | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/PluginConfigurationArchiveContext.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/PluginConfigurationArchiveContext.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
$this->uri = '/Channels';
} | Construct the ChannelList
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/ChannelList.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/ChannelList.php | MIT |
public function __construct(
string $segmentId = Values::NONE,
array $reservationId = Values::ARRAY_NONE,
string $authorization = Values::NONE
) {
$this->options['segmentId'] = $segmentId;
$this->options['reservationId'] = $reservationId;
$this->options['authorization'] = $authorization;
} | @param string $segmentId To unique id of the segment
@param string[] $reservationId The list of reservation Ids
@param string $authorization The Authorization HTTP request header | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InsightsSegmentsOptions.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InsightsSegmentsOptions.php | MIT |
public function __construct(Version $version, Response $response, array $solution)
{
parent::__construct($version, $response);
// Path Solution
$this->solution = $solution;
} | @param Version $version Version that contains the resource
@param Response $response Response from the API
@param array $solution The context solution | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/InteractionPage.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/InteractionPage.php | MIT |
public function __construct(Version $version, Response $response, array $solution)
{
parent::__construct($version, $response);
// Path Solution
$this->solution = $solution;
} | @param Version $version Version that contains the resource
@param Response $response Response from the API
@param array $solution The context solution | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/ChannelPage.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/ChannelPage.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
$this->uri = '/WebChannels';
} | Construct the WebChannelList
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/WebChannelList.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/WebChannelList.php | MIT |
public function __construct(
Version $version
) {
parent::__construct($version);
// Path Solution
$this->solution = [
];
$this->uri = '/FlexFlows';
} | Construct the FlexFlowList
@param Version $version Version that contains the resource | __construct | php | twilio/twilio-php | src/Twilio/Rest/FlexApi/V1/FlexFlowList.php | https://github.com/twilio/twilio-php/blob/master/src/Twilio/Rest/FlexApi/V1/FlexFlowList.php | MIT |
final public function loadSettings($build_object) {
$this->settings = $build_object->getDetails();
return $this;
} | Loads the settings for this build step implementation from a build
step or target. | loadSettings | php | phorgeit/phorge | src/applications/harbormaster/step/HarbormasterBuildStepImplementation.php | https://github.com/phorgeit/phorge/blob/master/src/applications/harbormaster/step/HarbormasterBuildStepImplementation.php | Apache-2.0 |
public function getArtifactInputs() {
return array();
} | Return the name of artifacts produced by this command.
Future steps will calculate all available artifact mappings
before them and filter on the type.
@return array The mappings of artifact names to their types. | getArtifactInputs | php | phorgeit/phorge | src/applications/harbormaster/step/HarbormasterBuildStepImplementation.php | https://github.com/phorgeit/phorge/blob/master/src/applications/harbormaster/step/HarbormasterBuildStepImplementation.php | Apache-2.0 |
private function getAutosteps(array $autotargets) {
$all_steps = HarbormasterBuildStepImplementation::getImplementations();
$all_steps = mpull($all_steps, null, 'getBuildStepAutotargetStepKey');
// Make sure all the targets really exist.
foreach ($autotargets as $autotarget) {
if (empty($all_steps[$autotarget])) {
throw new Exception(
pht(
'No build step provides autotarget "%s"!',
$autotarget));
}
}
return array_select_keys($all_steps, $autotargets);
} | Get all of the @{class:HarbormasterBuildStepImplementation} objects for
a list of autotarget keys.
@param list<string> $autotargets Autotarget keys, like `"core.arc.lint"`.
@return map<string, object> Map of keys to implementations. | getAutosteps | php | phorgeit/phorge | src/applications/harbormaster/engine/HarbormasterTargetEngine.php | https://github.com/phorgeit/phorge/blob/master/src/applications/harbormaster/engine/HarbormasterTargetEngine.php | Apache-2.0 |
public function handleRequest(AphrontRequest $request) {
$raw_body = PhabricatorStartup::getRawInput();
$body = phutil_json_decode($raw_body);
$payload = $body['payload'];
$parameters = idx($payload, 'build_parameters');
if (!$parameters) {
$parameters = array();
}
$target_phid = idx($parameters, 'HARBORMASTER_BUILD_TARGET_PHID');
// NOTE: We'll get callbacks here for builds we triggered, but also for
// arbitrary builds the system executes for other reasons. So it's normal
// to get some notifications with no Build Target PHID. We just ignore
// these under the assumption that they're routine builds caused by events
// like branch updates.
if ($target_phid) {
$viewer = PhabricatorUser::getOmnipotentUser();
$target = id(new HarbormasterBuildTargetQuery())
->setViewer($viewer)
->withPHIDs(array($target_phid))
->needBuildSteps(true)
->executeOne();
if ($target) {
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
$this->updateTarget($target, $payload);
}
}
$response = new AphrontWebpageResponse();
$response->setContent(pht("Request OK\n"));
return $response;
} | @phutil-external-symbol class PhabricatorStartup | handleRequest | php | phorgeit/phorge | src/applications/harbormaster/integration/circleci/HarbormasterCircleCIHookHandler.php | https://github.com/phorgeit/phorge/blob/master/src/applications/harbormaster/integration/circleci/HarbormasterCircleCIHookHandler.php | Apache-2.0 |
public function handleRequest(AphrontRequest $request) {
$raw_body = PhabricatorStartup::getRawInput();
$body = phutil_json_decode($raw_body);
$event = idx($body, 'event');
if ($event != 'build.finished') {
return $this->newHookResponse(pht('OK: Ignored event.'));
}
$build = idx($body, 'build');
if (!is_array($build)) {
throw new Exception(
pht(
'Expected "%s" property to contain a dictionary.',
'build'));
}
$meta_data = idx($build, 'meta_data');
if (!is_array($meta_data)) {
throw new Exception(
pht(
'Expected "%s" property to contain a dictionary.',
'build.meta_data'));
}
$target_phid = idx($meta_data, 'buildTargetPHID');
if (!$target_phid) {
return $this->newHookResponse(pht('OK: No Harbormaster target PHID.'));
}
$viewer = PhabricatorUser::getOmnipotentUser();
$target = id(new HarbormasterBuildTargetQuery())
->setViewer($viewer)
->withPHIDs(array($target_phid))
->needBuildSteps(true)
->executeOne();
if (!$target) {
throw new Exception(
pht(
'Harbormaster build target "%s" does not exist.',
$target_phid));
}
$step = $target->getBuildStep();
$impl = $step->getStepImplementation();
if (!($impl instanceof HarbormasterBuildkiteBuildStepImplementation)) {
throw new Exception(
pht(
'Harbormaster build target "%s" is not a Buildkite build step. '.
'Only Buildkite steps may be updated via the Buildkite hook.',
$target_phid));
}
$webhook_token = $impl->getSetting('webhook.token');
$request_token = $request->getHTTPHeader('X-Buildkite-Token');
if (!phutil_hashes_are_identical($webhook_token, $request_token)) {
throw new Exception(
pht(
'Buildkite request to target "%s" had the wrong authentication '.
'token. The Buildkite pipeline and Harbormaster build step must '.
'be configured with the same token.',
$target_phid));
}
$state = idx($build, 'state');
switch ($state) {
case 'passed':
$message_type = HarbormasterMessageType::MESSAGE_PASS;
break;
default:
$message_type = HarbormasterMessageType::MESSAGE_FAIL;
break;
}
$api_method = 'harbormaster.sendmessage';
$api_params = array(
'buildTargetPHID' => $target_phid,
'type' => $message_type,
);
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
id(new ConduitCall($api_method, $api_params))
->setUser($viewer)
->execute();
unset($unguarded);
return $this->newHookResponse(pht('OK: Processed event.'));
} | @phutil-external-symbol class PhabricatorStartup | handleRequest | php | phorgeit/phorge | src/applications/harbormaster/integration/buildkite/HarbormasterBuildkiteHookHandler.php | https://github.com/phorgeit/phorge/blob/master/src/applications/harbormaster/integration/buildkite/HarbormasterBuildkiteHookHandler.php | Apache-2.0 |
public function getPathMatchStrength($path_fragments, $path_count) {
$this_path = $this->path;
if ($this_path === '/') {
// The root path "/" just matches everything with strength 1.
return 1;
}
if ($this->fragments === null) {
$this->fragments = PhabricatorOwnersPackage::splitPath($this_path);
$this->fragmentCount = count($this->fragments);
}
$self_fragments = $this->fragments;
$self_count = $this->fragmentCount;
if ($self_count > $path_count) {
// If this path is longer (and therefore more specific) than the target
// path, we don't match it at all.
return 0;
}
for ($ii = 0; $ii < $self_count; $ii++) {
if ($self_fragments[$ii] != $path_fragments[$ii]) {
return 0;
}
}
return $self_count;
} | Get the number of directory matches between this path specification and
some real path. | getPathMatchStrength | php | phorgeit/phorge | src/applications/owners/storage/PhabricatorOwnersPath.php | https://github.com/phorgeit/phorge/blob/master/src/applications/owners/storage/PhabricatorOwnersPath.php | Apache-2.0 |
public function withOwnerPHIDs(array $phids) {
$this->ownerPHIDs = $phids;
return $this;
} | Query owner PHIDs exactly. This does not expand authorities, so a user
PHID will not match projects the user is a member of. | withOwnerPHIDs | php | phorgeit/phorge | src/applications/owners/query/PhabricatorOwnersPackageQuery.php | https://github.com/phorgeit/phorge/blob/master/src/applications/owners/query/PhabricatorOwnersPackageQuery.php | Apache-2.0 |
public function withAuthorityPHIDs(array $phids) {
$this->authorityPHIDs = $phids;
return $this;
} | Query owner authority. This will expand authorities, so a user PHID will
match both packages they own directly and packages owned by a project they
are a member of. | withAuthorityPHIDs | php | phorgeit/phorge | src/applications/owners/query/PhabricatorOwnersPackageQuery.php | https://github.com/phorgeit/phorge/blob/master/src/applications/owners/query/PhabricatorOwnersPackageQuery.php | Apache-2.0 |
protected function getFeedStory() {
if (!$this->feedStory) {
$story = $this->loadFeedStory();
$this->feedStory = $story;
}
return $this->feedStory;
} | Get the @{class:PhabricatorFeedStory} that should be published.
@return PhabricatorFeedStory The story to publish.
@task context | getFeedStory | php | phorgeit/phorge | src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | https://github.com/phorgeit/phorge/blob/master/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | Apache-2.0 |
protected function getViewer() {
return PhabricatorUser::getOmnipotentUser();
} | Get the viewer for the act of publishing.
NOTE: Publishing currently uses the omnipotent viewer because it depends
on loading external accounts. Possibly we should tailor this. See T3732.
Using the actor for most operations might make more sense.
@return PhabricatorUser Viewer.
@task context | getViewer | php | phorgeit/phorge | src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | https://github.com/phorgeit/phorge/blob/master/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | Apache-2.0 |
protected function getPublisher() {
return $this->publisher;
} | Get the @{class:DoorkeeperFeedStoryPublisher} which handles this object.
@return DoorkeeperFeedStoryPublisher Object publisher.
@task context | getPublisher | php | phorgeit/phorge | src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | https://github.com/phorgeit/phorge/blob/master/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | Apache-2.0 |
protected function getStoryObject() {
if (!$this->storyObject) {
$story = $this->getFeedStory();
try {
$object = $story->getPrimaryObject();
} catch (Exception $ex) {
throw new PhabricatorWorkerPermanentFailureException(
$ex->getMessage());
}
$this->storyObject = $object;
}
return $this->storyObject;
} | Get the primary object the story is about, like a
@{class:DifferentialRevision} or @{class:ManiphestTask}.
@return object Object which the story is about.
@task context | getStoryObject | php | phorgeit/phorge | src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | https://github.com/phorgeit/phorge/blob/master/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | Apache-2.0 |
final protected function doWork() {
if (PhabricatorEnv::getEnvConfig('phabricator.silent')) {
$this->log("%s\n", pht('This software is running in silent mode.'));
return;
}
if (!$this->isEnabled()) {
$this->log(
"%s\n",
pht("Doorkeeper worker '%s' is not enabled.", get_class($this)));
return;
}
$publisher = $this->loadPublisher();
if (!$publisher) {
$this->log("%s\n", pht('Story is about an unsupported object type.'));
return;
} else {
$this->log("%s\n", pht("Using publisher '%s'.", get_class($publisher)));
}
$this->publishFeedStory();
} | Doorkeeper workers set up some context, then call
@{method:publishFeedStory}. | doWork | php | phorgeit/phorge | src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | https://github.com/phorgeit/phorge/blob/master/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | Apache-2.0 |
public function getMaximumRetryCount() {
return 4;
} | By default, Doorkeeper workers perform a small number of retries with
exponential backoff. A consideration in this policy is that many of these
workers are laden with side effects. | getMaximumRetryCount | php | phorgeit/phorge | src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | https://github.com/phorgeit/phorge/blob/master/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | Apache-2.0 |
public function getWaitBeforeRetry(PhabricatorWorkerTask $task) {
$count = $task->getFailureCount();
return (5 * 60) * pow(8, $count);
} | See @{method:getMaximumRetryCount} for a description of Doorkeeper
retry defaults. | getWaitBeforeRetry | php | phorgeit/phorge | src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | https://github.com/phorgeit/phorge/blob/master/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php | Apache-2.0 |
public function isEnabled() {
return (bool)$this->getWorkspaceID();
} | This worker is enabled when an Asana workspace ID is configured with
`asana.workspace-id`. | isEnabled | php | phorgeit/phorge | src/applications/doorkeeper/worker/DoorkeeperAsanaFeedWorker.php | https://github.com/phorgeit/phorge/blob/master/src/applications/doorkeeper/worker/DoorkeeperAsanaFeedWorker.php | Apache-2.0 |
public function isEnabled() {
return (bool)PhabricatorJIRAAuthProvider::getJIRAProvider();
} | This worker is enabled when a JIRA authentication provider is active. | isEnabled | php | phorgeit/phorge | src/applications/doorkeeper/worker/DoorkeeperJIRAFeedWorker.php | https://github.com/phorgeit/phorge/blob/master/src/applications/doorkeeper/worker/DoorkeeperJIRAFeedWorker.php | Apache-2.0 |
private function getProvider() {
if (!$this->provider) {
$provider = PhabricatorJIRAAuthProvider::getJIRAProvider();
if (!$provider) {
throw new PhabricatorWorkerPermanentFailureException(
pht('No JIRA provider configured.'));
}
$this->provider = $provider;
}
return $this->provider;
} | Get the active JIRA provider.
@return PhabricatorJIRAAuthProvider Active JIRA auth provider.
@task internal | getProvider | php | phorgeit/phorge | src/applications/doorkeeper/worker/DoorkeeperJIRAFeedWorker.php | https://github.com/phorgeit/phorge/blob/master/src/applications/doorkeeper/worker/DoorkeeperJIRAFeedWorker.php | Apache-2.0 |
private function findUsersToPossess() {
$object = $this->getStoryObject();
$publisher = $this->getPublisher();
$data = $this->getFeedStory()->getStoryData();
// Figure out all the users related to the object. Users go into one of
// four buckets. For JIRA integration, we don't care about which bucket
// a user is in, since we just want to publish an update to linked objects.
$owner_phid = $publisher->getOwnerPHID($object);
$active_phids = $publisher->getActiveUserPHIDs($object);
$passive_phids = $publisher->getPassiveUserPHIDs($object);
$follow_phids = $publisher->getCCUserPHIDs($object);
$all_phids = array_merge(
array($owner_phid),
$active_phids,
$passive_phids,
$follow_phids);
$all_phids = array_unique(array_filter($all_phids));
// Even if the actor isn't a reviewer, etc., try to use their account so
// we can post in the correct voice. If we miss, we'll try all the other
// related users.
$try_users = array_merge(
array($data->getAuthorPHID()),
$all_phids);
$try_users = array_filter($try_users);
return $try_users;
} | Get a list of users to act as when publishing into JIRA.
@return list<string> Candidate user PHIDs to act as when publishing this
story.
@task internal | findUsersToPossess | php | phorgeit/phorge | src/applications/doorkeeper/worker/DoorkeeperJIRAFeedWorker.php | https://github.com/phorgeit/phorge/blob/master/src/applications/doorkeeper/worker/DoorkeeperJIRAFeedWorker.php | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.