1- hacfi Doctrine Bridge Bundle
1+ hacfi Object Bridge Bundle
22===
33
44This bundle allows associations between different Doctrine ORMs and ODMs.
2020- [ ] Create a registry for Doctrine mappers to make it extendable (MongoDB ODM & CouchDB ODM)
2121- [ ] Validate the mappings and make sure the mapper specified via ``` type ``` is available
2222
23- Please note that the use-statement for the annotations has to be "use hacfi \Bundle\DoctrineBridgeBundle \Mapping\DoctrineBridge ;"
23+ Please note that the use-statement for the annotations has to be "use Hacfi \Bundle\ObjectBridgeBundle \Mapping\ObjectBridge ;"
2424and doesn’t allow aliasing because the Doctrine’s SimpleAnnotationReader doesn’t support it. This might change in the future.
2525
2626
@@ -30,28 +30,28 @@ Install
3030app/AppKernel.php:
3131
3232``` php
33- new hacfi \Bundle\DoctrineBridgeBundle\hacfiDoctrineBridgeBundle (),
33+ new Doctrine \Bundle\DoctrineObjectBridgeBundle\DoctrineObjectBridgeBundle (),
3434```
3535
3636app/autoload.php:
3737
3838``` php
39- AnnotationRegistry::registerFile(__DIR__.'/../vendor/hacfi/doctrine -bridge-bundle/hacfi /Bundle/DoctrineBridgeBundle /Mapping/DoctrineBridge /Reference.php');
39+ AnnotationRegistry::registerFile(__DIR__.'/../vendor/hacfi/object -bridge-bundle/Hacfi /Bundle/ObjectBridgeBundle /Mapping/ObjectBridge /Reference.php');
4040```
4141
4242Example
4343---
4444
45- /src/hacfi /AppBundle/Entity/Product.php:
45+ /src/Hacfi /AppBundle/Entity/Product.php:
4646
4747``` php
4848<?php
49- namespace hacfi \AppBundle\Entity;
49+ namespace Hacfi \AppBundle\Entity;
5050
51- use hacfi \AppBundle\Document\ProductProperties;
51+ use Hacfi \AppBundle\Document\ProductProperties;
5252
5353use Doctrine\ORM\Mapping as ORM;
54- use hacfi \Bundle\DoctrineBridgeBundle \Mapping\DoctrineBridge ;
54+ use Hacfi \Bundle\ObjectBridgeBundle \Mapping\ObjectBridge ;
5555
5656/**
5757 * Product
@@ -76,24 +76,24 @@ class Product implements ProductInterface
7676 /**
7777 * @ORM\Column(name="properties", type="string", length=255, nullable=false)
7878 *
79- * @DoctrineBridge \Reference(type="phpcr", name="hacfiAppBundle :ProductProperties", manager="default")
79+ * @ObjectBridge \Reference(type="phpcr", name="HacfiAppBundle :ProductProperties", manager="default")
8080 */
8181 private $properties;
8282
8383}
8484
8585```
8686
87- /src/hacfi /AppBundle/Document/ProductProperties.php:
87+ /src/Hacfi /AppBundle/Document/ProductProperties.php:
8888
8989``` php
9090<?php
91- namespace hacfi \AppBundle\Document;
91+ namespace Hacfi \AppBundle\Document;
9292
93- use hacfi \AppBundle\Entity\Product;
93+ use Hacfi \AppBundle\Entity\Product;
9494
9595use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;
96- use hacfi \Bundle\DoctrineBridgeBundle \Mapping\DoctrineBridge ;
96+ use Hacfi \Bundle\ObjectBridgeBundle \Mapping\ObjectBridge ;
9797
9898/**
9999 * ProductProperties
@@ -111,7 +111,7 @@ class ProductProperties
111111 /**
112112 * @PHPCRODM\String
113113 *
114- * @DoctrineBridge \Reference(type="orm", name="hacfiAppBundle :Product", manager="default")
114+ * @ObjectBridge \Reference(type="orm", name="HacfiAppBundle :Product", manager="default")
115115 */
116116 protected $product;
117117
0 commit comments