...
Concept | In Web Request | In CLI |
---|
logged-in user id | $this->Application->RecallVar('user_id') | - no session
- no permission checking
- no logged-in user concept
- always return fixed user id
|
is ajax request | $this->Application->GetVar('ajax') == 'yes' | - no web request
- always return false
|
current language id | $this->Application->GetVar('m_lang') | - no web request
- always return primary language id
|
current theme id | $this->Application->GetVar('m_theme') | - no web request
- always return primary theme id
|
automatic object loading by ID in url | code inside "kDBEventHandler::StoreSelectedIDs" method | - no web request
- throw an exception on loading attempt
|
getting current site domain field | $this->Application->siteDomainField('FieldName') | - no web request
- no domains
- always return false
|
current session id | $this->Application->GetSID() | - no session
- always return ID of current CLI process ID (PID)
|
main popup window identifier | $this->Application->GetTopmostWid() | - no windows in CLI
- always return an empty string
|
popup window identifier | $this->Application->GetVar('m_wid') | - no windows in CLI
- always return an empty string
|
is current user logged-in | $this->Application->LoggedIn() | - no session
- no permission checking
- no logged-in user concept
- always return false
|
website visitor IP address | $this->Application->getClientIP() | - no web request
- always return empty string
|
attempt to read/write web request data | - $this->Application->GetVar(..., ...)
- $this->Application->SetVar(..., ...)
- $this->Application->DeleteVar(...)
| - no web request
- create in-memory storage to be used instead of session
- used during url building a lot
|
attempt to read/write web request data | other methods | - always throw an exception
|
attempt to read/write session data | - $this->Application->StoreVar(..., ...)
- $this->Application->RecallVar(..., ...)
- $this->Application->RemoveVar(...)
| - no session
- create in-memory storage to be used instead of session
- used in some scheduled tasks as temp storage
|
attempt to read/write session data | other methods | - always throw an exception
|
Even though most of methods mentioned makes no sense in CLI they still return value that makes sense to avoid changing every call site.
Things, that usually are done from CLI
- sending e-mail
- can be several e-mails at once
- each e-mail on different language
- phrases used inside e-mail
- building a link
- to homepage
- to other page
- with use_section="1" attribute
- with mod-rewrite globally enabled
- with mod-rewrite globally disabled
- link to a category item
- printing a grid
- with help of PrintList/PrintList2 tags
- usage of InitList tag
- loading an item
- from database by given id
Related Tasks
Jira Legacy |
---|
server | System Jira |
---|
serverId | 513b375f-8291-3313-9d9f-704c39b1f915 |
---|
key | INP-1516 |
---|
|