function __construct(\DBAL\Data\Entity $entity, array $array = array(), $type = null) { $this->setEntity($entity); if (is_null($type)) { $type = 'DBAL\\Data\\Entity\\Relationship'; } parent::__construct($array, $type); }
function offsetSet($offset, $attr) { if (is_int($offset)) { $offset =& $attr->getName(); } $attr->setModel($this->model); if (!is_null($attr->getLoadName())) { $this->model->setLoaderAttribute($attr); } parent::offsetSet($offset, $attr); }
function remove($index) { $subject = $this[$index]; $subject->setParent(null); parent::remove($index); }