_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 83 13k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q243700 | DC_Table.move | validation | public function move()
{
// Proceed only if all mandatory variables are set
if ($this->intId && Input::get('sid') && (!$GLOBALS['TL_DCA'][$this->strTable]['list']['sorting']['root'] || !\in_array($this->intId, $this->root)))
{
$objRow = $this->Database->prepare("SELECT * FROM " . $this->strTable . " WHERE id=... | php | {
"resource": ""
} |
q243701 | DC_Table.paginationMenu | validation | protected function paginationMenu()
{
/** @var AttributeBagInterface $objSessionBag */
$objSessionBag = System::getContainer()->get('session')->getBag('contao_backend');
$session = $objSessionBag->all();
$filter = ($GLOBALS['TL_DCA'][$this->strTable]['list']['sorting']['mode'] == 4) ? $this->strTable.'_'.CURR... | php | {
"resource": ""
} |
q243702 | Configuration.canonicalize | validation | private function canonicalize(string $value): string
{
$resolved = [];
$chunks = preg_split('#([\\\\/]+)#', $value, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
for ($i = 0, $c = \count($chunks); $i < $c; ++$i) {
if ('.' === $chunks[$i]) {
++$i;
... | php | {
"resource": ""
} |
q243703 | DropZone.generateMarkup | validation | public function generateMarkup()
{
// Maximum file size in MB
$intMaxSize = round(static::getMaxUploadSize() / 1024 / 1024);
// String of accepted file extensions
$strAccepted = implode(',', array_map(function ($a) { return '.' . $a; }, StringUtil::trimsplit(',', strtolower(Config::get('uploadTypes')))));
... | php | {
"resource": ""
} |
q243704 | NewsletterModel.findSentByPid | validation | public static function findSentByPid($intPid, array $arrOptions=array())
{
$t = static::$strTable;
$arrColumns = array("$t.pid=?");
if (!static::isPreviewMode($arrOptions))
{
$arrColumns[] = "$t.sent=1";
}
if (!isset($arrOptions['order']))
{
$arrOptions['order'] = "$t.date DESC";
}
return st... | php | {
"resource": ""
} |
q243705 | NewsletterModel.findSentByPids | validation | public static function findSentByPids($arrPids, array $arrOptions=array())
{
if (empty($arrPids) || !\is_array($arrPids))
{
return null;
}
$t = static::$strTable;
$arrColumns = array("$t.pid IN(" . implode(',', array_map('\intval', $arrPids)) . ")");
if (!static::isPreviewMode($arrOptions))
{
$ar... | php | {
"resource": ""
} |
q243706 | tl_faq.checkPermission | validation | public function checkPermission()
{
$bundles = Contao\System::getContainer()->getParameter('kernel.bundles');
// HOOK: comments extension required
if (!isset($bundles['ContaoCommentsBundle']))
{
$key = array_search('allowComments', $GLOBALS['TL_DCA']['tl_faq']['list']['sorting']['headerFields']);
unset(... | php | {
"resource": ""
} |
q243707 | BackendMain.welcomeScreen | validation | protected function welcomeScreen()
{
System::loadLanguageFile('explain');
$objTemplate = new BackendTemplate('be_welcome');
$objTemplate->messages = Message::generateUnwrapped() . Backend::getSystemMessages();
$objTemplate->loginMsg = $GLOBALS['TL_LANG']['MSC']['firstLogin'];
// Add the login message
if ... | php | {
"resource": ""
} |
q243708 | BackendMain.setImpersonatedLogout | validation | private function setImpersonatedLogout()
{
$token = System::getContainer()->get('security.token_storage')->getToken();
if (!$token instanceof TokenInterface)
{
return;
}
$impersonatorUser = null;
foreach ($token->getRoles() as $role)
{
if ($role instanceof SwitchUserRole)
{
$impersonatorU... | php | {
"resource": ""
} |
q243709 | ValidCharacters.getOptions | validation | public function getOptions(): array
{
$options = [];
foreach (self::DEFAULT_OPTIONS as $option => $label) {
$options[$option] = $this->translator->trans('MSC.validCharacters.'.$label, [], 'contao_default');
}
$event = new SlugValidCharactersEvent($options);
$th... | php | {
"resource": ""
} |
q243710 | NativeDocumentMapper.mapContentBlock | validation | public function mapContentBlock(Content $content)
{
$contentInfo = $content->versionInfo->contentInfo;
$locations = $this->locationHandler->loadLocationsByContent($contentInfo->id);
$blockFields = $this->getBlockFields($content);
$contentFields = $this->getContentFields($content);
... | php | {
"resource": ""
} |
q243711 | IndexingDepthProvider.getMaxDepthForContent | validation | public function getMaxDepthForContent(ContentType $contentType): int
{
if (isset($this->contentTypeMap[$contentType->identifier])) {
return $this->contentTypeMap[$contentType->identifier];
}
return $this->defaultIndexingDepth;
} | php | {
"resource": ""
} |
q243712 | Handler.findContent | validation | public function findContent(Query $query, array $languageFilter = array())
{
$query = clone $query;
$query->filter = $query->filter ?: new Criterion\MatchAll();
$query->query = $query->query ?: new Criterion\MatchAll();
$this->coreFilter->apply(
$query,
$lang... | php | {
"resource": ""
} |
q243713 | Handler.findSingle | validation | public function findSingle(Criterion $filter, array $languageFilter = array())
{
$query = new Query();
$query->filter = $filter;
$query->query = new Criterion\MatchAll();
$query->offset = 0;
$query->limit = 1;
$this->coreFilter->apply(
$query,
... | php | {
"resource": ""
} |
q243714 | Handler.indexContent | validation | public function indexContent(Content $content)
{
$this->gateway->bulkIndexDocuments(array($this->mapper->mapContentBlock($content)));
} | php | {
"resource": ""
} |
q243715 | Handler.bulkIndexContent | validation | public function bulkIndexContent(array $contentObjects)
{
$documents = array();
foreach ($contentObjects as $content) {
try {
$documents[] = $this->mapper->mapContentBlock($content);
} catch (NotFoundException $ex) {
// ignore content objects ... | php | {
"resource": ""
} |
q243716 | Handler.deleteContent | validation | public function deleteContent($contentId, $versionId = null)
{
$idPrefix = $this->mapper->generateContentDocumentId($contentId);
$this->gateway->deleteByQuery("_root_:{$idPrefix}*");
} | php | {
"resource": ""
} |
q243717 | SolrCreateIndexCommand.logWarning | validation | private function logWarning(OutputInterface $output, ProgressBar $progress, $message)
{
$progress->clear();
$this->logger->warning($message);
$progress->display();
} | php | {
"resource": ""
} |
q243718 | Stream.request | validation | public function request($method, Endpoint $endpoint, $path, Message $message = null)
{
$message = $message ?: new Message();
// We'll try to reach backend several times before throwing exception.
$i = 0;
do {
++$i;
if ($responseMessage = $this->requestStream(... | php | {
"resource": ""
} |
q243719 | Stream.getRequestHeaders | validation | protected function getRequestHeaders(Message $message, Endpoint $endpoint)
{
// Use message headers as default
$headers = $message->headers;
// Set headers from $endpoint
if ($endpoint->user !== null) {
$headers['Authorization'] = 'Basic ' . base64_encode("{$endpoint->us... | php | {
"resource": ""
} |
q243720 | MapLocation.getSearchFields | validation | protected function getSearchFields(
Criterion $criterion,
$fieldDefinitionIdentifier,
$fieldTypeIdentifier = null,
$name = null
) {
return $this->fieldNameResolver->getFieldTypes(
$criterion,
$fieldDefinitionIdentifier,
$fieldTypeIdentifier... | php | {
"resource": ""
} |
q243721 | Field.mapSearchFieldValue | validation | protected function mapSearchFieldValue($value, FieldType $searchFieldType = null)
{
if (null === $searchFieldType) {
return $value;
}
$searchField = new SearchField('field', $value, $searchFieldType);
$value = (array)$this->fieldValueMapper->map($searchField);
r... | php | {
"resource": ""
} |
q243722 | Native.internalFind | validation | protected function internalFind(array $parameters, array $languageSettings = array())
{
$searchTargets = $this->getSearchTargets($languageSettings);
if (!empty($searchTargets)) {
$parameters['shards'] = $searchTargets;
}
return $this->search($parameters);
} | php | {
"resource": ""
} |
q243723 | Native.generateQueryString | validation | protected function generateQueryString(array $parameters)
{
$removedArrayCharacters = preg_replace(
'/%5B[0-9]+%5D=/',
'=',
http_build_query($parameters)
);
$removedDuplicatedEscapingForUrlPath = str_replace('%5C%5C%2F', '%5C%2F', $removedArrayCharacters)... | php | {
"resource": ""
} |
q243724 | Native.getSearchTargets | validation | protected function getSearchTargets($languageSettings)
{
if ($this->endpointResolver instanceof SingleEndpointResolver && !$this->endpointResolver->hasMultipleEndpoints()) {
return '';
}
$shards = array();
$endpoints = $this->endpointResolver->getSearchTargets($languageS... | php | {
"resource": ""
} |
q243725 | Native.getAllSearchTargets | validation | protected function getAllSearchTargets()
{
if ($this->endpointResolver instanceof SingleEndpointResolver && !$this->endpointResolver->hasMultipleEndpoints()) {
return '';
}
$shards = [];
$searchTargets = $this->endpointResolver->getEndpoints();
if (!empty($search... | php | {
"resource": ""
} |
q243726 | Native.bulkIndexDocuments | validation | public function bulkIndexDocuments(array $documents)
{
$documentMap = array();
$mainTranslationsEndpoint = $this->endpointResolver->getMainLanguagesEndpoint();
$mainTranslationsDocuments = array();
foreach ($documents as $translationDocuments) {
foreach ($translationDocu... | php | {
"resource": ""
} |
q243727 | Native.commit | validation | public function commit($flush = false)
{
$payload = $flush ?
'<commit/>' :
'<commit softCommit="true"/>';
foreach ($this->endpointResolver->getEndpoints() as $endpointName) {
$result = $this->client->request(
'POST',
$this->endpoin... | php | {
"resource": ""
} |
q243728 | Native.search | validation | protected function search(array $parameters)
{
$queryString = $this->generateQueryString($parameters);
$response = $this->client->request(
'POST',
$this->endpointRegistry->getEndpoint(
$this->endpointResolver->getEntryEndpoint()
),
'/s... | php | {
"resource": ""
} |
q243729 | Field.getSortFieldName | validation | protected function getSortFieldName(
SortClause $sortClause,
$contentTypeIdentifier,
$fieldDefinitionIdentifier
) {
return $this->fieldNameResolver->getSortFieldName(
$sortClause,
$contentTypeIdentifier,
$fieldDefinitionIdentifier
);
} | php | {
"resource": ""
} |
q243730 | NativeEndpointResolver.hasMultipleEndpoints | validation | public function hasMultipleEndpoints()
{
if ($this->hasMultiple !== null) {
return $this->hasMultiple;
}
$endpointSet = array_flip($this->endpointMap);
if (isset($this->defaultEndpoint)) {
$endpointSet[$this->defaultEndpoint] = true;
}
if (i... | php | {
"resource": ""
} |
q243731 | EzSystemsEzPlatformSolrSearchEngineExtension.processConnectionConfiguration | validation | protected function processConnectionConfiguration(ContainerBuilder $container, array $config)
{
$alias = $this->getAlias();
if (isset($config['default_connection'])) {
$container->setParameter(
"{$alias}.default_connection",
$config['default_connection']
... | php | {
"resource": ""
} |
q243732 | EzSystemsEzPlatformSolrSearchEngineExtension.configureSearchServices | validation | private function configureSearchServices(ContainerBuilder $container, $connectionName, $connectionParams)
{
$alias = $this->getAlias();
// Endpoint resolver
$endpointResolverDefinition = new DefinitionDecorator(self::ENDPOINT_RESOLVER_ID);
$endpointResolverDefinition->replaceArgumen... | php | {
"resource": ""
} |
q243733 | EzSystemsEzPlatformSolrSearchEngineExtension.defineEndpoint | validation | protected function defineEndpoint(ContainerBuilder $container, $alias, $params)
{
$definition = new Definition(self::ENDPOINT_CLASS, array($params));
$definition->addTag(self::ENDPOINT_TAG, array('alias' => $alias));
$container->setDefinition(
sprintf($this->getAlias() . '.endpo... | php | {
"resource": ""
} |
q243734 | CriterionVisitor.getRange | validation | protected function getRange($operator, $start, $end)
{
$startBrace = '[';
$startValue = '*';
$endValue = '*';
$endBrace = ']';
$start = '"' . $this->escapeQuote($this->toString($start), true) . '"';
$end = '"' . $this->escapeQuote($this->toString($end), true) . '"';
... | php | {
"resource": ""
} |
q243735 | CriterionVisitor.escapeExpressions | validation | protected function escapeExpressions($string, $allowWildcard = false)
{
if ($allowWildcard) {
$reservedCharacters = preg_quote('+-&|!(){}[]^"~?:\\ ');
} else {
$reservedCharacters = preg_quote('+-&|!(){}[]^"~*?:\\ ');
}
return preg_replace_callback(
... | php | {
"resource": ""
} |
q243736 | Configuration.addEndpointsSection | validation | protected function addEndpointsSection(ArrayNodeDefinition $node)
{
$node->children()
->arrayNode('endpoints')
->info('Solr Search Engine endpoint configuration')
->useAttributeAsKey('endpoint_name')
->performNoDeepMerging()
->proto... | php | {
"resource": ""
} |
q243737 | ContentDocumentFulltextFields.getIndexFieldName | validation | private function getIndexFieldName(int $depth): string
{
if ($depth === 0) {
return self::$fieldName;
}
return sprintf(self::$relatedContentFieldName, $depth);
} | php | {
"resource": ""
} |
q243738 | NativeCoreFilter.getCoreCriterion | validation | private function getCoreCriterion(array $languageCodes, $useAlwaysAvailable)
{
// Handle languages if given
if (!empty($languageCodes)) {
// Get condition for prioritized languages fallback
$filter = $this->getLanguageFilter($languageCodes);
// Handle always avai... | php | {
"resource": ""
} |
q243739 | NativeCoreFilter.getLanguageFilter | validation | private function getLanguageFilter(array $languageCodes)
{
$languageFilters = array();
foreach ($languageCodes as $languageCode) {
// Include language
$condition = new CustomField(self::FIELD_LANGUAGE, Operator::EQ, $languageCode);
// Get list of excluded languag... | php | {
"resource": ""
} |
q243740 | NativeCoreFilter.getAlwaysAvailableFilter | validation | private function getAlwaysAvailableFilter(array $languageCodes)
{
$conditions = array(
// Include always available main language translations
new CustomField(
self::FIELD_IS_ALWAYS_AVAILABLE,
Operator::EQ,
true
),
... | php | {
"resource": ""
} |
q243741 | BlockDocumentsContentFields.getIndexFieldType | validation | private function getIndexFieldType(
ContentType $contentType,
FieldDefinition $fieldDefinition,
FieldType $fieldType
) {
if (!$fieldType instanceof FieldType\TextField) {
return $fieldType;
}
$fieldType = clone $fieldType;
$fieldType->boost = $thi... | php | {
"resource": ""
} |
q243742 | NativeQueryConverter.getFacetParams | validation | private function getFacetParams(array $facetBuilders)
{
$facetSets = array_map(
function ($facetBuilder) {
return $this->facetBuilderVisitor->visitBuilder($facetBuilder, spl_object_hash($facetBuilder));
},
$facetBuilders
);
$facetParams = ... | php | {
"resource": ""
} |
q243743 | FacetBuilderVisitor.mapData | validation | protected function mapData(array $data)
{
$values = array();
reset($data);
while ($key = current($data)) {
$values[$key] = next($data);
next($data);
}
return $values;
} | php | {
"resource": ""
} |
q243744 | WsdlAnalyser.loadMessagesAndVersions | validation | public static function loadMessagesAndVersions($wsdls)
{
$msgAndVer = [];
foreach ($wsdls as $wsdl) {
$wsdlIdentifier = self::makeWsdlIdentifier($wsdl);
self::$wsdlIds[$wsdlIdentifier] = $wsdl;
self::loadWsdlXpath($wsdl, $wsdlIdentifier);
$operatio... | php | {
"resource": ""
} |
q243745 | WsdlAnalyser.getMessagesAndVersionsFromImportedWsdl | validation | protected static function getMessagesAndVersionsFromImportedWsdl($import, $wsdlPath, $wsdlIdentifier)
{
$msgAndVer = [];
$domXpath = null;
$importPath = realpath(dirname($wsdlPath)).DIRECTORY_SEPARATOR.$import;
$wsdlContent = file_get_contents($importPath);
if ($wsdlContent... | php | {
"resource": ""
} |
q243746 | WsdlAnalyser.loadWsdlXpath | validation | public static function loadWsdlXpath($wsdlFilePath, $wsdlId)
{
if (!isset(self::$wsdlDomXpath[$wsdlId]) || is_null(self::$wsdlDomXpath[$wsdlId])) {
$wsdlContent = file_get_contents($wsdlFilePath);
if ($wsdlContent !== false) {
self::$wsdlDomDoc[$wsdlId] = new \DOMDoc... | php | {
"resource": ""
} |
q243747 | WsdlAnalyser.exaluateXpathQueryOnWsdl | validation | public static function exaluateXpathQueryOnWsdl($wsdlId, $wsdlFilePath, $xpath)
{
WsdlAnalyser::loadWsdlXpath($wsdlFilePath, $wsdlId);
return self::$wsdlDomXpath[$wsdlId]->evaluate($xpath);
} | php | {
"resource": ""
} |
q243748 | WsdlAnalyser.loopOperationsWithQuery | validation | protected static function loopOperationsWithQuery($operations, $query, $wsdlIdentifier, $domXpath)
{
$msgAndVer = [];
foreach ($operations as $operation) {
if (!empty($operation->value)) {
$fullVersion = $domXpath->evaluate(
sprintf($query, $operation... | php | {
"resource": ""
} |
q243749 | Base.createRequest | validation | public function createRequest($messageName, RequestOptionsInterface $params)
{
$this->checkMessageIsInWsdl($messageName);
$builder = $this->findBuilderForMessage($messageName);
if ($builder instanceof ConvertInterface) {
return $builder->convert($params, $this->getActiveVersion... | php | {
"resource": ""
} |
q243750 | Base.findBuilderForMessage | validation | protected function findBuilderForMessage($messageName)
{
$builder = null;
if (array_key_exists($messageName, $this->messageBuilders) &&
$this->messageBuilders[$messageName] instanceof ConvertInterface
) {
$builder = $this->messageBuilders[$messageName];
} els... | php | {
"resource": ""
} |
q243751 | HandlerValidateFOP.analyze | validation | public function analyze(SendResult $response)
{
$analyzeResponse = new Result($response);
$domXpath = $this->makeDomXpath($response->responseXml);
//General error level in the transmissionError location:
$errorCodeNodeList = $domXpath->query(self::Q_G_ERR);
if ($errorCodeNo... | php | {
"resource": ""
} |
q243752 | HandlerValidateFOP.makeStatusForPotentiallyNonExistent | validation | protected function makeStatusForPotentiallyNonExistent($errorCatNode)
{
if ($errorCatNode instanceof \DOMNode) {
$status = $this->makeStatusFromErrorQualifier($errorCatNode->nodeValue);
} else {
$status = Result::STATUS_ERROR;
}
return $status;
} | php | {
"resource": ""
} |
q243753 | Result.setStatus | validation | public function setStatus($newStatus)
{
if ($this->isWorseStatus($newStatus, $this->status)) {
$this->status = $newStatus;
}
} | php | {
"resource": ""
} |
q243754 | Result.isWorseStatus | validation | protected function isWorseStatus($newStatus, $currentStatus)
{
$levels = [
self::STATUS_UNKNOWN => -1,
self::STATUS_OK => 0,
self::STATUS_INFO => 2,
self::STATUS_WARN => 5,
self::STATUS_ERROR => 10,
self::STATUS_FATAL => 20,
];
... | php | {
"resource": ""
} |
q243755 | Client.setConsumerId | validation | public function setConsumerId($id)
{
$this->sessionHandler->setTransactionFlowLink(true);
$this->sessionHandler->setConsumerId($id);
} | php | {
"resource": ""
} |
q243756 | Client.pnrRetrieve | validation | public function pnrRetrieve(RequestOptions\PnrRetrieveOptions $options, $messageOptions = [])
{
$msgName = 'PNR_Retrieve';
return $this->callMessage($msgName, $options, $messageOptions);
} | php | {
"resource": ""
} |
q243757 | Client.pnrCreatePnr | validation | public function pnrCreatePnr(RequestOptions\PnrCreatePnrOptions $options, $messageOptions = [])
{
$msgName = 'PNR_AddMultiElements';
return $this->callMessage($msgName, $options, $messageOptions);
} | php | {
"resource": ""
} |
q243758 | Client.pnrAddMultiElements | validation | public function pnrAddMultiElements(RequestOptions\PnrAddMultiElementsOptions $options, $messageOptions = [])
{
$msgName = 'PNR_AddMultiElements';
return $this->callMessage($msgName, $options, $messageOptions);
} | php | {
"resource": ""
} |
q243759 | Client.pnrRetrieveAndDisplay | validation | public function pnrRetrieveAndDisplay(RequestOptions\PnrRetrieveAndDisplayOptions $options, $messageOptions = [])
{
$msgName = 'PNR_RetrieveAndDisplay';
return $this->callMessage($msgName, $options, $messageOptions);
} | php | {
"resource": ""
} |
q243760 | Client.queueList | validation | public function queueList(RequestOptions\QueueListOptions $options, $messageOptions = [])
{
$msgName = 'Queue_List';
return $this->callMessage($msgName, $options, $messageOptions);
} | php | {
"resource": ""
} |
q243761 | Client.queuePlacePnr | validation | public function queuePlacePnr(RequestOptions\QueuePlacePnrOptions $options, $messageOptions = [])
{
$msgName = 'Queue_PlacePNR';
return $this->callMessage($msgName, $options, $messageOptions);
} | php | {
"resource": ""
} |
q243762 | Client.pnrIgnore | validation | public function pnrIgnore(RequestOptions\PnrIgnoreOptions $options, $messageOptions = [])
{
$msgName = 'PNR_Ignore';
return $this->callMessage($msgName, $options, $messageOptions);
} | php | {
"resource": ""
} |
q243763 | Client.callMessage | validation | protected function callMessage($messageName, $options, $messageOptions, $endSession = false)
{
$messageOptions = $this->makeMessageOptions($messageOptions, $endSession);
$this->lastMessage = $messageName;
$sendResult = $this->sessionHandler->sendMessage(
$messageName,
... | php | {
"resource": ""
} |
q243764 | Client.makeMessageOptions | validation | protected function makeMessageOptions(array $incoming, $endSession = false)
{
$options = [
'endSession' => $endSession,
'returnXml' => $this->returnResultXml
];
if (array_key_exists('endSession', $incoming)) {
$options['endSession'] = $incoming['endSessio... | php | {
"resource": ""
} |
q243765 | SecurityAuthenticateOptions.loadFromAuthParams | validation | protected function loadFromAuthParams(AuthParams $authParams)
{
$this->officeId = $authParams->officeId;
$this->dutyCode = $authParams->dutyCode;
$this->organizationId = $authParams->organizationId;
$this->originatorTypeCode = $authParams->originatorTypeCode;
$this->userId = ... | php | {
"resource": ""
} |
q243766 | SoapHeader4.getConsumerId | validation | public function getConsumerId($generate = false)
{
if (is_null($this->consumerId) && $generate) {
$this->consumerId = $this->generateGuid();
}
return $this->consumerId;
} | php | {
"resource": ""
} |
q243767 | SoapHeader4.prepareForNextMessage | validation | protected function prepareForNextMessage($messageName, $messageOptions)
{
if ($this->isAuthenticated === true && is_int($this->sessionData['sequenceNumber'])) {
$this->sessionData['sequenceNumber']++;
}
$headers = $this->createSoapHeaders($this->sessionData, $this->params, $mess... | php | {
"resource": ""
} |
q243768 | SoapHeader4.getEndpointFromWsdl | validation | protected function getEndpointFromWsdl($wsdlFilePath, $messageName)
{
$wsdlId = $this->getWsdlIdFor($messageName);
return WsdlAnalyser::exaluateXpathQueryOnWsdl(
$wsdlId,
$wsdlFilePath,
self::XPATH_ENDPOINT
);
} | php | {
"resource": ""
} |
q243769 | SoapHeader4.getActionFromWsdl | validation | protected function getActionFromWsdl($wsdlFilePath, $messageName)
{
$wsdlId = $this->getWsdlIdFor($messageName);
return WsdlAnalyser::exaluateXpathQueryOnWsdl(
$wsdlId,
$wsdlFilePath,
sprintf(self::XPATH_OPERATION_ACTION, $messageName)
);
} | php | {
"resource": ""
} |
q243770 | SoapHeader4.generateGuid | validation | protected function generateGuid()
{
mt_srand((double) microtime() * 10000);
$charId = strtoupper(md5(uniqid(rand(), true)));
$hyphen = chr(45); // "-"
$uuid = substr($charId, 0, 8) . $hyphen
. substr($charId, 8, 4) . $hyphen
. substr($charId, 12, 4) . $hyphen... | php | {
"resource": ""
} |
q243771 | SoapHeader4.makeSoapClientOptions | validation | protected function makeSoapClientOptions()
{
$options = $this->soapClientOptions;
$options['classmap'] = array_merge(Classmap::$soapheader4map, Classmap::$map);
if (!empty($this->params->soapClientOptions)) {
$options = array_merge($options, $this->params->soapClientOptions);
... | php | {
"resource": ""
} |
q243772 | SoapHeader4.getStatefulStatusCode | validation | private function getStatefulStatusCode($messageName, array $messageOptions)
{
// on security-auth this is always 'Start'
if ('Security_Authenticate' === $messageName) {
return self::TRANSACTION_STATUS_CODE_START;
}
// if endSession is set this will be (the) 'End'
... | php | {
"resource": ""
} |
q243773 | SegmentGroup.loadOptionalSegmentInformation | validation | protected function loadOptionalSegmentInformation($options)
{
if (!empty($options->operatingCompany)) {
$this->segmentInformation->companyDetails->operatingCompany = $options->operatingCompany;
}
if ($options->arrivalDate instanceof \DateTime) {
$this->segmentInforma... | php | {
"resource": ""
} |
q243774 | SegmentGroup.loadInventory | validation | protected function loadInventory($inventory)
{
if (is_array($inventory) && count($inventory) > 0) {
$this->inventory = new Inventory();
foreach ($inventory as $bookingClass => $availabilityAmount) {
$this->inventory->bookingClassDetails[] = new BookingClassDetails(
... | php | {
"resource": ""
} |
q243775 | Base.setSessionData | validation | public function setSessionData(array $sessionData)
{
if (isset($sessionData['sessionId'], $sessionData['sequenceNumber'], $sessionData['securityToken'])) {
$this->sessionData['sessionId'] = $sessionData['sessionId'];
$this->sessionData['sequenceNumber'] = $sessionData['sequenceNumber... | php | {
"resource": ""
} |
q243776 | Base.getMessagesAndVersions | validation | public function getMessagesAndVersions()
{
if (empty($this->messagesAndVersions)) {
$this->messagesAndVersions = WsdlAnalyser::loadMessagesAndVersions($this->params->wsdl);
}
return $this->messagesAndVersions;
} | php | {
"resource": ""
} |
q243777 | Base.getWsdlIdFor | validation | protected function getWsdlIdFor($messageName)
{
$msgAndVer = $this->getMessagesAndVersions();
if (isset($msgAndVer[$messageName]) && isset($msgAndVer[$messageName]['wsdl'])) {
return $msgAndVer[$messageName]['wsdl'];
}
return null;
} | php | {
"resource": ""
} |
q243778 | Base.getSoapClient | validation | protected function getSoapClient($msgName)
{
$wsdlId = $this->getWsdlIdFor($msgName);
if (!empty($msgName)) {
if (!isset($this->soapClients[$wsdlId]) || !($this->soapClients[$wsdlId] instanceof \SoapClient)) {
$this->soapClients[$wsdlId] = $this->initSoapClient($wsdlId);... | php | {
"resource": ""
} |
q243779 | Base.initSoapClient | validation | protected function initSoapClient($wsdlId)
{
$wsdlPath = WsdlAnalyser::$wsdlIds[$wsdlId];
$client = new Client\SoapClient(
$wsdlPath,
$this->makeSoapClientOptions(),
$this->params->logger
);
return $client;
} | php | {
"resource": ""
} |
q243780 | Base.executeMethodOnSoapClientForMsg | validation | protected function executeMethodOnSoapClientForMsg($msgName, $method)
{
$result = null;
$soapClient = $this->getSoapClient($msgName);
if ($soapClient instanceof \SoapClient) {
$result = $soapClient->$method();
}
return $result;
} | php | {
"resource": ""
} |
q243781 | DataElementsIndiv.makeSegmentNameForRequestElement | validation | protected function makeSegmentNameForRequestElement($elementType, $element)
{
$elementName = '';
$sourceArray = [
'Contact' => ElementManagementData::SEGNAME_CONTACT_ELEMENT,
'FormOfPayment' => ElementManagementData::SEGNAME_FORM_OF_PAYMENT,
'MiscellaneousRemark'... | php | {
"resource": ""
} |
q243782 | StandardResponseHandler.analyzeWithErrCodeCategoryMsgQuery | validation | protected function analyzeWithErrCodeCategoryMsgQuery(SendResult $response, $qErr, $qCat, $qMsg, $errLevel = null)
{
$analyzeResponse = new Result($response);
$domXpath = $this->makeDomXpath($response->responseXml);
$errorCodeNodeList = $domXpath->query($qErr);
if ($errorCodeNodeL... | php | {
"resource": ""
} |
q243783 | StandardResponseHandler.analyzeWithErrorCodeMsgQueryLevel | validation | protected function analyzeWithErrorCodeMsgQueryLevel(SendResult $response, $qErr, $qMsg, $qLvl, $lvlToText)
{
$analyzeResponse = new Result($response);
$domXpath = $this->makeDomXpath($response->responseXml);
$errorCodeNodeList = $domXpath->query($qErr);
if ($errorCodeNodeList->le... | php | {
"resource": ""
} |
q243784 | StandardResponseHandler.analyzeWithErrCodeAndMsgQueryFixedCat | validation | public function analyzeWithErrCodeAndMsgQueryFixedCat(SendResult $response, $qErr, $qMsg, $category)
{
$analyzeResponse = new Result($response);
$domXpath = $this->makeDomXpath($response->responseXml);
$errorCodeNodeList = $domXpath->query($qErr);
$errorMsgNodeList = $domXpath->que... | php | {
"resource": ""
} |
q243785 | StandardResponseHandler.analyzeWithErrCodeCategoryMsgNodeName | validation | protected function analyzeWithErrCodeCategoryMsgNodeName(SendResult $response, $nodeErr, $nodeCat, $nodeMsg)
{
$analyzeResponse = new Result($response);
$domDoc = $this->loadDomDocument($response->responseXml);
$errorCodeNode = $domDoc->getElementsByTagName($nodeErr)->item(0);
if ... | php | {
"resource": ""
} |
q243786 | StandardResponseHandler.makeDomXpath | validation | protected function makeDomXpath($response)
{
$domDoc = $this->loadDomDocument($response);
$domXpath = new \DOMXPath($domDoc);
$domXpath->registerNamespace(
self::XMLNS_PREFIX,
$domDoc->documentElement->lookupNamespaceUri(null)
);
return $domXpath;
... | php | {
"resource": ""
} |
q243787 | StandardResponseHandler.makeStatusFromErrorQualifier | validation | protected function makeStatusFromErrorQualifier($qualifier, $defaultStatus = Result::STATUS_ERROR)
{
$statusQualMapping = [
'INF' => Result::STATUS_INFO,
'WEC' => Result::STATUS_WARN,
'WZZ' => Result::STATUS_WARN, //Mutually defined warning
'WA' => Result::STA... | php | {
"resource": ""
} |
q243788 | Base.analyzeResponse | validation | public function analyzeResponse($sendResult, $messageName)
{
if (!empty($sendResult->exception)) {
return $this->makeResultForException($sendResult);
}
$handler = $this->findHandlerForMessage($messageName);
if ($handler instanceof MessageResponseHandler) {
r... | php | {
"resource": ""
} |
q243789 | Base.findHandlerForMessage | validation | private function findHandlerForMessage($messageName)
{
$handler = null;
if (array_key_exists($messageName, $this->responseHandlers) &&
$this->responseHandlers[$messageName] instanceof MessageResponseHandler
) {
$handler = $this->responseHandlers[$messageName];
... | php | {
"resource": ""
} |
q243790 | Base.loadClientParams | validation | protected function loadClientParams(Params $params, $receivedFromIdentifier, $version)
{
if ($params->authParams instanceof Params\AuthParams) {
$this->authParams = $params->authParams;
if (isset($params->sessionHandlerParams) &&
$params->sessionHandlerParams instance... | php | {
"resource": ""
} |
q243791 | Base.loadSessionHandler | validation | protected function loadSessionHandler($sessionHandler, $params)
{
if ($sessionHandler instanceof HandlerInterface) {
$newSessionHandler = $sessionHandler;
} else {
$newSessionHandler = HandlerFactory::createHandler($params);
}
return $newSessionHandler;
} | php | {
"resource": ""
} |
q243792 | Base.loadRequestCreator | validation | protected function loadRequestCreator($requestCreator, $params, $libIdentifier, $originatorOffice, $mesVer)
{
if ($requestCreator instanceof RequestCreatorInterface) {
$newRequestCreator = $requestCreator;
} else {
$params->originatorOfficeId = $originatorOffice;
... | php | {
"resource": ""
} |
q243793 | MsgBodyExtractor.getStringBetween | validation | private function getStringBetween($string, $start, $end)
{
$startPos = strpos($string, $start) + strlen($start);
$endPos = strlen($string) - strpos($string, $end);
return substr($string, $startPos, -$endPos);
} | php | {
"resource": ""
} |
q243794 | PricePNRWithBookingClass13.loadPricingOptionsFromRequestOptions | validation | public static function loadPricingOptionsFromRequestOptions($options)
{
$priceOptions = [];
$priceOptions = self::mergeOptions(
$priceOptions,
self::makePricingOptionForValidatingCarrier($options->validatingCarrier)
);
$priceOptions = self::mergeOptions(
... | php | {
"resource": ""
} |
q243795 | PricePNRWithBookingClass13.makePricingOptionFareFamilyOverride | validation | protected static function makePricingOptionFareFamilyOverride($fareFamily)
{
$opt = [];
if ($fareFamily !== null) {
$po = new PricingOptionGroup(PricingOptionKey::OPTION_FARE_FAMILY);
$po->optionDetail = new OptionDetail([['FF' => $fareFamily]]);
$opt[] = $po;
... | php | {
"resource": ""
} |
q243796 | PricePNRWithBookingClass13.loadCorpNegoFare | validation | protected static function loadCorpNegoFare($corporateNegoFare)
{
$opt = [];
if ($corporateNegoFare !== null) {
$po = new PricingOptionGroup(PricingOptionKey::OPTION_CORPORATE_NEGOTIATED_FARES);
$po->optionDetail = new OptionDetail($corporateNegoFare);
$opt[] = ... | php | {
"resource": ""
} |
q243797 | PricePNRWithBookingClass13.loadObFees | validation | protected static function loadObFees($obFees, $obFeeRefs)
{
$opt = [];
if (!empty($obFees)) {
$po = new PricingOptionGroup(PricingOptionKey::OPTION_OB_FEES);
$po->penDisInformation = new PenDisInformation(
PenDisInformation::QUAL_OB_FEES,
$ob... | php | {
"resource": ""
} |
q243798 | MopDescription.loadMopDetails | validation | protected function loadMopDetails(MopInfo $options)
{
$this->mopDetails = new MopDetails();
if ($this->checkAnyNotEmpty($options->fopCode, $options->fopStatus)) {
$this->mopDetails->fopPNRDetails = new FopPNRDetails(
$options->fopCode,
$options->fopStatus... | php | {
"resource": ""
} |
q243799 | MopDescription.loadPaymentModule | validation | protected function loadPaymentModule(MopInfo $options)
{
if ($this->checkAnyNotEmpty(
$options->fopType,
$options->payMerchant,
$options->payments,
$options->installmentsInfo,
$options->mopPaymentType,
$options->creditCardInfo,
... | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.