golem/auth-storage-zend

为 Golem Auth 设计的 Zend 会话存储适配器

2.0.0 2017-05-08 22:14 UTC

This package is auto-updated.

Last update: 2024-09-12 14:03:46 UTC


README

Latest Stable Version Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight

Zend 框架 - 为 Golem Auth 设计的 Zend 会话存储适配器

安装

通过 Composer

$ composer require golem/auth-storage-zend

用法

请遵循Golem Auth上的文档来创建用户模型和用户仓库类。

$session = new \Zend\Session\Container();
$storage = new \Golem\Auth\Storage\ZendSessionStorage($session);
// get an instance of your user repository however you need to
$userRepository = new UserRepository($database_connection);
$auth = new \Golem\Auth($storage, $userRepository);

测试

$ composer test

许可证

MIT 许可证(MIT)。请参阅许可证文件以获取更多信息。