Database referential integrity with Doctrine
Jak zachować spójność bazy danych i jak Doctrine może nam w tym pomóc.
Jak zachować spójność bazy danych i jak Doctrine może nam w tym pomóc.
This tree was stored in the table with parentId field, nothing special, and the most obvious way to get the tree is to fetch root element first. The best for rendering is ORM, it allows to render tree recursive from parent to children. And here I could stop writing this article, because this will work. The...
In general, we use the Strategy Pattern when we can do something in several ways depending on some condition. Suppose we have to create some image resize class using GD library. We could create some code like this: class ImageResizer { public function resize(string $filename, string extension, int $newWidth, int $newHeight) ...