} if ($statusCode === 500 && strpos($responseBody, "RoutingMissingException") !== false) { $exception = new RoutingMissingException($exception->getMessage(), $statusCode, $exception); } elseif ($statusCode === 500 && preg_match('/ActionRequestValidationException.+ no documents to get/', $responseBody) === 1) { $exception = new NoDocumentsToGetException($exception->getMessage(), $statusCode, $exception); } elseif ($statusCode === 500 && strpos($responseBody, 'NoShardAvailableActionException') !== false) { $exception = new NoShardAvailableException($exception->getMessage(), $statusCode, $exception); } else { $exception = new ServerErrorResponseException( $this->convertBodyToString($responseBody, $statusCode, $exception), $statusCode ); } $this->logRequestFail($request, $response, $exception); throw $exception; }
if (strpos($body, '"succeeded":true') !== false) { $ignore[] = 404; } $this->process4xxError($request, $response, $ignore); } elseif ($response['status'] >= 500) { $ignore = $request['client']['ignore'] ?? []; $this->process5xxError($request, $response, $ignore); } // No error, deserialize $response['body'] = $this->serializer->deserialize($response['body'], $response['transfer_stats']); } $this->logRequestSuccess($request, $response);
{ if (null === $onFulfilled) { return $this; } try { return resolve($onFulfilled($this->value)); } catch (\Throwable $exception) { return new RejectedPromise($exception); } catch (\Exception $exception) { return new RejectedPromise($exception); } }
*/ public function then( callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null ) { return $this->promise()->then($onFulfilled, $onRejected, $onProgress); } }
FutureArrayInterface $future, callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null ) { return new FutureArray( $future->then($onFulfilled, $onRejected, $onProgress), [$future, 'wait'], [$future, 'cancel'] ); } /**
// No error, deserialize $response['body'] = $this->serializer->deserialize($response['body'], $response['transfer_stats']); } $this->logRequestSuccess($request, $response); return isset($request['client']['verbose']) && $request['client']['verbose'] === true ? $response : $response['body']; } ); return $response; }; }
// RingPHP does not like if client is empty if (empty($request['client'])) { unset($request['client']); } $handler = $this->handler; $future = $handler($request, $this, $transport, $options); return $future; } public function getTransportSchema(): string {
$response = []; $caughtException = null; $this->lastConnection = $connection; $future = $connection->performRequest( $method, $uri, $params, $body, $options, $this );
{ $promise = $this->transport->performRequest( $endpoint->getMethod(), $endpoint->getURI(), $endpoint->getParams(), $endpoint->getBody(), $endpoint->getOptions() ); return $this->transport->resultOrFuture($promise, $endpoint->getOptions()); } }
$endpoint = $endpointBuilder('Get'); $endpoint->setParams($params); $endpoint->setId($id); $endpoint->setIndex($index); $endpoint->setType($type); return $this->performRequest($endpoint); } /** * Returns a script. * * $params['id'] = (string) Script ID * $params['master_timeout'] = (time) Specify timeout for connection to master
public static function getById(int $sectionId): array { $client = EccIndexer::getInstance(); $result = $client->get([ 'index' => self::index(), 'id' => $sectionId ]); return $result['_source'] ?: []; } private function propertyToArray(PropertyDto $property): array
'value' => [], 'selected' => [], 'multiple' => false, ] ]; $sectionIndex = ActiveIblockSectionsIndex::getById($this->sectionId); if (!empty($sectionIndex)) { $this->addPropertyFromElastic($sectionIndex['property_values']); } } private function addPropertyFromElastic(array $properties)
if ($currentCache->initCache(3600 * 8, $cacheId)) { $result = $currentCache->getVars(); $this->properties = $result['properties']; } else { $currentCache->startDataCache(); $this->initProperties(); $result['properties'] = $this->properties; $currentCache->endDataCache($result); } } // Инициализация характеристики для фильтра слева
$this->iblockId = $iblockId; $this->sectionId = $sectionId; $this->locationId = $locationId; $this->client = new EccIndexer(); // Тут создается характеристики $this->initCached(); } // При отправке запрос в elasticsearch private function buildAggregationQuery(): array { $aggregations = [];
$arResult['filter'] = $filter; $locationId = UserHelper::getCurrentOrDefaultLocationId(); $total = 0; if (isset($arParams['IBLOCK_ID']) && (int) $arParams['IBLOCK_ID'] > 0) { $helper = new NewFacetFilterBuilder($locationId, $arParams['IBLOCK_ID'], $arParams['SECTION_ID']); try { $baseFilter = $helper->buildFilter($filter); $total = $helper->getTotal(); } catch (\Exception $e) { $baseFilter = [];
{ $parentComponentName = ""; $parentComponentPath = ""; $parentComponentTemplate = ""; } return include($_SERVER["DOCUMENT_ROOT"].$this->__path."/component.php"); } /** * Function executes the component. Returns the result of it's execution. * * <p>Note: component must be inited by initComponent method.</p> * @param string $componentTemplate
* * @return mixed * */ public function executeComponent() { return $this->__includeComponent(); } /** * Constructor with ability to copy the component. * * @param CBitrixComponent $component */
{ $component->executeComponent(); $result = $component->arResult; } else { $result = $component->executeComponent(); } $this->__arIncludeAreaIcons = $component->__arIncludeAreaIcons; $frameMode = $component->getFrameMode(); $componentFrame->end();
if (($arParams['AJAX_MODE'] ?? '') == 'Y') { $obAjax = new CComponentAjax($componentName, $componentTemplate, $arParams, $parentComponent); } $this->__componentStack[] = $component; $result = $component->IncludeComponent($componentTemplate, $arParams, $parentComponent, $returnResult); array_pop($this->__componentStack); } if ($bDrawIcons) {
"INSTANT_RELOAD" => "Y", "AJAX_OPTION_JUMP" => $arParams["AJAX_OPTION_JUMP"], "AJAX_OPTION_HISTORY" => $arParams["AJAX_OPTION_HISTORY"], "SECTION_CODE" => "", "SECTION_CODE_PATH" => "" ], false ); ?> </div> <?php $this->EndViewTarget(); ?> <div id="catalog"> <?php $APPLICATION->IncludeComponent(
include($_SERVER["DOCUMENT_ROOT"].$this->__fileAlt); return null; } $templateData = false; include($_SERVER["DOCUMENT_ROOT"].$this->__file); for ($i = count($this->frames) - 1; $i >= 0; $i--) { $frame = $this->frames[$i]; if ($frame->isStarted() && !$frame->isEnded()) {
$parentTemplateFolder, $this ); } else { $result = $this->__IncludePHPTemplate($arResult, $arParams, $parentTemplateFolder); } return $result; } /**
final public function showComponentTemplate() { if (!$this->__bInited) return null; if ($this->__template) $this->__template->includeTemplate($this->arResult); if(is_array($this->arResultCacheKeys)) { $arNewResult = array(); foreach($this->arResultCacheKeys as $key) if(array_key_exists($key, $this->arResult))
{ if (!$this->__bInited) return null; if ($this->initComponentTemplate($templatePage, $this->getSiteTemplateId(), $customTemplatePath)) { $this->showComponentTemplate(); if($this->__component_epilog) $this->includeComponentEpilog($this->__component_epilog); } else { $this->abortResultCache();
break; default: break; } } $this->IncludeComponentTemplate($componentPage);
{ $parentComponentName = ""; $parentComponentPath = ""; $parentComponentTemplate = ""; } return include($_SERVER["DOCUMENT_ROOT"].$this->__path."/component.php"); } /** * Function executes the component. Returns the result of it's execution. * * <p>Note: component must be inited by initComponent method.</p> * @param string $componentTemplate
{ $this->__IncludeComponent(); $result = $this->arResult; } else { $result = $this->__IncludeComponent(); } $frameMode = $this->getFrameMode(); $componentFrame->end(); }
if (($arParams['AJAX_MODE'] ?? '') == 'Y') { $obAjax = new CComponentAjax($componentName, $componentTemplate, $arParams, $parentComponent); } $this->__componentStack[] = $component; $result = $component->IncludeComponent($componentTemplate, $arParams, $parentComponent, $returnResult); array_pop($this->__componentStack); } if ($bDrawIcons) {
"USE_PRICE_COUNT" => "N", "USE_PRODUCT_QUANTITY" => "Y", "USE_REVIEW" => "Y", "USE_SALE_BESTSELLERS" => "Y", "USE_STORE" => "Y", "USE_STORE_PHONE" => "Y", "USE_STORE_SCHEDULE" => "Y" ) );?><br> <?php $APPLICATION->IncludeComponent("ecc:cart.assets",".default"); if ($_REQUEST['debug'] == 'Y') {
else { header($_SERVER["SERVER_PROTOCOL"]." 200 OK"); } $_SERVER["REAL_FILE_PATH"] = $url; include_once($io->GetPhysicalName($_SERVER['DOCUMENT_ROOT'].$url)); die(); } } } //admin section 404
<? include_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/urlrewrite.php'); if(file_exists($_SERVER['DOCUMENT_ROOT'].'/404.php')) include_once($_SERVER['DOCUMENT_ROOT'].'/404.php'); ?>
$_SESSION = [ 'SESS_AUTH' => [ 'POLICY' => [ 'SESSION_TIMEOUT' => 24, 'SESSION_IP_MASK' => '0.0.0.0', 'MAX_STORE_NUM' => 10, 'STORE_IP_MASK' => '0.0.0.0', 'STORE_TIMEOUT' => 525600, 'CHECKWORD_TIMEOUT' => 2880, 'PASSWORD_LENGTH' => '8', 'PASSWORD_UPPERCASE' => 'Y', 'PASSWORD_LOWERCASE' => 'Y', 'PASSWORD_DIGITS' => 'N', 'PASSWORD_PUNCTUATION' => 'N', 'PASSWORD_CHECK_WEAK' => 'N', 'PASSWORD_CHECK_POLICY' => 'N', 'PASSWORD_CHANGE_DAYS' => 0, 'PASSWORD_UNIQUE_COUNT' => 0, 'LOGIN_ATTEMPTS' => 0, 'BLOCK_LOGIN_ATTEMPTS' => 0, 'BLOCK_TIME' => 0, ], ], 'SESS_IP' => '44.197.251.102', 'SESS_TIME' => 1710853835, 'IS_EXPIRED' => null, 'BX_SESSION_SIGN' => '7a657c0101c5099c32a534cb84606746', 'fixed_session_id' => '9ed33ebfc780325204adf82de1c8c9c1', 'BITRIX_CONVERSION_CONTEXT_s1' => [ 'ID' => null, 'EXPIRE' => 1710874740, 'UNIQUE' => [], ], 'SESS_SHOW_INCLUDE_TIME_EXEC' => null, 'BX_LOGIN_NEED_CAPTCHA_LOGIN' => [ 'LOGIN' => '', 'POLICY_ATTEMPTS' => 0, ], 'USER_GEO_POSITION' => [ 'locationID' => '47602', 'latitude' => '0.000000', 'longitude' => '0.000000', 'country' => 'Республика Казахстан', 'region' => '', 'city' => 'г.Алматы', 'zoom' => '', ], 'LOCAL_REDIRECTS' => [ 'C' => 0, 'R' => '', ], ];