gollumsf / manager
Simple manager abstract class service for entity
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/gollumsf/manager
Requires
- php: >=7.0
- symfony/framework-bundle: 4.*
This package is auto-updated.
Last update: 2025-09-29 02:21:05 UTC
README
Simple manager abstract class service for entity
Installation:
composer require gollumsf/manager
Usage:
Register service by autowire.
namespace App\Manager; use GolumSF\Manager\Manager; class UserManager extends Manager { }
namespace App\Controler; use App\Manager\UserManager; class MyControler { myAction(UserManager $userManager) { return Response($userManager->getEntityClass()); } }
Display:
App\Entity\User
Methods:
* public getEntityClass(): string // Return class name fo entity * protected getEntityManager(): string // Return entity manager * public getRepository(): ?ObjectRepository // Return repository of entity * public delete($entity): Entity // Delete the doctrine entity * public update($entity): Entity // Persist and flush the entity * public find($id): Entity|null // Return the entity of id (wrapper of repository->find) * public findOneBy(array $criteria): Entity|null // Return the entity of criteria (wrapper of repository->findOneBy) * public findBy( // Return the entities of criteria (wrapper of repository->findBy) array $criteria, array $orderBy = null, $limit = null, $offset = null ): Entity[]