-
Notifications
You must be signed in to change notification settings - Fork 0
Processing data
This guide is about fetching data from your database and sending data to your database using Symfony.
"The EntityManager is your friend. He can fetch data, send data, a really good guy overall." - Bryan Kho
This is the EntityManager, it can fetch data and send data from and to your database. You can access the Entity Manager from your controller.
$entityManager = $this->getDoctrine()->getManager();You can also access the EntityManager via the EntityManagerInterface object, which you can add as an argument to your method inside your controller.
// don't forget the import
use Doctrine\ORM\EntityManagerInterface;
yourMethod(EntityManagerInterface $entityManager) {
}You can use the getRepository() method of the EntityManager to find an object.
$product = $entityManager->getRepository(Product::class)->find($id);besides the find() method on the Repository, you can also use findBy(), findAll() and findOneBy().
Kerntaak 2 & 3
Symfony
= About code maintained by Symfony and not a third party
-
Home
-
Project Setup
-
Users
-
Unit testing
-
PDF
-
File upload
-
Text editing
-
Miscellaneous
-
Laravel
Work in progress.
ASP.NET MVC
= About code maintained or officially supported by Microsoft
-
Project Setup
-
ASP.NET Core MVC setup
- Model
- Controller
- View
-
- Unit Testing
- Inversion of control
ASP.NET Razor Pages
= About code maintained or officially supported by Microsoft
-
Project Setup
- TBA