Bitrix-D7: Класс 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 |
| |
Base class for any application.
См. определение в файле application.php строка 24
◆ __construct()
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()
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 | $name | Name of database connection. If empty — default connection. |
- Возвращает
- Data\Connection|DB\Connection
См. определение в файле application.php строка 520
◆ getConnectionPool()
Returns database connections pool object.
- Возвращает
- Data\ConnectionPool
См. определение в файле application.php строка 477
◆ getContext()
Returns context of the current request.
- Возвращает
- Context | HttpContext
См. определение в файле application.php строка 487
◆ getCurrentRoute()
- Возвращает
- Route
См.
определение в файле application.php строка 199
◆ getDocumentRoot()
Returns server document root.
- Возвращает
- null|string
См. определение в файле application.php строка 624
◆ getExceptionHandler()
- Возвращает
- \Bitrix\Main\Diag\ExceptionHandler
См. определение в файле application.php строка 467
◆ getInstance()
Returns current instance of the Application.
- Возвращает
- Application | HttpApplication
См. определение в файле application.php строка 101
◆ getKernelSession()
См. определение в файле application.php строка 576
◆ getLicense()
См. определение в файле application.php строка 502
◆ getLocalSession()
См. определение в файле application.php строка 571
◆ getManagedCache()
Returns manager of the managed cache.
- Возвращает
- Data\ManagedCache
См. определение в файле application.php строка 541
◆ getPersonalRoot()
Returns personal root directory (relative to document root)
- Возвращает
- null|string
См. определение в файле application.php строка 646
◆ getRouter()
- Возвращает
- Router
См. определение в файле application.php строка 183
◆ getSession()
См. определение в файле application.
php строка 581
◆ getSessionLocalStorageManager()
| getSessionLocalStorageManager | ( | | ) | |
| final |
См. определение в файле application.php строка 566
◆ 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()
- Возвращает
- bool
См. определение в файле application.php строка 113
◆ initializeBasicKernel()
См. определение в файле application.php строка 122
◆ initializeCache()
См.
определение в файле application.php строка 442
◆ initializeContext()
| initializeContext | ( | array | $params | ) | |
| abstractprotected |
Initializes context of the current request. Should be implemented in subclass.
- Аргументы
Переопределяется в 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 | $params | Parameters of the current request (depends on application type) |
См. определение в файле application.php строка 131
◆ isInitialized()
Returns true if the application is fully initialized.
- Возвращает
- bool
См. определение в файле application.php строка 735
◆ isUtfMode()
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()
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()
См. определение в файле application.php строка 695
◆ setContext()
| setContext | ( | Context | $context | ) | |
Modifies context of the current request.
- Аргументы
См. определение в файле application.php строка 497
◆ setCurrentRoute()
| setCurrentRoute | ( | Route | $currentRoute | ) | |
- Аргументы
См.
определение в файле application.php строка 207
◆ setRouter()
| setRouter | ( | Router | $router | ) | |
- Аргументы
См. определение в файле application.php строка 191
◆ start()
Starts request execution. Should be called after initialize. Should be implemented in subclass.
Переопределяется в HttpApplication.
◆ terminate()
Terminates application by invoking exit().
It’s the right way to finish application.
- Аргументы
- Возвращает
- void
См. определение в файле application.php строка 292
◆ $backgroundJobs
См. определение в файле application.php строка 79
◆ $compositeSessionManager
См. определение в файле application.php строка 72
◆ $connectionPool
См. определение в файле application.php строка 53
◆ $context
См.
определение в файле application.php строка 41
◆ $currentRoute
См. определение в файле application.php строка 47
◆ $initialized
| bool $initialized = false |
| protected |
См. определение в файле application.php строка 34
◆ $instance
См. определение в файле application.php строка 32
◆ $kernelSession
См. определение в файле application.php строка 70
◆ $license
См.
определение в файле application.php строка 82
◆ $managedCache
См. определение в файле application.php строка 59
◆ $router
См. определение в файле application.php строка 44
◆ $session
См. определение в файле application.php строка 68
◆ $sessionLocalStorageManager
| $sessionLocalStorageManager |
| protected |
См. определение в файле application.php строка 74
◆ $taggedCache
См.