2017 © Pedro Peláez
 

library session

Encapsulated user sessions.

image

phpgt/session

Encapsulated user sessions.

  • Monday, July 30, 2018
  • by g105b
  • Repository
  • 1 Watchers
  • 0 Stars
  • 48 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 4 Open issues
  • 9 Versions
  • 41 % Grown

The README.md

Encapsulated user sessions.

This library is a simple object oriented alternative to the $_SESSION superglobal allowing application code to be passed encapsulated SessionStore objects, so areas of code can have access to their own Session area without having full read-write access to all session variables., (*1)

Sessions are addressed using dot notation, allowing for handling categories of session data. This is particularly useful when dealing with user authentication, for example., (*2)


Build status Code quality Code coverage Current version PHP.Gt/Session documentation , (*3)

Example usage: Welcome a user by their first name or log out the user

if($session->contains("auth")) {
// Remove the *whole* auth section of the session on logout.
    if($action === "logout") {
        $session->delete("auth");
    }
    else {
// Output a variable within the auth namespace:
        $message = "Welcome back, " . $session->getString("auth.user.name");
    }
}
else {
// Pass the "auth" store to a class, so it 
// can't read/write to other session variables:
    AuthenticationSystem::beginLogin($session->getStore("auth"));
}

The Versions

30/07 2018

dev-master

9999999-dev

Encapsulated user sessions.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

26/07 2018

v0.2.0

0.2.0.0

Encapsulated user sessions.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

26/07 2018

dev-6-dot-notation

dev-6-dot-notation

Encapsulated user sessions.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

22/07 2018

v0.1.0

0.1.0.0

Encapsulated user sessions.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

22/07 2018

dev-8-session-store

dev-8-session-store

Encapsulated user sessions.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

14/05 2018

v0.0.3

0.0.3.0

Encapsulated user sessions.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

08/05 2018

dev-4-write-delete

dev-4-write-delete

Encapsulated user sessions.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

  • phpunit ^6.4

20/04 2018

v0.0.2

0.0.2.0

Encapsulated user sessions.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

  • phpunit ^6.4

20/02 2018

v0.0.1

0.0.1.0

Encapsulated user sessions.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

  • phpunit ^6.4