/hwi-oauth-bridge

Missing bridge between the HWIOAuthBundle and your Symfony 2 project.

Primary LanguagePHPMIT LicenseMIT

HWI OAuth Bridge

Latest Version on Packagist Software License Build Status Coverage Status Quality Score

Missing bridge between the HWIOAuthBundle and your Symfony 2 project.

Install

Via Composer

$ composer require emanueleminotto/hwi-oauth-bridge

Usage

To use one or more of included traits add them to your entities:

namespace AppBundle;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table
 */
class Example
{
    use \EmanueleMinotto\HwiOauthBridge\Traits\Entity\FacebookTrait;

    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     */
    private $id;

    // ...
}

And all related methods will be available throught the trait, so:

$example = new AppBundle\Example();

$example->setFacebookEmail('user@example.com');

$em->persist($example);
$em->flush();

echo $example->getFacebookEmail(); // user@example.com

Doctrine 2 ORM are available under the folder Entity and Doctrine ODM under the Document folder.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email minottoemanuele@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.