1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс CComponentEngine

Открытые члены

 __construct ($component=null)
 getComponent ()
 addGreedyPart ($part)
 setResolveCallback ($resolveCallback)
 hasNoVariables ($pageTemplate)
 hasGreedyParts ($pageTemplate)
 guessComponentPath ($folder404, $arUrlTemplates, &$arVariables, $requestURL=false)

Открытые статические члены

static checkComponentName ($componentName)
static makeComponentPath ($componentName)
static parseComponentPath ($folder404, $arUrlTemplates, &$arVariables, $requestURL=false)
static initComponentVariables ($componentPage, $arComponentVariables, $arVariableAliases, &$arVariables)
static makeComponentUrlTemplates ($arDefaultUrlTemplates, $arCustomUrlTemplates)
static makeComponentVariableAliases ($arDefaultVariableAliases, $arCustomVariableAliases)
static makePathFromTemplate ($template, $arParams=array())

Поля данных

 $cacheSalt = ''

Защищенные члены

 sortUrlTemplates ($arUrlTemplates, &$bHasGreedyPartsInTemplates)
 __checkPath4Template ($pageTemplate, $currentPageUrl, &$arVariables)

Подробное описание

См. определение в файле component_engine.php строка 9

Конструктор(ы)

◆ __construct()

__construct ( $component = null)

Constructor.

Takes component as parameter and initializing the object.

Аргументы
CBitrixComponent$component

См. определение в файле component_engine.php строка 22

Методы

◆ __checkPath4Template()

__checkPath4Template ( $pageTemplate,
$currentPageUrl,
& $arVariables )
protected

Checks if page template matches current URL.

In case of succsessful match fills in parsed variables.

Аргументы
string$pageTemplate
string$currentPageUrl
array[string]string&$arVariables
Возвращает
bool

См. определение в файле component_engine.php строка 157

◆ addGreedyPart()

addGreedyPart ( $part)

Marks one of the page templates parts as greedy (may contain "/" separator).

Аргументы
string$part
Возвращает
void

См. определение в файле component_engine.php строка 44

◆ checkComponentName()

checkComponentName ( $componentName)
static

Checks if component name is valid.

Component name consists of namespace part, separator and name. Example: bitrix:news.list

Аргументы
string$componentName
Возвращает
bool

См. определение в файле component_engine.php строка 70

◆ getComponent()

getComponent ( )

Returns associated component.

Возвращает
CBitrixComponent

См. определение в файле component_engine.php строка 33

◆ guessComponentPath()

guessComponentPath ( $folder404,
$arUrlTemplates,
& $arVariables,
$requestURL = false )

Finds match between requestURL and on of the url templates.

Lets using the engine object and greedy templates.

Аргументы
string$folder404
array[string]string$arUrlTemplates
array[string]string&$arVariables
string | bool$requestURL
Возвращает
string

См. определение в файле component_engine.php строка 212

◆ hasGreedyParts()

hasGreedyParts ( $pageTemplate)

Checks if page template.has greedy templates it it.

Аргументы
string$pageTemplate
Возвращает
bool

См. определение в файле component_engine.php строка 106

◆ hasNoVariables()

hasNoVariables ( $pageTemplate)

Checks if page template has templates in it.

Аргументы
string$pageTemplate
Возвращает
bool

См. определение в файле component_engine.php строка 95

◆ initComponentVariables()

initComponentVariables ( $componentPage,
$arComponentVariables,
$arVariableAliases,
& $arVariables )
static

Initializes component variables from $_REQUEST based on component page selected.

Аргументы
string$componentPage
array[string]string$arComponentVariables
array[string]string$arVariableAliases
array[string]string&$arVariables
Возвращает
void

См. определение в файле component_engine.php строка 283

◆ makeComponentPath()

makeComponentPath ( $componentName)
static

Makes filesystem relative path out of com name.

Аргументы
string$componentName
Возвращает
string

См. определение в файле component_engine.php строка 81

◆ makeComponentUrlTemplates()

makeComponentUrlTemplates ( $arDefaultUrlTemplates,
$arCustomUrlTemplates )
static

Prepares templates based on default and provided.

Аргументы
array[string]string$arDefaultUrlTemplates
array[string]string$arCustomUrlTemplates
Возвращает
array[string]string

См. определение в файле component_engine.php строка 325

◆ makeComponentVariableAliases()

makeComponentVariableAliases ( $arDefaultVariableAliases,
$arCustomVariableAliases )
static

Prepares variables based on default and provided.

Аргументы
array[string]string$arDefaultVariableAliases
array[string]string$arCustomVariableAliases
Возвращает
array[string]string

См. определение в файле component_engine.php строка 340

◆ makePathFromTemplate()

makePathFromTemplate ( $template,
$arParams = array() )
static

Replaces templates in provided string based on parameters

Аргументы
string$template
array[string]string$arParams
Возвращает
string

См. определение в файле component_engine.php строка 355

◆ parseComponentPath()

parseComponentPath ( $folder404,
$arUrlTemplates,
& $arVariables,
$requestURL = false )
static

Finds match between requestURL and on of the url templates.

Аргументы
string$folder404
array[string]string$arUrlTemplates
array[string]string&$arVariables
string | bool$requestURL
Возвращает
string

См. определение в файле component_engine.php строка 196

◆ setResolveCallback()

setResolveCallback ( $resolveCallback)

Registers callback with will be called on page indetermination.

Аргументы
callback$resolveCallback
Возвращает
void

См. определение в файле component_engine.php строка 57

◆ sortUrlTemplates()

sortUrlTemplates ( $arUrlTemplates,
& $bHasGreedyPartsInTemplates )
protected

Sorts templates for inspection.

First will be templates without any variables. Then templates without greedy parts. Then greedy ones.

Аргументы
array[string]string$arUrlTemplates
bool&$bHasGreedyPartsInTemplates
Возвращает
array[string]string

См. определение в файле component_engine.php строка 125

Поля

◆ $cacheSalt

$cacheSalt = ''

См. определение в файле component_engine.php строка 11


Объявления и описания членов класса находятся в файле: