Bitrix-D7 22.6
 
Загрузка...
Поиск...
Не найдено
Класс Application
+ Граф наследования:Application:

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

 initializeBasicKernel ()
 
 initializeExtendedKernel (array $params)
 
 getRouter ()
 
 setRouter (Router $router)
 
 getCurrentRoute ()
 
 setCurrentRoute (Route $currentRoute)
 
 start ()
 
 run ()
 
 end ($status=0, Response $response=null)
 
 terminate ($status=0)
 
 createExceptionHandlerLog ()
 
 createExceptionHandlerOutput ()
 
 getExceptionHandler ()
 
 getConnectionPool ()
 
 getContext ()
 
 setContext (Context $context)
 
 getLicense ()
 
 getCache ()
 
 getManagedCache ()
 
 getTaggedCache ()
 
 getSessionLocalStorageManager ()
 
 getLocalSession ($name)
 
 getKernelSession ()
 
 getSession ()
 
 getCompositeSessionManager ()
 
 addBackgroundJob (callable $job, array $args=[], $priority=self::JOB_PRIORITY_NORMAL)
 
 isInitialized ()
 

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

static getInstance ()
 
static hasInstance ()
 
static getConnection ($name="")
 
static getUserTypeManager ()
 
static isUtfMode ()
 
static getDocumentRoot ()
 
static getPersonalRoot ()
 
static resetAccelerator ()
 

Открытые атрибуты

const JOB_PRIORITY_NORMAL = 100
 
const JOB_PRIORITY_LOW = 50
 

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

 __construct ()
 
 initializeContext (array $params)
 
 handleResponseBeforeSend (Response $response)
 
 initializeExceptionHandler ()
 
 createDatabaseConnection ()
 
 initializeCache ()
 
 runBackgroundJobs ()
 

Защищенные данные

bool $initialized = false
 
 $context
 
 $router
 
 $currentRoute
 
 $connectionPool
 
 $managedCache
 
 $taggedCache
 
 $session
 
 $kernelSession
 
 $compositeSessionManager
 
 $sessionLocalStorageManager
 
 $backgroundJobs
 
 $license
 

Статические защищенные данные

static $instance
 

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

Base class for any application.

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

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

◆ __construct()

__construct ( )
protected

Creates new application instance.

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

Методы

◆ addBackgroundJob()

addBackgroundJob ( callable  $job,
array  $args = [],
  $priority = self::JOB_PRIORITY_NORMAL 
)

Adds a job to do after the response was sent.

Аргументы
callable$job
array$args
int$priority
Возвращает
$this

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

◆ createDatabaseConnection()

createDatabaseConnection ( )
protected

Creates database connection pool.

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

◆ createExceptionHandlerLog()

createExceptionHandlerLog ( )

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

◆ createExceptionHandlerOutput()

createExceptionHandlerOutput ( )

Переопределяется в HttpApplication.

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

◆ end()

end (   $status = 0,
Response  $response = null 
)

Ends work of application. Sends response and then terminates execution. If there is no $response the method will use Context::$response.

Аргументы
int$status
Response | null$response
Возвращает
void

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

◆ getCache()

getCache ( )

Returns new instance of the Cache object.

Возвращает
Data\Cache

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

◆ getCompositeSessionManager()

getCompositeSessionManager ( )
final

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

◆ getConnection()

static getConnection (   $name = "")
static

Static method returns database connection for the specified name. If name is empty - default connection is returned.

Аргументы
string$nameName of database connection. If empty - default connection.
Возвращает
Data\Connection|DB\Connection

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

◆ getConnectionPool()

getConnectionPool ( )

Returns database connections pool object.

Возвращает
Data\ConnectionPool

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

◆ getContext()

getContext ( )

Returns context of the current request.

Возвращает
Context | HttpContext

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

◆ getCurrentRoute()

getCurrentRoute ( )
Возвращает
Route

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

◆ getDocumentRoot()

static getDocumentRoot ( )
static

Returns server document root.

Возвращает
null|string

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

◆ getExceptionHandler()

getExceptionHandler ( )
Возвращает
\Bitrix\Main\Diag\ExceptionHandler

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

◆ getInstance()

static getInstance ( )
static

Returns current instance of the Application.

Возвращает
Application | HttpApplication

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

◆ getKernelSession()

getKernelSession ( )
final

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

◆ getLicense()

getLicense ( )

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

◆ getLocalSession()

getLocalSession (   $name)
final

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

◆ getManagedCache()

getManagedCache ( )

Returns manager of the managed cache.

Возвращает
Data\ManagedCache

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

◆ getPersonalRoot()

static getPersonalRoot ( )
static

Returns personal root directory (relative to document root)

Возвращает
null|string

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

◆ getRouter()

getRouter ( )
Возвращает
Router

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

◆ getSession()

getSession ( )
final

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

◆ getSessionLocalStorageManager()

getSessionLocalStorageManager ( )
final

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

◆ getTaggedCache()

getTaggedCache ( )

Returns manager of the managed cache.

Возвращает
Data\TaggedCache

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

◆ getUserTypeManager()

static getUserTypeManager ( )
static

Returns UF manager.

Возвращает
\CUserTypeManager

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

◆ handleResponseBeforeSend()

handleResponseBeforeSend ( Response  $response)
protected

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

◆ hasInstance()

static hasInstance ( )
static
Возвращает
bool

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

◆ initializeBasicKernel()

initializeBasicKernel ( )

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

◆ initializeCache()

initializeCache ( )
protected

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

◆ initializeContext()

initializeContext ( array  $params)
abstractprotected

Initializes context of the current request. Should be implemented in subclass.

Аргументы
array$params

Переопределяется в HttpApplication.

◆ initializeExceptionHandler()

initializeExceptionHandler ( )
protected

Exception handler can be initialized through the Config\Configuration (.settings.php file).

'exception_handling' => array( 'value' => array( 'debug' => true, // output exception on screen 'handled_errors_types' => E_ALL & ~E_STRICT & ~E_NOTICE, // catchable error types, printed to log 'exception_errors_types' => E_ALL & ~E_NOTICE & ~E_STRICT, // error types from catchable which throws exceptions 'ignore_silence' => false, // ignore @ 'assertion_throws_exception' => true, // assertion throws exception 'assertion_error_type' => 256, 'log' => array( 'class_name' => 'MyLog', // custom log class, must extend ExceptionHandlerLog; can be omited, in this case default Diag\FileExceptionHandlerLog will be used 'extension' => 'MyLogExt', // php extension, is used only with 'class_name' 'required_file' => 'modules/mylog.module/mylog.php' // included file, is used only with 'class_name' 'settings' => array( // any settings for 'class_name' 'file' => 'bitrix/modules/error.log', 'log_size' => 1000000, ), ), ), 'readonly' => false, ),

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

◆ initializeExtendedKernel()

initializeExtendedKernel ( array  $params)

Does full kernel initialization. Should be called somewhere after initializeBasicKernel().

Аргументы
array$paramsParameters of the current request (depends on application type)

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

◆ isInitialized()

isInitialized ( )

Returns true if the application is fully initialized.

Возвращает
bool

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

◆ isUtfMode()

static isUtfMode ( )
static

Returns true id server is in utf-8 mode. False - otherwise.

Возвращает
bool

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

◆ resetAccelerator()

static resetAccelerator ( )
static

Resets accelerator if any.

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

◆ run()

run ( )

Runs controller and its action and sends response to the output.

It's a stub method, and we can't mark it as abstract because there is compatibility.

Возвращает
void

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

◆ runBackgroundJobs()

runBackgroundJobs ( )
protected

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

◆ setContext()

setContext ( Context  $context)

Modifies context of the current request.

Аргументы
Context$context

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

◆ setCurrentRoute()

setCurrentRoute ( Route  $currentRoute)
Аргументы
Route$currentRoute

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

◆ setRouter()

setRouter ( Router  $router)
Аргументы
Router$router

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

◆ start()

start ( )
abstract

Starts request execution. Should be called after initialize. Should be implemented in subclass.

Переопределяется в HttpApplication.

◆ terminate()

terminate (   $status = 0)

Terminates application by invoking exit(). It's the right way to finish application.

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

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

Данные класса

◆ $backgroundJobs

$backgroundJobs
protected

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

◆ $compositeSessionManager

$compositeSessionManager
protected

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

◆ $connectionPool

$connectionPool
protected

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

◆ $context

$context
protected

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

◆ $currentRoute

$currentRoute
protected

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

◆ $initialized

bool $initialized = false
protected

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

◆ $instance

$instance
staticprotected

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

◆ $kernelSession

$kernelSession
protected

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

◆ $license

$license
protected

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

◆ $managedCache

$managedCache
protected

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

◆ $router

$router
protected

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

◆ $session

$session
protected

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

◆ $sessionLocalStorageManager

$sessionLocalStorageManager
protected

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

◆ $taggedCache

$taggedCache
protected

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

◆ JOB_PRIORITY_LOW

const JOB_PRIORITY_LOW = 50

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

◆ JOB_PRIORITY_NORMAL

const JOB_PRIORITY_NORMAL = 100

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