{"id":22656859,"url":"https://github.com/libreworks/caridea-session","last_synced_at":"2025-03-29T08:11:17.051Z","repository":{"id":33173653,"uuid":"36814788","full_name":"libreworks/caridea-session","owner":"libreworks","description":":fried_shrimp: Caridea is a miniscule PHP application library. This is a shrimpy session component.","archived":false,"fork":false,"pushed_at":"2018-01-06T20:45:42.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T21:47:34.631Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libreworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-03T16:03:16.000Z","updated_at":"2016-11-17T19:52:23.000Z","dependencies_parsed_at":"2022-08-17T21:15:29.968Z","dependency_job_id":null,"html_url":"https://github.com/libreworks/caridea-session","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libreworks%2Fcaridea-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libreworks%2Fcaridea-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libreworks%2Fcaridea-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libreworks%2Fcaridea-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libreworks","download_url":"https://codeload.github.com/libreworks/caridea-session/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246156419,"owners_count":20732397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-09T10:16:43.025Z","updated_at":"2025-03-29T08:11:17.029Z","avatar_url":"https://github.com/libreworks.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# caridea-session\nCaridea is a miniscule PHP application library. This shrimpy fellow is what you'd use when you just want some helping hands and not a full-blown framework.\n\n![](http://libreworks.com/caridea-100.png)\n\nThis is the session component. It's used for controlling sessions (e.g. starting, resuming, destroying) as well as storing namespaced values within a session.\n\nIt supports plugins that get notified of session events. Included in this package are a CSRF prevention plugin and a \"flash message\" plugin.\n\n[![Packagist](https://img.shields.io/packagist/v/caridea/session.svg)](https://packagist.org/packages/caridea/session)\n[![Build Status](https://travis-ci.org/libreworks/caridea-session.svg)](https://travis-ci.org/libreworks/caridea-session)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/libreworks/caridea-session/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/libreworks/caridea-session/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/libreworks/caridea-session/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/libreworks/caridea-session/?branch=master)\n\n## Installation\n\nYou can install this library using Composer:\n\n```console\n$ composer require caridea/session\n```\n\n* The master branch (version 3.x) of this project requires PHP 7.1 and has no dependencies\n* Version 2.x of this project requires PHP 7.0 and has no dependencies\n* Version 1.x of this project requires PHP 5.5 and depends on `caridea/random`.\n\n## Compliance\n\nReleases of this library will conform to [Semantic Versioning](http://semver.org).\n\nOur code is intended to comply with [PSR-1](http://www.php-fig.org/psr/psr-1/), [PSR-2](http://www.php-fig.org/psr/psr-2/), and [PSR-4](http://www.php-fig.org/psr/psr-4/). If you find any issues related to standards compliance, please send a pull request!\n\n## Documentation\n\n* Head over to [Read the Docs](http://caridea-session.readthedocs.io/en/latest/)\n\n## Examples\n\nJust a few quick examples.\n\nCreating a Session.\n\n```php\n// When the session starts, a CSRF token will be created and stored\n$csrf = new \\Caridea\\Session\\CsrfPlugin();\n// Display-once messages can be added using the flash plugin\n$flash = new \\Caridea\\Session\\FlashPlugin();\n$session = new \\Caridea\\Session\\NativeSession($_COOKIE, [$csrf, $flash]);\n\n$session-\u003eresume() || $session-\u003estart();\n\n$flash-\u003eset('foo', 'bar');\n\n$token = $csrf-\u003egetValue();\n\n$values = $session-\u003egetValues('my-namespace');\n$values['foobar'] = 'abc123';\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibreworks%2Fcaridea-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibreworks%2Fcaridea-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibreworks%2Fcaridea-session/lists"}