PHP 인터페이스 Jackalope\Transport\WritingInterface

Notes: Registering and removing namespaces is also part of this chapter. The announced IDENTIFIER_STABILITY must be guaranteed by the transport. The interface does not differ though.
상속: extends Jackalope\Transport\TransportInterface
파일 보기 프로젝트 열기: jackalope/jackalope 0 사용 예제들

공개 메소드들

메소드 설명
assertValidName ( string $name ) : boolean Whether this node name conforms to the specification
cloneFrom ( string $srcWorkspace, string $srcAbsPath, string $destAbsPath, boolean $removeExisting ) Clones the subgraph at the node srcAbsPath in srcWorkspace to the new location at destAbsPath in this workspace.
copyNode ( string $srcAbsPath, string $destAbsPath, string $srcWorkspace = null ) Copies a Node from src (potentially from another workspace) to dst in the current workspace.
deleteNodeImmediately ( string $path ) Deletes a node and the whole subtree under it outside of a transaction
deleteNodes ( array $operations ) Perform a batch remove operation.
deleteProperties ( array $operations ) Perform a batch remove operation.
deletePropertyImmediately ( string $path ) Deletes a property outside of a transaction
finishSave ( ) Called after everything internally is done in the save() method so the transport has a chance to do final stuff (or commit everything at once).
moveNodeImmediately ( string $srcAbsPath, string $dstAbsPath ) Moves a node from src to dst outside of a transaction
moveNodes ( array $operations ) Perform a batch of move operations in the order of the passed array
prepareSave ( ) Called before any data is written.
registerNamespace ( string $prefix, string $uri ) Register a new namespace.
reorderChildren ( Node $node ) Reorder the children of $node as the node said it needs them reordered.
rollbackSave ( ) Called if a save operation caused an exception.
storeNodes ( array $operations ) Store all nodes in the AddNodeOperations
unregisterNamespace ( string $prefix ) Unregister an existing namespace.
updateNode ( Node $node, string $srcWorkspace ) Update a node and its children to match its corresponding node in the specified workspace
updateProperties ( Node $node ) Update the properties of a node

메소드 상세

assertValidName() 공개 메소드

Note: There is a minimal implementation in BaseTransport
또한 보기: http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.2.2%20Local%20Names
public assertValidName ( string $name ) : boolean
$name string The name to check
리턴 boolean always true, if the name is not valid a RepositoryException is thrown

cloneFrom() 공개 메소드

There may be no node at dstAbsPath This method does not need to load the node but can execute the clone directly in the storage.
또한 보기: WorkspaceInterface::cloneFrom
public cloneFrom ( string $srcWorkspace, string $srcAbsPath, string $destAbsPath, boolean $removeExisting )
$srcWorkspace string The workspace where the source node can be found
$srcAbsPath string Absolute source path to the node
$destAbsPath string Absolute destination path including the new node name
$removeExisting boolean whether to remove a node with the same identifier if there exists one

copyNode() 공개 메소드

This method does not need to load the node but can execute the copy directly in the storage. If there already is a node at $destAbsPath, the transport may merge nodes as described in the WorkspaceInterface::copy documentation.
또한 보기: WorkspaceInterface::copy
public copyNode ( string $srcAbsPath, string $destAbsPath, string $srcWorkspace = null )
$srcAbsPath string Absolute source path to the node
$destAbsPath string Absolute destination path including the new node name
$srcWorkspace string The workspace where the source node can be found or null for current workspace

deleteNodeImmediately() 공개 메소드

Deletes a node and the whole subtree under it outside of a transaction
또한 보기: Workspace::removeItem
public deleteNodeImmediately ( string $path )
$path string Absolute path to the node

deleteNodes() 공개 메소드

Take care that cyclic REFERENCE properties of to be deleted nodes do not lead to errors.
public deleteNodes ( array $operations )
$operations array

deleteProperties() 공개 메소드

Perform a batch remove operation.
public deleteProperties ( array $operations )
$operations array

deletePropertyImmediately() 공개 메소드

Deletes a property outside of a transaction
또한 보기: Workspace::removeItem
public deletePropertyImmediately ( string $path )
$path string Absolute path to the property

finishSave() 공개 메소드

Called after everything internally is done in the save() method so the transport has a chance to do final stuff (or commit everything at once).
public finishSave ( )

moveNodeImmediately() 공개 메소드

Moves a node from src to dst outside of a transaction
또한 보기: Workspace::moveNode
public moveNodeImmediately ( string $srcAbsPath, string $dstAbsPath )
$srcAbsPath string Absolute source path to the node
$dstAbsPath string Absolute destination path (must NOT include the new node name)

moveNodes() 공개 메소드

Perform a batch of move operations in the order of the passed array
public moveNodes ( array $operations )
$operations array

prepareSave() 공개 메소드

Called before any data is written.
public prepareSave ( )

registerNamespace() 공개 메소드

Validation based on what was returned from getNamespaces has already happened in the NamespaceRegistry. The transport is however responsible of removing an existing prefix for that uri, if one exists. As well as removing the current uri mapped to this prefix if this prefix is already existing.
public registerNamespace ( string $prefix, string $uri )
$prefix string The prefix to be mapped.
$uri string The URI to be mapped.

reorderChildren() 공개 메소드

You can either get the reordering list with getOrderCommands or use getNodeNames to get the absolute order.
public reorderChildren ( Node $node )
$node Jackalope\Node the node to reorder its children

rollbackSave() 공개 메소드

Called if a save operation caused an exception.
public rollbackSave ( )

storeNodes() 공개 메소드

Transport stores the node at its path, with all properties (but do not store children). The transport is responsible to ensure that the node is valid and has to generate autocreated properties. Note: Nodes in the log may be deleted if they are deleted. The delete request will be passed later, according to the log. You should still create it here as it might be used temporarily in move operations or such. Use Node::getPropertiesForStoreDeletedNode in that case to avoid a status check of the deleted node.
또한 보기: BaseTransport::validateNode
public storeNodes ( array $operations )
$operations array the operations containing the nodes to store

unregisterNamespace() 공개 메소드

Validation based on what was returned from getNamespaces has already happened in the NamespaceRegistry.
public unregisterNamespace ( string $prefix )
$prefix string The prefix to unregister.

updateNode() 공개 메소드

Update a node and its children to match its corresponding node in the specified workspace
public updateNode ( Node $node, string $srcWorkspace )
$node Jackalope\Node the node to update
$srcWorkspace string The workspace where the corresponding source node can be found

updateProperties() 공개 메소드

Update the properties of a node
public updateProperties ( Node $node )
$node Jackalope\Node the node to update