/** * Execute all data in queue. */ protected function executeQueue() { foreach ($this->queueActions as $key => $action) { if (self::QUEUE_ACTION_PERSIST === $action) { $this->doPersist($this->queueManagerNames[$key], $this->queueModels[$key], $this->queueIds[$key]); } else { $this->manager->getPool()->getManager($this->queueManagerNames[$key])->remove($this->queueModels[$key]); } } $this->cleanQueue(); }