public function __construct($array) { parent::__construct($array); $this->persist_stack = new BaseCollection(); $this->persist_stack['save'] = new BaseCollection(); $this->persist_stack['delete'] = new BaseCollection(); }
public function offsetUnset($index) { if (!$this->exists($index)) { return; } $value = $this->items[$index]; $this->checkInstanceValueClass($value); $model = $this->getModel(); $resolver = $model->getSchema()->getResolver(); $value->{$resolver->end->field_to_start->getName()} = null; $this->addPersistStack('save', $value); parent::offsetUnset($index); }