indigophp / guardian-doctrine
This package is abandoned and no longer maintained.
The author suggests using the guardianphp/doctrine-integration package instead.
Doctrine integration for Guardian
dev-master / 0.1.x-dev
2015-03-30 00:27 UTC
Requires
- php: >=5.4
- doctrine/orm: ~2.4
- indigophp/guardian: 0.1.*@dev
Requires (Dev)
- henrikbjorn/phpspec-code-coverage: ~1.0
- phpspec/phpspec: ~2.1
This package is not auto-updated.
Last update: 2022-02-01 12:46:01 UTC
README
Doctrine integration for Guardian.
Install
Via Composer
$ composer require indigophp/guardian-doctrine
Usage
Simply pass an EntityManagerInterface
instance and an Entity class name to the Indigo\Guardian\Identifier\Doctrine
class and you are good to go:
use Indigo\Guardian\Identifier\Doctrine; $identifier = new Doctrine($entityManager, 'Indigo\Guardian\Caller\User\Simple'); // optional, ['username'] by default $identifier->setIdentificationFields(['username']); // optional, 'loginToken' by default $identifier->setLoginTokenField('id');
Testing
$ phpspec run
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.