Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced integration ability to beyond non-MySQLi backend. #14

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

prasad83
Copy link

  • Added (Zebra_Session_Store) interface to allow application to implement for custom backend.
  • Zebra_Session_MySQLiStore implemented provided to out-of-box work with MySQLi (as it was earlier).
class MyDataSessionStore implements Zebra_Session_Store { }
$session = new Zebra_Session(new MyDataSessionStore(...), 'SeCrEt');

Adding Zeb_Session_Store to classmap in composer.json
To achieve better integration with different store and loose couple Zebra_Session created (Zebra_Session_Store) interface.
It also includes implementation for MySQLi
@tsmgeek
Copy link

tsmgeek commented Feb 1, 2019

Is this going anywhere?

@stefangabos
Copy link
Owner

stefangabos commented Feb 1, 2019

Nope, currently I don't plan on integrating this. I am not ruling it out - I will most likely look over this and implement it at some point - but that time is not now.
You can fork this and merge the pull request yourself, though

@alkinbg
Copy link

alkinbg commented Aug 25, 2023

@stefangabos is it possible to use Zebra_Session along with Zebra_Database instead of this $link and another connection to the DB. Thank you.

@stefangabos
Copy link
Owner

stefangabos commented Aug 26, 2023

@stefangabos is it possible to use Zebra_Session along with Zebra_Database instead of this $link and another connection to the DB. Thank you.

I am not sure I understand what you are asking but Zebra Session doesn't create a new database connection - that is why the $link is passed to it (be it from Zebra Databse, PDO, or anything else). As for passing a different link than your "main" one, absolutely - you can have multiple database connections in your app and passing one of them to Zebra Session is up to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants