/**
* @var PropertyInterface[]
*/
- private $properties;
+ private $properties = [];
/**
* Create a new object map definition
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);
}