|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Protected Member Functions | |
| _setAuthUrl ($key, $url) | |
| _logout () | |
| _createUrl () | |
Protected Member Functions inherited from SessionManager | |
| registerSaveHandler () | |
| _addHost () | |
| _getHosts () | |
| _cleanHosts () | |
| clearSubDomainSessionCookie () | |
Protected Attributes | |
| $_customer | |
| $_customerResource | |
| $_customerModel | |
| $_isCustomerIdChecked = null | |
| $_customerUrl | |
| $_coreUrl = null | |
| $_configShare | |
| $_session | |
| $customerRepository | |
| $_customerFactory | |
| $_urlFactory | |
| $_eventManager | |
| $_httpContext | |
| $groupManagement | |
| $response | |
Protected Attributes inherited from SessionManager | |
| $defaultDestroyOptions = ['send_expire_cookie' => true, 'clear_storage' => true] | |
| $validator | |
| $request | |
| $sidResolver | |
| $sessionConfig | |
| $saveHandler | |
| $storage | |
| $cookieManager | |
| $cookieMetadataFactory | |
Additional Inherited Members | |
Data Fields inherited from SessionManagerInterface | |
| const | HOST_KEY = '_session_hosts' |
Static Protected Attributes inherited from SessionManager | |
| static | $urlHostCache = [] |
Customer session model
@api @method string getNoReferer() @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 22 of file Session.php.
| \Magento\Framework\App\Request\Http | $request | |
| \Magento\Framework\Session\SidResolverInterface | $sidResolver | |
| \Magento\Framework\Session\Config\ConfigInterface | $sessionConfig | |
| \Magento\Framework\Session\SaveHandlerInterface | $saveHandler | |
| \Magento\Framework\Session\ValidatorInterface | $validator | |
| \Magento\Framework\Session\StorageInterface | $storage | |
| \Magento\Framework\Stdlib\CookieManagerInterface | $cookieManager | |
| \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory | $cookieMetadataFactory | |
| \Magento\Framework\App\State | $appState | |
| Share | $configShare | |
| \Magento\Framework\Url\Helper\Data | $coreUrl | |
| \Magento\Customer\Model\Url | $customerUrl | |
| ResourceCustomer | $customerResource | |
| CustomerFactory | $customerFactory | |
| \Magento\Framework\UrlFactory | $urlFactory | |
| \Magento\Framework\Session\Generic | $session | |
| \Magento\Framework\Event\ManagerInterface | $eventManager | |
| \Magento\Framework\App\Http\Context | $httpContext | |
| CustomerRepositoryInterface | $customerRepository | |
| GroupManagementInterface | $groupManagement | |
| \Magento\Framework\App\Response\Http | $response |
Definition at line 134 of file Session.php.
|
protected |
Definition at line 572 of file Session.php.
|
protected |
Logout without dispatching event
Definition at line 525 of file Session.php.
|
protected |
Set auth url
| string | $key | |
| string | $url |
Definition at line 512 of file Session.php.
| authenticate | ( | $loginUrl = null | ) |
Authenticate controller action by login customer
| bool | null | $loginUrl |
Definition at line 480 of file Session.php.
| checkCustomerId | ( | $customerId | ) |
Check exists customer (light check)
| int | $customerId |
Definition at line 394 of file Session.php.
| getCustomer | ( | ) |
Retrieve customer model object
Definition at line 288 of file Session.php.
| getCustomerConfigShare | ( | ) |
Retrieve customer sharing configuration model
Definition at line 188 of file Session.php.
| getCustomerData | ( | ) |
| getCustomerDataObject | ( | ) |
Returns Customer data object with the customer information
Definition at line 234 of file Session.php.
| getCustomerGroupId | ( | ) |
Get customer group id If customer is not logged in system, 'not logged in' group id will be returned
Definition at line 362 of file Session.php.
| getCustomerId | ( | ) |
Retrieve customer id from current session
@api
Definition at line 315 of file Session.php.
| getId | ( | ) |
Retrieve customer id from current session
Definition at line 328 of file Session.php.
| isLoggedIn | ( | ) |
Checking customer login status
@api
Definition at line 381 of file Session.php.
| loginById | ( | $customerId | ) |
Authorization customer by identifier
@api
| int | $customerId |
Definition at line 447 of file Session.php.
| logout | ( | ) |
| regenerateId | ( | ) |
Reset core session hosts after resetting session ID
Implements SessionManagerInterface.
Definition at line 562 of file Session.php.
| setAfterAuthUrl | ( | $url | ) |
| setBeforeAuthUrl | ( | $url | ) |
| setCustomer | ( | Customer | $customerModel | ) |
Set customer model and the customer id in session
| Customer | $customerModel |
The next line is a workaround. It is used to distinguish users that are logged in from user data set via methods similar to setCustomerId()
Definition at line 260 of file Session.php.
| setCustomerAsLoggedIn | ( | $customer | ) |
| Customer | $customer |
Definition at line 413 of file Session.php.
| setCustomerData | ( | CustomerData | $customer | ) |
Set customer object and setting customer id in session
| CustomerData | $customer |
Definition at line 199 of file Session.php.
| setCustomerDataAsLoggedIn | ( | $customer | ) |
| CustomerData | $customer |
Definition at line 426 of file Session.php.
| setCustomerDataObject | ( | CustomerData | $customerData | ) |
Set Customer data object with the customer information
| CustomerData | $customerData |
Definition at line 246 of file Session.php.
| setCustomerGroupId | ( | $id | ) |
Set customer group id
| int | null | $id |
Definition at line 350 of file Session.php.
| setCustomerId | ( | $id | ) |
| setId | ( | $customerId | ) |
Set customer id
| int | null | $customerId |
Definition at line 339 of file Session.php.
|
protected |
Definition at line 67 of file Session.php.
|
protected |
Definition at line 62 of file Session.php.
|
protected |
Definition at line 29 of file Session.php.
|
protected |
Definition at line 82 of file Session.php.
|
protected |
Definition at line 41 of file Session.php.
|
protected |
Definition at line 34 of file Session.php.
|
protected |
Definition at line 55 of file Session.php.
|
protected |
Definition at line 92 of file Session.php.
|
protected |
Definition at line 97 of file Session.php.
|
protected |
Definition at line 48 of file Session.php.
|
protected |
Definition at line 72 of file Session.php.
|
protected |
Definition at line 87 of file Session.php.
|
protected |
Definition at line 77 of file Session.php.
|
protected |
Definition at line 102 of file Session.php.
|
protected |
Definition at line 107 of file Session.php.