_id
stringlengths 2
7
| title
stringlengths 3
151
| partition
stringclasses 3
values | text
stringlengths 83
13k
| language
stringclasses 1
value | meta_information
dict |
---|---|---|---|---|---|
q249700 | DrushStack.getVersion | validation | public function getVersion()
{
if (empty($this->drushVersion)) {
$isPrinted = $this->isPrinted;
$this->isPrinted = false;
$result = $this->executeCommand($this->executable . ' version');
$output = $result->getMessage();
$this->drushVersion = 'unknown';
if (preg_match('#[0-9.]+#', $output, $matches)) {
$this->drushVersion = $matches[0];
}
$this->isPrinted = $isPrinted;
}
return $this->drushVersion;
} | php | {
"resource": ""
} |
q249701 | AbstractWrapperCommands.exec | validation | public function exec($command)
{
fwrite($this->_fp, str_replace("\n", '\n', $command) . PHP_EOL);
$answer = fgets($this->_fp); //"ANSWER $bytes" if there is a return value or \n if not
if (is_string($answer)) {
if (substr($answer, 0, 7) === 'ANSWER ') {
$bytes = (int) substr($answer, 7);
if ($bytes > 0) {
$jsonObj = json_decode(trim(fread($this->_fp, $bytes + 1)));
if (is_null($jsonObj)) {
return 'You must enable the json flag on the telegram daemon to get proper response messages here.';
}
return $jsonObj;
}
} else {
return $answer;
}
}
return false;
} | php | {
"resource": ""
} |
q249702 | Url.getCurrentPage | validation | public static function getCurrentPage()
{
$protocol = self::getProtocol();
$host = self::getDomain();
$port = ':' . self::getPort();
$port = (($port == ':80') || ($port == ':443')) ? '' : $port;
$uri = self::getUri();
return $protocol . '://' . $host . $port . $uri;
} | php | {
"resource": ""
} |
q249703 | Url.getBaseUrl | validation | public static function getBaseUrl()
{
$uri = self::addBackSlash(self::getUriMethods(), 'both');
$url = self::addBackSlash(self::getCurrentPage());
if ($uri !== '/') {
$url = trim(str_replace($uri, '', $url), '/');
}
return self::addBackSlash($url);
} | php | {
"resource": ""
} |
q249704 | Url.getProtocol | validation | public static function getProtocol($url = false)
{
if ($url) {
return (preg_match('/^https/', $url)) ? 'https' : 'http';
}
$protocol = strtolower($_SERVER['SERVER_PROTOCOL']);
$protocol = substr($protocol, 0, strpos($protocol, '/'));
$ssl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on');
return ($ssl) ? $protocol . 's' : $protocol;
} | php | {
"resource": ""
} |
q249705 | Url.getDomain | validation | public static function getDomain($url = false)
{
if ($url) {
preg_match('/([\w]+[.]){1,}[a-z]+/', $url, $matches);
return isset($matches[0]) ? $matches[0] : false;
}
return $_SERVER['SERVER_NAME'];
} | php | {
"resource": ""
} |
q249706 | Url.getUriMethods | validation | public static function getUriMethods()
{
$root = str_replace($_SERVER['DOCUMENT_ROOT'], '', getcwd());
$subfolder = trim($root, '/');
return trim(str_replace($subfolder, '', self::getUri()), '/');
} | php | {
"resource": ""
} |
q249707 | Url.setUrlParams | validation | public static function setUrlParams($url = false)
{
$url = $url !== false ? $url : self::getCurrentPage();
if (strpos($url, '?') == false && strpos($url, '&') != false) {
$url = preg_replace('/&/', '?', $url, 1);
$parts = parse_url($url);
$query = isset($parts['query']) ? $parts['query'] : '';
parse_str($query, $query);
}
foreach (isset($query) ? $query : [] as $key => $value) {
$_GET[$key] = $value;
}
return explode('?', $url)[0];
} | php | {
"resource": ""
} |
q249708 | Url.addBackSlash | validation | public static function addBackSlash($uri, $position = 'end')
{
switch ($position) {
case 'top':
$uri = '/' . ltrim($uri, '/');
break;
case 'end':
$uri = rtrim($uri, '/') . '/';
break;
case 'both':
$uri = ! empty($uri) ? '/' . trim($uri, '/') . '/' : '';
break;
default:
$uri = false;
}
return $uri;
} | php | {
"resource": ""
} |
q249709 | EventHelper.getActiveHandlersList | validation | public static function getActiveHandlersList()
{
$cacheKey = 'DevGroup/EventsSystem:activeHandlersList';
$handlers = Yii::$app->cache->get($cacheKey);
if ($handlers === false) {
$eventEventHandlers = EventEventHandler::find()
->where(['is_active' => 1])
->orderBy(['sort_order' => SORT_ASC])
->asArray(true)
->all();
$events = Event::find()
->where(['id' => array_column($eventEventHandlers, 'event_id', 'event_id')])
->indexBy('id')
->asArray(true)
->all();
$eventGroups = EventGroup::find()
->where(['id' => array_column($events, 'event_group_id', 'event_group_id')])
->indexBy('id')
->asArray(true)
->all();
$eventHandlers = EventHandler::find()
->where(['id' => array_column($eventEventHandlers, 'event_handler_id', 'event_handler_id')])
->indexBy('id')
->asArray(true)
->all();
$handlers = [];
foreach ($eventEventHandlers as $eventEventHandler) {
if (isset(
$eventHandlers[$eventEventHandler['event_handler_id']],
$events[$eventEventHandler['event_id']],
$eventGroups[$events[$eventEventHandler['event_id']]['event_group_id']]
) === false
) {
continue;
}
try {
$data = Json::decode($eventEventHandler['packed_json_params']);
} catch (\Exception $e) {
$data = [];
}
$handlers[] = [
'class' => $eventGroups[$events[$eventEventHandler['event_id']]['event_group_id']]['owner_class_name'],
'name' => $events[$eventEventHandler['event_id']]['execution_point'],
'callable' => [
$eventHandlers[$eventEventHandler['event_handler_id']]['class_name'],
$eventEventHandler['method'],
],
'data' => $data,
];
}
Yii::$app->cache->set(
$cacheKey,
$handlers,
86400,
new TagDependency(
[
'tags' => [
NamingHelper::getCommonTag(EventGroup::className()),
NamingHelper::getCommonTag(Event::className()),
NamingHelper::getCommonTag(EventHandler::className()),
NamingHelper::getCommonTag(EventEventHandler::className()),
],
]
)
);
}
return $handlers;
} | php | {
"resource": ""
} |
q249710 | LogComponent.emergency | validation | public function emergency($scope, $message, $context = [], $config = []) {
return $this->write('emergency', $scope, $message, $context, $config);
} | php | {
"resource": ""
} |
q249711 | LogComponent.alert | validation | public function alert($scope, $message, $context = [], $config = []) {
return $this->write('alert', $scope, $message, $context, $config);
} | php | {
"resource": ""
} |
q249712 | LogComponent.critical | validation | public function critical($scope, $message, $context = [], $config = []) {
return $this->write('critical', $scope, $message, $context, $config);
} | php | {
"resource": ""
} |
q249713 | LogComponent.error | validation | public function error($scope, $message, $context = [], $config = []) {
return $this->write('error', $scope, $message, $context, $config);
} | php | {
"resource": ""
} |
q249714 | LogComponent.warning | validation | public function warning($scope, $message, $context = [], $config = []) {
return $this->write('warning', $scope, $message, $context, $config);
} | php | {
"resource": ""
} |
q249715 | LogComponent.notice | validation | public function notice($scope, $message, $context = [], $config = []) {
return $this->write('notice', $scope, $message, $context, $config);
} | php | {
"resource": ""
} |
q249716 | LogComponent.debug | validation | public function debug($scope, $message, $context = [], $config = []) {
return $this->write('debug', $scope, $message, $context, $config);
} | php | {
"resource": ""
} |
q249717 | LogComponent.info | validation | public function info($scope, $message, $context = [], $config = []) {
return $this->write('info', $scope, $message, $context, $config);
} | php | {
"resource": ""
} |
q249718 | DeleteAction.run | validation | public function run($id)
{
$model = $this->controller->findModel($id);
if ($model->is_system) {
\Yii::$app->session->setFlash('warning', \Yii::t('app', 'You cannot update or delete system handlers'));
} else {
$model->delete();
}
return $this->controller->redirect(['index']);
} | php | {
"resource": ""
} |
q249719 | DatabaseLog.log | validation | public function log($level, $message, array $context = []) {
if ( $this->config('requiredScope') && ( empty($context['scope']) ) )
return false;
$scopes = ( empty($context['scope']) ) ? [null] : $context['scope'];
unset($context['scope']);
$this->_context = $context;
$Table = TableRegistry::get($this->config('model'), ['table' => $this->config('table')]);
foreach ( $scopes as $scope ) {
$entity = $Table->newEntity();
$data = [
'level' => $level,
'user_id' => $this->_userId(),
'scope' => $scope,
'message' => $message,
'context' => $this->_context,
];
$entity = $Table->patchEntity($entity, $data);
$Table->save($entity);
}
return true;
} | php | {
"resource": ""
} |
q249720 | Bootstrap.bootstrap | validation | public function bootstrap($app)
{
$app->i18n->translations['devgroup.events-system'] = [
'class' => 'yii\i18n\PhpMessageSource',
'sourceLanguage' => 'en-US',
'basePath' => '@DevGroup/EventsSystem/messages',
];
$error = [];
try {
foreach (EventHelper::getActiveHandlersList() as $handler) {
Event::on($handler['class'], $handler['name'], $handler['callable'], $handler['data']);
}
} catch (\yii\db\Exception $e) {
$error = [
'message' => '`DevGroup\EventsSystem` extension is not fully installed yet.',
'hint' => 'Please run the `./yii migrate --migrationPath=@DevGroup/EventsSystem/migrations` command from your application directory to finish the installation process.',
];
} catch (\Exception $e) {
$error = [
'message' => $e->getCode(),
'hint' => $e->getMessage(),
];
}
if (empty($error) === false) {
if ($app instanceof \yii\console\Application) {
$app->on(Application::EVENT_BEFORE_ACTION, function ($event) use ($app, $error) {
$app->controller->stdout(PHP_EOL . str_repeat('=', 80) . PHP_EOL . PHP_EOL);
$app->controller->stderr($error['message'] . PHP_EOL);
$app->controller->stdout($error['hint'] . PHP_EOL);
$app->controller->stdout(PHP_EOL . str_repeat('=', 80) . PHP_EOL);
});
} elseif ($app instanceof \yii\web\Application && YII_DEBUG === true) {
$app->session->setFlash(
'warning',
Html::tag('h4', $error['message']) . Html::tag('p', $error['hint'])
);
}
}
} | php | {
"resource": ""
} |
q249721 | ListAction.run | validation | public function run($eventGroupId = null)
{
$eventGroups = EventGroup::find()->asArray(true)->all();
if (count($eventGroups) === 0) {
throw new Exception('Event groups not found');
}
if ($eventGroupId === null) {
$first = reset($eventGroups);
$eventGroupId = $first['id'];
}
$tabs = [];
foreach ($eventGroups as $eventGroup) {
$tabs[] = [
'label' => $eventGroup['name'],
'url' => ['index', 'eventGroupId' => $eventGroup['id']],
'active' => $eventGroupId == $eventGroup['id'],
];
}
$model = new EventEventHandler(['scenario' => 'search']);
$eventsList = Event::find()
->select(['name', 'id'])
->where(['event_group_id' => $eventGroupId])
->indexBy('id')
->column();
return $this->controller->render(
'index',
[
'dataProvider' => $model->search(\Yii::$app->request->get(), array_keys($eventsList)),
'eventGroupId' => $eventGroupId,
'eventsList' => $eventsList,
'model' => $model,
'tabs' => $tabs,
]
);
} | php | {
"resource": ""
} |
q249722 | ListData.getNameById | validation | public static function getNameById($id, $attributeName = 'name')
{
$model = static::loadModel($id);
return empty($model[$attributeName]) === false ? $model[$attributeName] : \Yii::t('app', 'Unknown');
} | php | {
"resource": ""
} |
q249723 | Windows.getOS | validation | public static function getOS()
{
$wmi = Windows::getInstance();
foreach ($wmi->ExecQuery("SELECT Caption FROM Win32_OperatingSystem") as $os) {
return $os->Caption;
}
return "Windows";
} | php | {
"resource": ""
} |
q249724 | Windows.getKernelVersion | validation | public static function getKernelVersion()
{
$wmi = Windows::getInstance();
foreach ($wmi->ExecQuery("SELECT WindowsVersion FROM Win32_Process WHERE Handle = 0") as $process) {
return $process->WindowsVersion;
}
return "Unknown";
} | php | {
"resource": ""
} |
q249725 | Windows.getHostname | validation | public static function getHostname()
{
$wmi = Windows::getInstance();
foreach ($wmi->ExecQuery("SELECT Name FROM Win32_ComputerSystem") as $cs) {
return $cs->Name;
}
return "Unknown";
} | php | {
"resource": ""
} |
q249726 | Windows.getCpuModel | validation | public static function getCpuModel()
{
$wmi = Windows::getInstance();
$object = $wmi->ExecQuery("SELECT Name FROM Win32_Processor");
foreach ($object as $cpu) {
return $cpu->Name;
}
return 'Unknown';
} | php | {
"resource": ""
} |
q249727 | Windows.getCpuVendor | validation | public static function getCpuVendor()
{
$wmi = Windows::getInstance();
$object = $wmi->ExecQuery("SELECT Manufacturer FROM Win32_Processor");
foreach ($object as $cpu) {
return $cpu->Manufacturer;
}
return 'Unknown';
} | php | {
"resource": ""
} |
q249728 | Windows.getCpuFreq | validation | public static function getCpuFreq()
{
$wmi = Windows::getInstance();
$object = $wmi->ExecQuery("SELECT CurrentClockSpeed FROM Win32_Processor");
foreach ($object as $cpu) {
return $cpu->CurrentClockSpeed;
}
return 'Unknown';
} | php | {
"resource": ""
} |
q249729 | Windows.getLoad | validation | public static function getLoad()
{
$wmi = Windows::getInstance();
$load = [];
foreach ($wmi->ExecQuery("SELECT LoadPercentage FROM Win32_Processor") as $cpu) {
$load[] = $cpu->LoadPercentage;
}
return round(array_sum($load) / count($load), 2) . "%";
} | php | {
"resource": ""
} |
q249730 | Windows.getCpuArchitecture | validation | public static function getCpuArchitecture()
{
$wmi = Windows::getInstance();
foreach ($wmi->ExecQuery("SELECT Architecture FROM Win32_Processor") as $cpu) {
switch ($cpu->Architecture) {
case 0:
return "x86";
case 1:
return "MIPS";
case 2:
return "Alpha";
case 3:
return "PowerPC";
case 6:
return "Itanium-based systems";
case 9:
return "x64";
}
}
return "Unknown";
} | php | {
"resource": ""
} |
q249731 | Windows.getUpTime | validation | public static function getUpTime()
{
$wmi = Windows::getInstance();
$booted_str = '';
foreach ($wmi->ExecQuery("SELECT LastBootUpTime FROM Win32_OperatingSystem") as $os) {
$booted_str = $os->LastBootUpTime;
}
$booted = [
'year' => substr($booted_str, 0, 4),
'month' => substr($booted_str, 4, 2),
'day' => substr($booted_str, 6, 2),
'hour' => substr($booted_str, 8, 2),
'minute' => substr($booted_str, 10, 2),
'second' => substr($booted_str, 12, 2)
];
$booted_ts = mktime($booted['hour'], $booted['minute'], $booted['second'], $booted['month'], $booted['day'], $booted['year']);
return date('m/d/y h:i A (T)', $booted_ts);
} | php | {
"resource": ""
} |
q249732 | Windows.getCpuCores | validation | public static function getCpuCores()
{
$wmi = Windows::getInstance();
$object = $wmi->ExecQuery("SELECT NumberOfLogicalProcessors FROM Win32_Processor");
$cores = 0;
foreach ($object as $obj) {
$cores = $obj->NumberOfLogicalProcessors;
}
return $cores;
} | php | {
"resource": ""
} |
q249733 | Windows.getTotalMemory | validation | public static function getTotalMemory()
{
$wmi = Windows::getInstance();
foreach ($wmi->ExecQuery("SELECT TotalPhysicalMemory FROM Win32_ComputerSystem") as $mem) {
return $mem->TotalPhysicalMemory;
}
return NULL;
} | php | {
"resource": ""
} |
q249734 | MWSFinancesService_Model_PayWithAmazonEvent.setFeeList | validation | public function setFeeList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['FeeList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249735 | FBAOutboundServiceMWS_Client.createFulfillmentOrder | validation | public function createFulfillmentOrder($request)
{
if (!($request instanceof FBAOutboundServiceMWS_Model_CreateFulfillmentOrderRequest)) {
$request = new FBAOutboundServiceMWS_Model_CreateFulfillmentOrderRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'CreateFulfillmentOrder';
$httpResponse = $this->_invoke($parameters);
$response = FBAOutboundServiceMWS_Model_CreateFulfillmentOrderResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249736 | FBAOutboundServiceMWS_Client.getFulfillmentOrder | validation | public function getFulfillmentOrder($request)
{
if (!($request instanceof FBAOutboundServiceMWS_Model_GetFulfillmentOrderRequest)) {
$request = new FBAOutboundServiceMWS_Model_GetFulfillmentOrderRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'GetFulfillmentOrder';
$httpResponse = $this->_invoke($parameters);
$response = FBAOutboundServiceMWS_Model_GetFulfillmentOrderResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249737 | FBAOutboundServiceMWS_Client.getFulfillmentPreview | validation | public function getFulfillmentPreview($request)
{
if (!($request instanceof FBAOutboundServiceMWS_Model_GetFulfillmentPreviewRequest)) {
$request = new FBAOutboundServiceMWS_Model_GetFulfillmentPreviewRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'GetFulfillmentPreview';
$httpResponse = $this->_invoke($parameters);
$response = FBAOutboundServiceMWS_Model_GetFulfillmentPreviewResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249738 | FBAOutboundServiceMWS_Client.getPackageTrackingDetails | validation | public function getPackageTrackingDetails($request)
{
if (!($request instanceof FBAOutboundServiceMWS_Model_GetPackageTrackingDetailsRequest)) {
$request = new FBAOutboundServiceMWS_Model_GetPackageTrackingDetailsRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'GetPackageTrackingDetails';
$httpResponse = $this->_invoke($parameters);
$response = FBAOutboundServiceMWS_Model_GetPackageTrackingDetailsResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249739 | FBAOutboundServiceMWS_Client.listAllFulfillmentOrdersByNextToken | validation | public function listAllFulfillmentOrdersByNextToken($request)
{
if (!($request instanceof FBAOutboundServiceMWS_Model_ListAllFulfillmentOrdersByNextTokenRequest)) {
$request = new FBAOutboundServiceMWS_Model_ListAllFulfillmentOrdersByNextTokenRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'ListAllFulfillmentOrdersByNextToken';
$httpResponse = $this->_invoke($parameters);
$response = FBAOutboundServiceMWS_Model_ListAllFulfillmentOrdersByNextTokenResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249740 | FBAOutboundServiceMWS_Client.updateFulfillmentOrder | validation | public function updateFulfillmentOrder($request)
{
if (!($request instanceof FBAOutboundServiceMWS_Model_UpdateFulfillmentOrderRequest)) {
$request = new FBAOutboundServiceMWS_Model_UpdateFulfillmentOrderRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'UpdateFulfillmentOrder';
$httpResponse = $this->_invoke($parameters);
$response = FBAOutboundServiceMWS_Model_UpdateFulfillmentOrderResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249741 | FBAOutboundServiceMWS_Client.setSSLCurlOptions | validation | protected function setSSLCurlOptions($ch)
{
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->_config['SSL_VerifyPeer']);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $this->_config['SSL_VerifyHost']);
} | php | {
"resource": ""
} |
q249742 | MarketplaceWebServiceProducts_Model_GetMatchingProductForIdResponse.setGetMatchingProductForIdResult | validation | public function setGetMatchingProductForIdResult($value)
{
if (!$this->_isNumericArray($value)) {
$value = array($value);
}
$this->_fields['GetMatchingProductForIdResult']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249743 | MarketplaceWebService_Model_SubmitFeedRequest.setMarketplaceIdList | validation | public function setMarketplaceIdList($value)
{
$marketplaceIdList = new MarketplaceWebService_Model_IdList();
$marketplaceIdList->setId($value['Id']);
$this->fields['MarketplaceIdList']['FieldValue'] = $marketplaceIdList;
return;
} | php | {
"resource": ""
} |
q249744 | MarketplaceWebServiceProducts_Model_GetCompetitivePricingForASINResponse.setGetCompetitivePricingForASINResult | validation | public function setGetCompetitivePricingForASINResult($value)
{
if (!$this->_isNumericArray($value)) {
$value = array($value);
}
$this->_fields['GetCompetitivePricingForASINResult']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249745 | FBAInboundServiceMWS_Client.confirmTransportRequest | validation | public function confirmTransportRequest($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_ConfirmTransportInputRequest)) {
$request = new FBAInboundServiceMWS_Model_ConfirmTransportInputRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'ConfirmTransportRequest';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_ConfirmTransportRequestResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249746 | FBAInboundServiceMWS_Client.createInboundShipment | validation | public function createInboundShipment($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_CreateInboundShipmentRequest)) {
$request = new FBAInboundServiceMWS_Model_CreateInboundShipmentRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'CreateInboundShipment';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_CreateInboundShipmentResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249747 | FBAInboundServiceMWS_Client.getBillOfLading | validation | public function getBillOfLading($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_GetBillOfLadingRequest)) {
$request = new FBAInboundServiceMWS_Model_GetBillOfLadingRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'GetBillOfLading';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_GetBillOfLadingResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249748 | FBAInboundServiceMWS_Client.getPackageLabels | validation | public function getPackageLabels($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_GetPackageLabelsRequest)) {
$request = new FBAInboundServiceMWS_Model_GetPackageLabelsRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'GetPackageLabels';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_GetPackageLabelsResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249749 | FBAInboundServiceMWS_Client.getPrepInstructionsForASIN | validation | public function getPrepInstructionsForASIN($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_GetPrepInstructionsForASINRequest)) {
$request = new FBAInboundServiceMWS_Model_GetPrepInstructionsForASINRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'GetPrepInstructionsForASIN';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_GetPrepInstructionsForASINResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249750 | FBAInboundServiceMWS_Client.getPrepInstructionsForSKU | validation | public function getPrepInstructionsForSKU($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_GetPrepInstructionsForSKURequest)) {
$request = new FBAInboundServiceMWS_Model_GetPrepInstructionsForSKURequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'GetPrepInstructionsForSKU';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_GetPrepInstructionsForSKUResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249751 | FBAInboundServiceMWS_Client.getTransportContent | validation | public function getTransportContent($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_GetTransportContentRequest)) {
$request = new FBAInboundServiceMWS_Model_GetTransportContentRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'GetTransportContent';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_GetTransportContentResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249752 | FBAInboundServiceMWS_Client.listInboundShipmentItems | validation | public function listInboundShipmentItems($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_ListInboundShipmentItemsRequest)) {
$request = new FBAInboundServiceMWS_Model_ListInboundShipmentItemsRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'ListInboundShipmentItems';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_ListInboundShipmentItemsResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249753 | FBAInboundServiceMWS_Client.listInboundShipmentItemsByNextToken | validation | public function listInboundShipmentItemsByNextToken($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_ListInboundShipmentItemsByNextTokenRequest)) {
$request = new FBAInboundServiceMWS_Model_ListInboundShipmentItemsByNextTokenRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'ListInboundShipmentItemsByNextToken';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_ListInboundShipmentItemsByNextTokenResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249754 | FBAInboundServiceMWS_Client.listInboundShipments | validation | public function listInboundShipments($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_ListInboundShipmentsRequest)) {
$request = new FBAInboundServiceMWS_Model_ListInboundShipmentsRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'ListInboundShipments';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_ListInboundShipmentsResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249755 | FBAInboundServiceMWS_Client.listInboundShipmentsByNextToken | validation | public function listInboundShipmentsByNextToken($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_ListInboundShipmentsByNextTokenRequest)) {
$request = new FBAInboundServiceMWS_Model_ListInboundShipmentsByNextTokenRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'ListInboundShipmentsByNextToken';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_ListInboundShipmentsByNextTokenResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249756 | FBAInboundServiceMWS_Client.putTransportContent | validation | public function putTransportContent($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_PutTransportContentRequest)) {
$request = new FBAInboundServiceMWS_Model_PutTransportContentRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'PutTransportContent';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_PutTransportContentResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249757 | FBAInboundServiceMWS_Client.updateInboundShipment | validation | public function updateInboundShipment($request)
{
if (!($request instanceof FBAInboundServiceMWS_Model_UpdateInboundShipmentRequest)) {
$request = new FBAInboundServiceMWS_Model_UpdateInboundShipmentRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'UpdateInboundShipment';
$httpResponse = $this->_invoke($parameters);
$response = FBAInboundServiceMWS_Model_UpdateInboundShipmentResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249758 | MWSRecommendationsSectionService_Model_ListRecommendationsByNextTokenResult.setInventoryRecommendations | validation | public function setInventoryRecommendations($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['InventoryRecommendations']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249759 | MWSRecommendationsSectionService_Model_ListRecommendationsByNextTokenResult.setSelectionRecommendations | validation | public function setSelectionRecommendations($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['SelectionRecommendations']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249760 | MWSRecommendationsSectionService_Model_ListRecommendationsByNextTokenResult.setPricingRecommendations | validation | public function setPricingRecommendations($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['PricingRecommendations']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249761 | MWSRecommendationsSectionService_Model_ListRecommendationsByNextTokenResult.setFulfillmentRecommendations | validation | public function setFulfillmentRecommendations($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['FulfillmentRecommendations']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249762 | MWSRecommendationsSectionService_Model_ListRecommendationsByNextTokenResult.setListingQualityRecommendations | validation | public function setListingQualityRecommendations($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['ListingQualityRecommendations']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249763 | MWSRecommendationsSectionService_Model_ListRecommendationsByNextTokenResult.setGlobalSellingRecommendations | validation | public function setGlobalSellingRecommendations($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['GlobalSellingRecommendations']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249764 | MWSRecommendationsSectionService_Model_ListRecommendationsByNextTokenResult.setAdvertisingRecommendations | validation | public function setAdvertisingRecommendations($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['AdvertisingRecommendations']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249765 | MWSMerchantFulfillmentService_Model_ShipmentRequestDetails.setItemList | validation | public function setItemList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['ItemList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249766 | MarketplaceWebServiceProducts_Model_SellerSKUListType.setSellerSKU | validation | public function setSellerSKU($value)
{
if (!$this->_isNumericArray($value)) {
$value = array($value);
}
$this->_fields['SellerSKU']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249767 | MWSFinancesService_Client.listFinancialEventGroups | validation | public function listFinancialEventGroups($request)
{
if (!($request instanceof MWSFinancesService_Model_ListFinancialEventGroupsRequest)) {
require_once (dirname(__FILE__) . '/Model/ListFinancialEventGroupsRequest.php');
$request = new MWSFinancesService_Model_ListFinancialEventGroupsRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'ListFinancialEventGroups';
$httpResponse = $this->_invoke($parameters);
require_once (dirname(__FILE__) . '/Model/ListFinancialEventGroupsResponse.php');
$response = MWSFinancesService_Model_ListFinancialEventGroupsResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249768 | MWSFinancesService_Client._convertListFinancialEventGroups | validation | private function _convertListFinancialEventGroups($request) {
$parameters = array();
$parameters['Action'] = 'ListFinancialEventGroups';
if ($request->isSetSellerId()) {
$parameters['SellerId'] = $request->getSellerId();
}
if ($request->isSetMWSAuthToken()) {
$parameters['MWSAuthToken'] = $request->getMWSAuthToken();
}
if ($request->isSetMaxResultsPerPage()) {
$parameters['MaxResultsPerPage'] = $request->getMaxResultsPerPage();
}
if ($request->isSetFinancialEventGroupStartedAfter()) {
$parameters['FinancialEventGroupStartedAfter'] = $request->getFinancialEventGroupStartedAfter();
}
if ($request->isSetFinancialEventGroupStartedBefore()) {
$parameters['FinancialEventGroupStartedBefore'] = $request->getFinancialEventGroupStartedBefore();
}
return $parameters;
} | php | {
"resource": ""
} |
q249769 | MWSFinancesService_Client.listFinancialEventGroupsByNextToken | validation | public function listFinancialEventGroupsByNextToken($request)
{
if (!($request instanceof MWSFinancesService_Model_ListFinancialEventGroupsByNextTokenRequest)) {
require_once (dirname(__FILE__) . '/Model/ListFinancialEventGroupsByNextTokenRequest.php');
$request = new MWSFinancesService_Model_ListFinancialEventGroupsByNextTokenRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'ListFinancialEventGroupsByNextToken';
$httpResponse = $this->_invoke($parameters);
require_once (dirname(__FILE__) . '/Model/ListFinancialEventGroupsByNextTokenResponse.php');
$response = MWSFinancesService_Model_ListFinancialEventGroupsByNextTokenResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249770 | MWSFinancesService_Client.listFinancialEvents | validation | public function listFinancialEvents($request)
{
if (!($request instanceof MWSFinancesService_Model_ListFinancialEventsRequest)) {
require_once (dirname(__FILE__) . '/Model/ListFinancialEventsRequest.php');
$request = new MWSFinancesService_Model_ListFinancialEventsRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'ListFinancialEvents';
$httpResponse = $this->_invoke($parameters);
require_once (dirname(__FILE__) . '/Model/ListFinancialEventsResponse.php');
$response = MWSFinancesService_Model_ListFinancialEventsResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249771 | MWSFinancesService_Client._convertListFinancialEvents | validation | private function _convertListFinancialEvents($request) {
$parameters = array();
$parameters['Action'] = 'ListFinancialEvents';
if ($request->isSetSellerId()) {
$parameters['SellerId'] = $request->getSellerId();
}
if ($request->isSetMWSAuthToken()) {
$parameters['MWSAuthToken'] = $request->getMWSAuthToken();
}
if ($request->isSetMaxResultsPerPage()) {
$parameters['MaxResultsPerPage'] = $request->getMaxResultsPerPage();
}
if ($request->isSetAmazonOrderId()) {
$parameters['AmazonOrderId'] = $request->getAmazonOrderId();
}
if ($request->isSetFinancialEventGroupId()) {
$parameters['FinancialEventGroupId'] = $request->getFinancialEventGroupId();
}
if ($request->isSetPostedAfter()) {
$parameters['PostedAfter'] = $request->getPostedAfter();
}
if ($request->isSetPostedBefore()) {
$parameters['PostedBefore'] = $request->getPostedBefore();
}
return $parameters;
} | php | {
"resource": ""
} |
q249772 | MWSFinancesService_Client.listFinancialEventsByNextToken | validation | public function listFinancialEventsByNextToken($request)
{
if (!($request instanceof MWSFinancesService_Model_ListFinancialEventsByNextTokenRequest)) {
require_once (dirname(__FILE__) . '/Model/ListFinancialEventsByNextTokenRequest.php');
$request = new MWSFinancesService_Model_ListFinancialEventsByNextTokenRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'ListFinancialEventsByNextToken';
$httpResponse = $this->_invoke($parameters);
require_once (dirname(__FILE__) . '/Model/ListFinancialEventsByNextTokenResponse.php');
$response = MWSFinancesService_Model_ListFinancialEventsByNextTokenResponse::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
} | php | {
"resource": ""
} |
q249773 | MWSFinancesService_Client._convertListFinancialEventsByNextToken | validation | private function _convertListFinancialEventsByNextToken($request) {
$parameters = array();
$parameters['Action'] = 'ListFinancialEventsByNextToken';
if ($request->isSetSellerId()) {
$parameters['SellerId'] = $request->getSellerId();
}
if ($request->isSetMWSAuthToken()) {
$parameters['MWSAuthToken'] = $request->getMWSAuthToken();
}
if ($request->isSetNextToken()) {
$parameters['NextToken'] = $request->getNextToken();
}
return $parameters;
} | php | {
"resource": ""
} |
q249774 | MWSFinancesService_Model_DebtRecoveryEvent.setDebtRecoveryItemList | validation | public function setDebtRecoveryItemList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['DebtRecoveryItemList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249775 | MWSFinancesService_Model_DebtRecoveryEvent.setChargeInstrumentList | validation | public function setChargeInstrumentList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['ChargeInstrumentList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249776 | MarketplaceWebService_Model_IdList.setId | validation | public function setId($id)
{
if (!$this->isNumericArray($id)) {
$id = array($id);
}
$this->fields['Id']['FieldValue'] = $id;
return $this;
} | php | {
"resource": ""
} |
q249777 | MWSFinancesService_Model_RentalTransactionEvent.setRentalChargeList | validation | public function setRentalChargeList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['RentalChargeList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249778 | MWSFinancesService_Model_RentalTransactionEvent.setRentalFeeList | validation | public function setRentalFeeList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['RentalFeeList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249779 | MarketplaceWebServiceProducts_Model_OffersList.setOffer | validation | public function setOffer($value)
{
if (!$this->_isNumericArray($value)) {
$value = array($value);
}
$this->_fields['Offer']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249780 | MarketplaceWebServiceProducts_Model_GetMyPriceForASINResponse.setGetMyPriceForASINResult | validation | public function setGetMyPriceForASINResult($value)
{
if (!$this->_isNumericArray($value)) {
$value = array($value);
}
$this->_fields['GetMyPriceForASINResult']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249781 | FBAInventoryServiceMWS_Model_InventorySupplyDetailList.setmember | validation | public function setmember($value)
{
if (!$this->_isNumericArray($value)) {
$value = array($value);
}
$this->_fields['member']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249782 | Block.compile | validation | public function compile()
{
// can happen if it parses only comments/artifacts
if (!count($this->msgid))
return "";
$str = "";
if ($this->comments)
$str .= implode(self::NEWLINE, $this->comments) . self::NEWLINE;
if ($this->msgctxt)
$str .= 'msgctxt "' . $this->msgctxt . '"' . self::NEWLINE;
$included_blocks = ['msgid'];
if ($this->msgstr_plural)
$included_blocks[] = 'msgid_plural';
else
$included_blocks[] = 'msgstr';
foreach ($included_blocks as $key) {
if (is_array($this->$key)) {
$str .= "$key ";
$str .= implode(self::NEWLINE, array_map([$this, 'quoteWrap'], $this->$key)) . self::NEWLINE;
}
}
if ($this->msgid_plural && $this->msgstr_plural) {
foreach ($this->msgstr_plural as $plural_key => $plural_message) {
$str .= 'msgstr[' . $plural_key . '] ';
$str .= implode(self::NEWLINE, array_map([$this, 'quoteWrap'], $plural_message)) . self::NEWLINE;
}
}
return trim($str);
} | php | {
"resource": ""
} |
q249783 | Block.setPluralForm | validation | public function setPluralForm($key, $plural)
{
if (!is_array($plural))
$plural = [$plural];
if (!$this->msgstr_plural)
$this->msgstr_plural = [];
$this->msgstr_plural[$key] = $plural;
} | php | {
"resource": ""
} |
q249784 | MWSFinancesService_Model_FinancialEvents.setShipmentEventList | validation | public function setShipmentEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['ShipmentEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249785 | MWSFinancesService_Model_FinancialEvents.setRefundEventList | validation | public function setRefundEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['RefundEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249786 | MWSFinancesService_Model_FinancialEvents.setGuaranteeClaimEventList | validation | public function setGuaranteeClaimEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['GuaranteeClaimEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249787 | MWSFinancesService_Model_FinancialEvents.setChargebackEventList | validation | public function setChargebackEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['ChargebackEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249788 | MWSFinancesService_Model_FinancialEvents.setPayWithAmazonEventList | validation | public function setPayWithAmazonEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['PayWithAmazonEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249789 | MWSFinancesService_Model_FinancialEvents.setServiceProviderCreditEventList | validation | public function setServiceProviderCreditEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['ServiceProviderCreditEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249790 | MWSFinancesService_Model_FinancialEvents.setRetrochargeEventList | validation | public function setRetrochargeEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['RetrochargeEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249791 | MWSFinancesService_Model_FinancialEvents.setRentalTransactionEventList | validation | public function setRentalTransactionEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['RentalTransactionEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249792 | MWSFinancesService_Model_FinancialEvents.setPerformanceBondRefundEventList | validation | public function setPerformanceBondRefundEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['PerformanceBondRefundEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249793 | MWSFinancesService_Model_FinancialEvents.setServiceFeeEventList | validation | public function setServiceFeeEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['ServiceFeeEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249794 | MWSFinancesService_Model_FinancialEvents.setDebtRecoveryEventList | validation | public function setDebtRecoveryEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['DebtRecoveryEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249795 | MWSFinancesService_Model_FinancialEvents.setLoanServicingEventList | validation | public function setLoanServicingEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['LoanServicingEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249796 | MWSFinancesService_Model_FinancialEvents.setAdjustmentEventList | validation | public function setAdjustmentEventList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['AdjustmentEventList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
q249797 | MarketplaceWebService_Model.fromDOMElement | validation | private function fromDOMElement(DOMElement $dom)
{
$xpath = new DOMXPath($dom->ownerDocument);
$xpath->registerNamespace('a', 'http://mws.amazonaws.com/doc/2009-01-01/');
foreach ($this->fields as $fieldName => $field) {
$fieldType = $field['FieldType'];
if (is_array($fieldType)) {
if ($this->isComplexType($fieldType[0])) {
$elements = $xpath->query("./a:$fieldName", $dom);
if ($elements->length >= 1) {
foreach ($elements as $element) {
$this->fields[$fieldName]['FieldValue'][] = new $fieldType[0]($element);
}
}
} else {
$elements = $xpath->query("./a:$fieldName", $dom);
if ($elements->length >= 1) {
foreach ($elements as $element) {
$text = $xpath->query('./text()', $element);
$this->fields[$fieldName]['FieldValue'][] = $text->item(0)->data;
}
}
}
} else {
if ($this->isComplexType($fieldType)) {
$elements = $xpath->query("./a:$fieldName", $dom);
if ($elements->length == 1) {
$this->fields[$fieldName]['FieldValue'] = new $fieldType($elements->item(0));
}
} else {
$element = $xpath->query("./a:$fieldName/text()", $dom);
$data = null;
if ($element->length == 1) {
switch ($this->fields[$fieldName]['FieldType']) {
case 'DateTime':
$data = new DateTime($element->item(0)->data, new DateTimeZone('UTC'));
break;
case 'bool':
$value = $element->item(0)->data;
$data = $value === 'true' ? true : false;
break;
default:
$data = $element->item(0)->data;
break;
}
$this->fields[$fieldName]['FieldValue'] = $data;
}
}
}
}
} | php | {
"resource": ""
} |
q249798 | MarketplaceWebService_Model_TypeList.setType | validation | public function setType($type)
{
if (!$this->isNumericArray($type)) {
$type = array($type);
}
$this->fields['Type']['FieldValue'] = $type;
return $this;
} | php | {
"resource": ""
} |
q249799 | MWSFinancesService_Model_ListFinancialEventGroupsByNextTokenResult.setFinancialEventGroupList | validation | public function setFinancialEventGroupList($value)
{
if (!$this->_isNumericArray($value)) {
$value = array ($value);
}
$this->_fields['FinancialEventGroupList']['FieldValue'] = $value;
return $this;
} | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.