PHP Класс Jackalope\NodeType\NodeProcessor

- Validates properties - Auto-generates property values - Generates extra node addition operations that follow from the node definition. Adapted from the jackalope-doctrine-dbal implementation: https://github.com/jackalope/jackalope-doctrine-dbal/blob/31cca1d1fb7fbe56423fa34478e15ce6d93313fd/src/Jackalope/Transport/DoctrineDBAL/Client.php
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string $userId, array $namespaces = [], boolean $autoLastModified = true )
process ( PHPCR\NodeInterface $node ) : Jackalope\Transport\AddNodeOperation[] Process the given node and return eventual extra operations determined from the node.

Приватные методы

Метод Описание
assertValidProperty ( PHPCR\PropertyInterface $property ) Validation if all the data is correct before writing it into the database.
processNodeWithType ( PHPCR\NodeInterface $node, NodeType $nodeTypeDefinition ) : Jackalope\Transport\AddNodeOperation[] Validate this node with the nodetype and generate not yet existing autogenerated properties as necessary.
validateNamespace ( string $name ) Ensure that, if a namespace with an alias is passed, that the alias is registered.

Описание методов

__construct() публичный Метод

public __construct ( string $userId, array $namespaces = [], boolean $autoLastModified = true )
$userId string ID of the connected user
$namespaces array List of namespaces in the current session. Keys are prefix, values are URI.
$autoLastModified boolean Whether the last modified property should be updated automatically

process() публичный Метод

Process the given node and return eventual extra operations determined from the node.
public process ( PHPCR\NodeInterface $node ) : Jackalope\Transport\AddNodeOperation[]
$node PHPCR\NodeInterface
Результат Jackalope\Transport\AddNodeOperation[] Additional operations that the client must execute for autocreated nodes.