X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpq%2FMapper%2FMap.php;h=bf577be38ca1fbce825fa9eab272a1f68829fde8;hb=a9b40ffbef4f2280ad0233dbde1d99d057bcc1fa;hp=58e1e5d5aa07c2f18208c59f066167e13dcb447f;hpb=d48c6b596a9e62cf275580e1857a90848602fe66;p=m6w6%2Fpq-gateway diff --git a/lib/pq/Mapper/Map.php b/lib/pq/Mapper/Map.php index 58e1e5d..bf577be 100644 --- a/lib/pq/Mapper/Map.php +++ b/lib/pq/Mapper/Map.php @@ -28,7 +28,7 @@ class Map implements MapInterface /** * @var PropertyInterface[] */ - private $properties; + private $properties = []; /** * Create a new object map definition @@ -39,9 +39,8 @@ class Map implements MapInterface function __construct($class, Table $gateway, PropertyInterface ...$properties) { $this->class = $class; $this->gateway = $gateway; - $this->properties = $properties; foreach ($properties as $property) { - $property->setContainer($this); + $this->addProperty($property); } $this->objects = new ObjectManager($this); }