{"id":18783710,"url":"https://github.com/tomkyle/session","last_synced_at":"2025-07-22T09:08:50.264Z","repository":{"id":14799727,"uuid":"17521896","full_name":"tomkyle/Session","owner":"tomkyle","description":"PHP Session helper, extracted from my melting codebase monolith.","archived":false,"fork":false,"pushed_at":"2014-03-12T08:53:10.000Z","size":140,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-26T08:02:51.706Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomkyle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-07T17:36:44.000Z","updated_at":"2017-03-20T17:53:19.000Z","dependencies_parsed_at":"2022-09-16T04:01:29.780Z","dependency_job_id":null,"html_url":"https://github.com/tomkyle/Session","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tomkyle/Session","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomkyle%2FSession","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomkyle%2FSession/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomkyle%2FSession/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomkyle%2FSession/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomkyle","download_url":"https://codeload.github.com/tomkyle/Session/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomkyle%2FSession/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266463417,"owners_count":23932898,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-07T20:40:22.141Z","updated_at":"2025-07-22T09:08:50.218Z","avatar_url":"https://github.com/tomkyle.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"#tomkyle/session\n\n\n[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/tomkyle/Session/badges/quality-score.png?s=a80068f1af1333ff735c22e65e949c173b7872a0)](https://scrutinizer-ci.com/g/tomkyle/Session/)\n\nA PHP Session helper that stores session data in sub-namespaces.\n\n    $_SESSION (PHP superglobal)\n         |\n         +-- SessionStorage (or derived class name)\n                |\n                +-- keyword (passed in instantiation)\n                       |\n                       +-- foo =\u003e bar\n                       +-- key =\u003e value\n\n\n##Example\n\n```php\n\u003c?php\nuse \\tomkyle\\Session\\SessionStorage;\nuse \\MyNamepace\\MySessionData;\n\nclass MySessionData extends SessionStorage {}\n\n$namespace1 = new MySessionData( \"keyword\" );\n$namespace1-\u003efoo = \"bar\";\n$namespace1-\u003ekey = \"value\";\n\n$namespace2 = new MySessionData( \"user\" );\n$namespace2-\u003efoo = \"baz\";\n$namespace2-\u003ekey = 2000;\n\n$namespace3 = new SessionStorage( \"keyword\" );\n$namespace3-\u003efoo = \"anything\";\n$namespace3-\u003ekey = \"something\";\n\n// will both print \"bar\":\necho $namespace1-\u003efoo;\n// compare old-school:\necho $_SESSION['MySessionData']['keyword']['foo'];\n\n// will both print \"baz\":\necho $namespace2-\u003efoo;\n// compare old-school:\necho $_SESSION['MySessionData']['user']['foo'];\n\n\n\n// will both print \"not the same\"\necho ($namespace1-\u003efoo == $namespace2-\u003efoo)\n? \"samesame\" : \"not the same\";\n\necho ($namespace2-\u003efoo == $namespace3-\u003efoo)\n? \"samesame\" : \"not the same\";\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomkyle%2Fsession","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomkyle%2Fsession","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomkyle%2Fsession/lists"}