Jackalope\ObjectManager::executeBatch PHP Method

executeBatch() protected method

Execute a batch of operations of one type.
protected executeBatch ( integer $type, Jackalope\Transport\Operation[] $operations )
$type integer type of the operations to be executed
$operations Jackalope\Transport\Operation[] list of same type operations
    protected function executeBatch($type, $operations)
    {
        switch ($type) {
            case Operation::ADD_NODE:
                $this->transport->storeNodes($operations);
                break;
            case Operation::MOVE_NODE:
                $this->transport->moveNodes($operations);
                break;
            case Operation::REMOVE_NODE:
                $this->transport->deleteNodes($operations);
                break;
            case Operation::REMOVE_PROPERTY:
                $this->transport->deleteProperties($operations);
                break;
            default:
                throw new \Exception('internal error: unknown operation "' . $type . '"');
        }
    }