This gist is about using a Multi-Tenancy strategy for your Doctrine entities.
See: https://gist.github.com/CarlosEduardo/aedfa640e3f7f22451686fb7e57228e3
| <?php | |
| // "NativeQuery" like http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/native-sql.html | |
| $nativeQuery = 'SELECT user.id AS id, user.name AS name, address.id AS address_id, address.street AS street, address.city AS city ' . | |
| 'FROM user INNER JOIN address ON address.id = user.address_id ' . | |
| 'WHERE user.name = :name'; | |
| $atlas | |
| ->nativeQuery($nativeQuery) |
| <?php | |
| namespace Application; | |
| use Doctrine\ORM\Mapping as ORM; | |
| /** | |
| * @ORM\Entity | |
| * @ORM\Table(name="documents") | |
| * @ORM\HasLifecycleCallbacks |
This gist is about using a Multi-Tenancy strategy for your Doctrine entities.
See: https://gist.github.com/CarlosEduardo/aedfa640e3f7f22451686fb7e57228e3
| <?php | |
| namespace Application; | |
| class Module | |
| { | |
| public function onBootstrap(MvcEvent $e) | |
| { | |
| $translator = new Zend\Mvc\I18n\Translator(new Zend\I18n\Translator\Translator()); |