{"id":20103156,"url":"https://github.com/dotkernel/dot-session","last_synced_at":"2025-06-12T01:04:42.330Z","repository":{"id":11921815,"uuid":"67813205","full_name":"dotkernel/dot-session","owner":"dotkernel","description":"DotKernel session component extending and customizing laminas-session","archived":false,"fork":false,"pushed_at":"2025-03-14T15:30:31.000Z","size":132,"stargazers_count":5,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"5.0","last_synced_at":"2025-06-01T12:10:01.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.dotkernel.org/dot-session/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotkernel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-09-09T16:07:07.000Z","updated_at":"2025-03-26T10:08:41.000Z","dependencies_parsed_at":"2024-04-11T13:27:05.538Z","dependency_job_id":"798bed3f-3442-4a87-8dbe-a099e1460312","html_url":"https://github.com/dotkernel/dot-session","commit_stats":{"total_commits":42,"total_committers":10,"mean_commits":4.2,"dds":0.6190476190476191,"last_synced_commit":"a6d24458cc0bd331d4a033e72b6955ddca824689"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/dotkernel/dot-session","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotkernel","download_url":"https://codeload.github.com/dotkernel/dot-session/tar.gz/refs/heads/5.0","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-session/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259374696,"owners_count":22847853,"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-11-13T17:34:30.158Z","updated_at":"2025-06-12T01:04:42.285Z","avatar_url":"https://github.com/dotkernel.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dot-session\n\nDotkernel session component extending and customizing [laminas-session](https://github.com/laminas/laminas-session)\n\n\u003e dot-session is a wrapper on top of [laminas/laminas-session](https://github.com/laminas/laminas-session)\n\n## Documentation\n\nDocumentation is available at: https://docs.dotkernel.org/dot-session/.\n\n## Badges\n\n![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-session)\n![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-session/5.7.0)\n\n[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-session)](https://github.com/dotkernel/dot-session/issues)\n[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-session)](https://github.com/dotkernel/dot-session/network)\n[![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-session)](https://github.com/dotkernel/dot-session/stargazers)\n[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-session)](https://github.com/dotkernel/dot-session/blob/5.0/LICENSE.md)\n\n[![Build Static](https://github.com/dotkernel/dot-session/actions/workflows/continuous-integration.yml/badge.svg?branch=5.0)](https://github.com/dotkernel/dot-session/actions/workflows/continuous-integration.yml)\n[![codecov](https://codecov.io/gh/dotkernel/dot-session/graph/badge.svg?token=DCHKH0R4AA)](https://codecov.io/gh/dotkernel/dot-session)\n[![PHPStan](https://github.com/dotkernel/dot-session/actions/workflows/static-analysis.yml/badge.svg?branch=5.0)](https://github.com/dotkernel/dot-session/actions/workflows/static-analysis.yml)\n\n## Installation\n\nRun the following command in your project folder\n\n```bash\n    composer require dotkernel/dot-session\n```\n\n## Configuration\n\nRegister `SessionMiddleware` in your application's pipeline by adding the following line to `config/pipeline.php`:\n\n```php\n    $app-\u003epipe(Dot\\Session\\SessionMiddleware::class);\n```\n\nRegister `dot-session`'s ConfigProvider in your application's configurations by adding the following line to `config/config.php`:\n\n```php\n    \\Dot\\Session\\ConfigProvider::class,\n```\n\n## Usage\n\nBasic usage to access and use the session object in your services:\n\n### Method #1 - Factory\n\n#### Step 1: Create a factory that retrieves the SessionManger from the container\n\n```php\nclass ExampleFactory\n{\n    // code\n    \n    public function __invoke(ContainerInterface $container)\n    {\n        return new ExampleService(\n            $container-\u003eget(SessionManager::class)\n        )\n    }\n}\n```\n\nRegister the factory in any mode you register factories on your project.\n\n#### Step 2: Access through your Service\n\n```php\n\nclass ExampleService\n{\n    private SessionManager $session;\n    \n    public function __construct(SessionManager $session) \n    {\n        $this-\u003esession = $session;\n    }\n    \n     //your methods\n}\n```\n\n### Method #2 - Injection\n\nIf you use annotated injection you can inject the Session Manager in your services.\n\n```php\nuse Dot\\AnnotatedServices\\Annotation\\Inject;\nuse Laminas\\Session\\SessionManager;\n\nclass ExampleService\n{\n    private SessionManager $session;\n    \n     /**\n     * @Inject({SessionManager::class})\n     */\n    public function __construct(SessionManager $session) \n    {\n        $this-\u003esession = $session;\n    }\n    \n     //your methods\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotkernel%2Fdot-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotkernel%2Fdot-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotkernel%2Fdot-session/lists"}