Jackalope\ObjectManager::notifyItems PHP Method

notifyItems() protected method

Notifies the given node and all of its children and properties that a transaction has begun, was committed or rolled back so that the item has a chance to save or restore his internal state.
protected notifyItems ( string $method )
$method string The method to call on each item for the notification (must be beginTransaction, commitTransaction or rollbackTransaction)
    protected function notifyItems($method)
    {
        if (!in_array($method, array('beginTransaction', 'commitTransaction', 'rollbackTransaction'))) {
            throw new InvalidArgumentException("Unknown notification method '{$method}'");
        }
        // Notify the loaded nodes
        foreach ($this->objectsByPath['Node'] as $node) {
            $node->{$method}();
        }
        // Notify the deleted nodes
        foreach ($this->nodesRemove as $op) {
            $op->node->{$method}();
        }
        // Notify the deleted properties
        foreach ($this->propertiesRemove as $op) {
            $op->property->{$method}();
        }
    }