Jackalope\ObjectManager::executeOperations PHP Method

executeOperations() protected method

Execute the recorded operations in the right order, skipping stale data.
protected executeOperations ( array $operations )
$operations array
    protected function executeOperations(array $operations)
    {
        $lastType = null;
        $batch = array();
        foreach ($operations as $operation) {
            if ($operation->skip) {
                continue;
            }
            if (null === $lastType) {
                $lastType = $operation->type;
            }
            if ($operation->type !== $lastType) {
                $this->executeBatch($lastType, $batch);
                $lastType = $operation->type;
                $batch = array();
            }
            $batch[] = $operation;
        }
        // only execute last batch if not all was skipped
        if (!count($batch)) {
            return;
        }
        $this->executeBatch($lastType, $batch);
    }