Doctrine Manager
This is a Doctrine Manager primary for Symfony applications, but can be used in all applications using Doctrine.
Install
Via Composer
$ composer require loevgaard/doctrine-manager
Usage
Say you have an Entity named YourEntity
then you will create a manager as easy as:
<?php
namespace Loevgaard\DoctrineManager;
class YourManager extends Manager
{
}
if you want code completion or need to do some other stuff you can override the CRUD methods like so:
<?php
namespace Loevgaard\DoctrineManager;
class YourManager extends Manager
{
/**
* @return YourEntity
*/
public function create()
{
return parent::create();
}
/**
* @param YourEntity $obj
*/
public function delete($obj)
{
parent::delete($obj);
}
/**
* @param YourEntity $obj
* @param bool $flush
*/
public function update($obj, $flush = true)
{
parent::update($obj, $flush);
}
}
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.