PHP Class 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
Mostrar archivo
Open project: jackalope/jackalope
Class Usage Examples
Public Methods
Method |
Description |
|
__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. |
|
Private Methods
Method |
Description |
|
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. |
|
Method Details
__construct()
public method
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 the given node and return eventual extra operations determined from the node.
public process ( PHPCR\NodeInterface $node ) : Jackalope\Transport\AddNodeOperation[] |
$node |
PHPCR\NodeInterface |
|
return |
Jackalope\Transport\AddNodeOperation[] |
Additional operations that the client must execute for autocreated nodes. |