Coder Social home page Coder Social logo

php-session's Issues

Cannot use bool as default value

Hello,
At line 79 of the file src/Session.php, there is the set function with the $value parameter which is type-hinted as a string with a default of (bool) false. This causes an issue I guess
Thanks !

RE: Status of this project

Hi There,

I am looking to use this library in a web application that would be running for like the next ten years. Is this project still being maintained?

Thanks

Namespace wrong in the readme

Hi, when installed through composer and then tried to use like stated in the readme:

use josantonius\Session\Session;
$session = new Session();

It will not find the class, since the namespace is capitalized and should read:

use Josantonius\Session\Session;

Otherwise great work

Wrong class installed via composer

Hi, i'm getting a wrong class when I try to install this lib in my project.
I am using php 7.4
I run composer require josantonius/session --prefer-source and I get this class:

image

which is "slightly" different from this:

image

How to renew the expiration time?

When instantiating the object, an expiration time is established: For example.
Session::init($lifeTime);
I can also instantiate without expiration date and the session expires until it is destroyed:
Session::destroy($key, $prefix);

Well, I have a system that validates some parameters to access the user control panel and that allows only one login per user, that is, if someone else accesses from another computer, all previous sessions are destroyed and only the most recent one remains active.

The problem is: I do not want the session to be destroyed after a certain time AFTER creating it, rather I want it to be destroyed after a period of inactivity, therefore, what I need is that, every time the user validation is done refresh or re-add the 3600 seconds back to that already active session.

How could I do it?
Thanks for the help.

P.S. I am using Middlewares

Method has in class

Hi, i have a question.

Can you create a method with name "has" ? This method check if the key is isset in session.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.