Martin Sikora has shared some of his experience with setting up a Silex instance to work with Doctrine2 in a new post to his blog. The popular microframework comes with a built-in Doctrine service provider, so integration isn't overly difficult.
Silex is great for its simplicity, however for larger projects you probably want to use some ORM like Doctrine but there's build-in service provider only for Doctrine DBAL and not ORM.
He breaks it up into five smaller steps, each with code samples to help clarify:
- Doctrine 2 ORM Service Provider
- Create your entity classes
- Mind Doctrine DBAL and Doctrine ORM versions
- Doctrine CLI
- Working with Doctrine ORM
没有评论:
发表评论