Doctrine mapping examples using PHPDriver

I am learning Doctrine 2 for PHP, and I'm having trouble finding good resources to map using PHPDriver. There is extensive documentation on the use of annotations in comments for Doctrine mappings, however, I would prefer my PHP and NOT mapping definitions in comments (for obvious reasons).

I could use some examples mainly with association mapping. Documentation using annotations doesn't really help me much. Using those that I think leaves guesses through the trial version and an error on how to do this using PHPDriver.

Does anyone know of a good link out of hand? Any help would be greatly appreciated.

+3
source share
2 answers

If you haven’t already seen this, the Doctrine manual now has a section on PHPDriver:

The manual is updated quite often, so keep checking for new topics. You can also directly refer to the API documentation:

The general terminology and conventions used by all matching drivers are the same, so the main ideas should be translated. This is probably the syntax that will touch you.

I also recommend that you study the XML driver. With a good IDE, you can get confirmation and auto-completion through the xsd file, which will simplify the work. Manually writing PHP mappings personally amazes me as a bit time consuming.

0
source

PHP- , PHP, , , vs annotations/xml/yaml.

unittests (/Doctrine/Tests/ORM/Mapping).

0

Source: https://habr.com/ru/post/1764575/


All Articles