loevgaard / doctrine-manager
A manager class for Doctrine
v1.0.0
2017-09-27 09:36 UTC
Requires
- php: ~7.1
- doctrine/common: ^2.6
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0
- phpunit/phpunit: ~5.5||~6.0
This package is auto-updated.
Last update: 2024-11-06 09:59:28 UTC
README
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 joachim@loevgaard.dk instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.