SessionManagerInterface.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/Session/SessionManagerInterface.php
  2. 8.9.x core/lib/Drupal/Core/Session/SessionManagerInterface.php
  3. 11.x core/lib/Drupal/Core/Session/SessionManagerInterface.php

Namespace

Drupal\Core\Session

File

core/lib/Drupal/Core/Session/SessionManagerInterface.php

View source
<?php

namespace Drupal\Core\Session;

use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface;

/**
 * Defines the session manager interface.
 */
interface SessionManagerInterface extends SessionStorageInterface {
    
    /**
     * Ends a specific user's session(s).
     *
     * @param int $uid
     *   User ID.
     */
    public function delete($uid);
    
    /**
     * Destroys the current session and removes session cookies.
     */
    public function destroy();
    
    /**
     * Sets the write safe session handler.
     *
     * @todo This should be removed once all database queries are removed from
     *   the session manager class.
     *
     * @var \Drupal\Core\Session\WriteSafeSessionHandlerInterface
     */
    public function setWriteSafeHandler(WriteSafeSessionHandlerInterface $handler);

}

Interfaces

Title Deprecated Summary
SessionManagerInterface Defines the session manager interface.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.