Skip to content

beevo-dev/interview-session-adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Interview Session Adapter

From a given adapter type, apply it to PHP the core.

This is an interview code excercise to deal with session adapters on PHP.


The main goal here is to create multiple adapters to apply on session handler, interacting to required adapter independently after validating it existance and it sanity. The real usage it's not required here (eg: persist session data on DB/Redis, etc.) - the main goal is to write a real functional code.

Usage goal:

SessionHandler::register('files');
$_SESSION['foo'] = 'bar'; // should write on file
echo $_SESSION['foo']; // should return 'bar' from written file

// register weirdo adapter
SessionHandler::register('THIS_IS_A_DUMMY_ADAPTER'); // Exception thrown

Useful links:


©Beevo - 2019

About

Create a session adapter to deal with PHP session

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages