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

This package is not auto-updated.

Last update: 2022-02-01 12:46:01 UTC


README

Latest Version Software License Build Status Code Coverage Quality Score HHVM Status Total Downloads

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.