Property | Type | Description | |
---|---|---|---|
$checkLoginOnServer | boolean | Check if an initial PROPFIND should be send to check if repository exists This is according to the JCR specifications and set to true by default | |
$credentials | PHPCR\SimpleCredentials | Set once login() has been executed and may not be changed later on. | |
$curl | Jackalope\Transport\Jackrabbit\curl | The cURL resource handle | |
$defaultHeaders | array[]string | A list of additional HTTP headers to be sent on each request | |
$descriptors | This is our exception to the rule that nothing may be cached in transport. | ||
$factory | Jackalope\FactoryInterface | The factory to instantiate objects | |
$jsopBody | |||
$nodeTypeManager | |||
$sendExpect | Send Expect: 100-continue header | ||
$server | string | i.e http://localhost:8080/server/ constructor ensures the trailing slash / | |
$typeXmlConverter | |||
$userData | |||
$valueConverter | PHPCR\Util\ValueConverter | ||
$workspace | string | Set once login() has been executed and may not be changed later on. | |
$workspaceUri | string | "$server/$workspace" without trailing slash | |
$workspaceUriRoot | string | "$server/$workspace/jcr%3aroot (make sure you never hardcode the jcr%3aroot, its ugly) |
Method | Description | |
---|---|---|
__construct ( Jackalope\FactoryInterface $factory, string $serverUri ) | Create a transport pointing to a server url. | |
__destruct ( ) | Tidies up the current cUrl connection. | |
addCurlOptions ( array $options ) : array | Add global curl-options. | |
addDefaultHeader ( string $header ) | Add a HTTP header which is sent on each Request. | |
addVersionLabel ( $versionPath, $label, $moveLabel ) | ||
checkinItem ( $path ) | {@inheritDoc} | |
checkoutItem ( $path ) | {@inheritDoc} | |
cloneFrom ( $srcWorkspace, $srcAbsPath, $destAbsPath, $removeExisting ) | {@inheritDoc} | |
copyNode ( $srcAbsPath, $dstAbsPath, $srcWorkspace = null ) | {@inheritDoc} | |
createWorkspace ( $name, $srcWorkspace = null ) | {@inheritDoc} | |
deleteNodeImmediately ( $path ) | {@inheritDoc} | |
deleteNodes ( array $operations ) | {@inheritDoc} | |
deleteProperties ( array $operations ) | {@inheritDoc} | |
deletePropertyImmediately ( $path ) | {@inheritDoc} | |
deleteWorkspace ( $name ) | ||
fetchEventData ( $date ) : array | Internal method to fetch event data. | |
finishSave ( ) | {@inheritDoc} | |
forceHttpVersion10 ( $forceHttpVersion10 = true ) | Set to true to force HTTP version 1.0 | |
getAccessibleWorkspaceNames ( ) | {@inheritDoc} | |
getBinaryStream ( $path ) | {@inheritDoc} | |
getEvents ( $date, PHPCR\Observation\EventFilterInterface $filter, PHPCR\SessionInterface $session ) | {@inheritDoc} | |
getNamespaces ( ) | {@inheritDoc} | |
getNode ( $path ) | {@inheritDoc} | |
getNodeByIdentifier ( $uuid ) | {@inheritDoc} | |
getNodePathForIdentifier ( $uuid, $workspace = null ) | {@inheritDoc} | |
getNodeTypes ( $nodeTypes = [] ) | {@inheritDoc} | |
getNodes ( $paths, $query = ':include' ) | {@inheritDoc} | |
getNodesByIdentifier ( $identifiers ) | {@inheritDoc} | |
getPermissions ( $path ) | {@inheritDoc} | |
getProperty ( $path ) | {@inheritDoc} | |
getReferences ( $path, $name = null ) | {@inheritDoc} | |
getRepositoryDescriptors ( ) | {@inheritDoc} | |
getSupportedQueryLanguages ( ) | {@inheritDoc} | |
getUserData ( ) : mixed | ||
getWeakReferences ( $path, $name = null ) | {@inheritDoc} | |
getWorkspaceUri ( ) : null | string | Return the URL to the workspace determined during login | |
isLocked ( $absPath ) | {@inheritDoc} | |
lockNode ( $absPath, $isDeep, $isSessionScoped, $timeoutHint = PHP_INT_MAX, $ownerInfo = null ) | {@inheritDoc} | |
login ( PHPCR\CredentialsInterface $credentials = null, $workspaceName = null ) | {@inheritDoc} | |
logout ( ) | {@inheritDoc} | |
moveNodeImmediately ( $srcAbsPath, $dstAbsPath ) | {@inheritDoc} | |
moveNodes ( array $operations ) | {@inheritDoc} | |
prepareSave ( ) | {@inheritDoc} | |
query ( |
{@inheritDoc} | |
registerNamespace ( $prefix, $uri ) | {@inheritDoc} | |
registerNodeTypesCnd ( $cnd, $allowUpdate ) | {@inheritDoc} | |
removeVersion ( $versionPath, $versionName ) | {@inheritDoc} | |
removeVersionLabel ( $versionPath, $label ) | ||
reorderChildren ( |
{@inheritDoc} | |
restoreItem ( $removeExisting, $versionPath, $path ) | {@inheritDoc} | |
rollbackSave ( ) | {@inheritDoc} | |
sendExpect ( boolean $send = true ) | If you want to send the "Expect: 100-continue" header on larger PUT and POST requests, set this to true. | |
setCheckLoginOnServer ( $bool ) | Configure whether to check if we are logged in before doing a request. | |
setNodeTypeManager ( $nodeTypeManager ) | {@inheritDoc} | |
setUserData ( $userData ) | {@inheritDoc} | |
storeNodes ( array $operations ) | {@inheritDoc} | |
unlock ( $absPath, $lockToken ) | {@inheritDoc} | |
unregisterNamespace ( $prefix ) | {@inheritDoc} | |
updateNode ( |
{@inheritDoc} | |
updateProperties ( |
{@inheritDoc} |
Method | Description | |
---|---|---|
addWorkspacePathToUri ( string $uri ) : string | Prepends the workspace root to the uris that contain an absolute path | |
buildLocateRequest ( string $uuid ) : string | Build REPORT XML request for locating a node path by uuid | |
buildNodeTypesRequest ( array $nodeTypes ) : string | Returns the XML required to request nodetypes | |
buildPropfindRequest ( array $properties ) : string | Build PROPFIND request XML for the specified property names | |
buildRegisterNamespaceRequest ( array $mappings ) | Build the xml to update the namespaces | |
buildRegisterNodeTypeRequest ( string $cnd, $allowUpdate ) : string | Build the xml required to register node types | |
buildReportRequest ( string $name ) : string | Build a REPORT XML request string | |
checkForExistingNode ( $srcWorkspace, $srcAbsPath, $destAbsPath ) | Prevent accidental creation of same name siblings during clone operation. | |
createNodeJsop ( string $path, array $properties ) : string | create the node markup and a list of value dispatches for multivalue properties | |
deleteItem ( string $path ) | Record that we need to delete the item at $path | |
encodeAndValidatePathForDavex ( string $path ) : string | Checks if the path is absolute and valid, and properly urlencodes special characters | |
generateLockFromDavResponse ( DOMElement $response, boolean $sessionOwning = false, string $path = null ) : |
Extract the information from a LOCK DAV response and create the corresponding Lock object. | |
getCurl ( ) | ||
getMimePart ( $name, $value, $mime_boundary ) | ||
getNodeReferences ( string $path, string $name = null, boolean $weak_reference = false ) : array | ||
getRequest ( $method, $uri, $addWorkspacePathToUri = true ) : |
Makes sure there is an open curl connection. | |
getRequiredDomElementByTagNameNS ( DOMNode $dom, string $namespace, string $element, string $errorMessage = '' ) : boolean | DOMNode | Retrieve a child DOM element from a DOM element. | |
isStringValid ( $string ) : boolean | Checks for occurrence of invalid UTF characters, that can not occur in valid XML document. | |
parseTimeout ( string $timeoutValue ) : integer | Parse the timeout value from a WebDAV response and calculate the expire timestamp. | |
propertyToJsopString ( |
This method is used when building a JSOP of the properties | |
setJsopBody ( $value, $key = ":diff", $type = null ) | ||
stripServerRootFromUri ( string $uri ) : string | remove the server and workspace part from an uri, leaving the absolute path inside the current workspace | |
updateLastModified ( |
Update the lastModified fields if they where not set manually. |
Method | Description | |
---|---|---|
copyNodeOtherWorkspace ( string $srcAbsPath, $dstAbsPath, string $srcWorkspace ) | For copy from a different workspace, needs to be a JSOP. | |
copyNodeSameWorkspace ( string $srcAbsPath, $dstAbsPath ) | For copy within the same workspace, this is a COPY request. | |
decodeBinaryDom ( string $xml ) : array | parse the multivalue binary response (a list of base64 encoded values) | |
getDcrValue ( DOMElement $node ) : mixed | Get the value of a dcr:value node in the right format specified by the dcr type. | |
removeTrailingSlash ( string $path ) : string | Remove the trailing slash if present. Used for backend responses when jackrabbit is sloppy | |
storeProperty ( |
public __construct ( Jackalope\FactoryInterface $factory, string $serverUri ) | ||
$factory | Jackalope\FactoryInterface | the object factory |
$serverUri | string | location of the server |
public addCurlOptions ( array $options ) : array | ||
$options | array | |
return | array | all curl-options |
public addDefaultHeader ( string $header ) | ||
$header | string | a valid HTTP header to add to each request |
protected addWorkspacePathToUri ( string $uri ) : string | ||
$uri | string | The absolute path in the current workspace or server uri |
return | string | The server uri with this path |
protected buildLocateRequest ( string $uuid ) : string | ||
$uuid | string | Unique identifier of the node to be asked for. |
return | string | XML sring representing the content of the request. |
protected buildNodeTypesRequest ( array $nodeTypes ) : string | ||
$nodeTypes | array | |
return | string | XML with the request information. |
protected buildPropfindRequest ( array $properties ) : string | ||
$properties | array | names of the properties to search for |
return | string | XML to post in the body |
protected buildRegisterNamespaceRequest ( array $mappings ) | ||
$mappings | array | hashmap of prefix => uri for all existing and new namespaces |
protected buildRegisterNodeTypeRequest ( string $cnd, $allowUpdate ) : string | ||
$cnd | string | the node type definition |
return | string | XML with register request |
protected buildReportRequest ( string $name ) : string | ||
$name | string | Name of the resource to be requested. |
return | string | XML string representing the head of the request. |
protected checkForExistingNode ( $srcWorkspace, $srcAbsPath, $destAbsPath ) | ||
$srcWorkspace | ||
$srcAbsPath | ||
$destAbsPath |
public cloneFrom ( $srcWorkspace, $srcAbsPath, $destAbsPath, $removeExisting ) |
public copyNode ( $srcAbsPath, $dstAbsPath, $srcWorkspace = null ) |
public createWorkspace ( $name, $srcWorkspace = null ) |
protected deleteItem ( string $path ) | ||
$path | string | path to node or property |
public deleteNodes ( array $operations ) | ||
$operations | array |
public deleteProperties ( array $operations ) | ||
$operations | array |
protected encodeAndValidatePathForDavex ( string $path ) : string | ||
$path | string | to check |
return | string | the cleaned path |
public fetchEventData ( $date ) : array | ||
$date | ||
return | array | hashmap with 'data' containing unfiltered DOM of xml atom feed of events, 'nextMillis' is the next timestamp if there are more events to be found, false otherwise. |
public forceHttpVersion10 ( $forceHttpVersion10 = true ) |
protected generateLockFromDavResponse ( DOMElement $response, boolean $sessionOwning = false, string $path = null ) : |
||
$response | DOMElement | |
$sessionOwning | boolean | whether the current session is owning the lock (aka we created it in this request) |
$path | string | the owning node path, if we created this node |
return |
public getEvents ( $date, PHPCR\Observation\EventFilterInterface $filter, PHPCR\SessionInterface $session ) | ||
$filter | PHPCR\Observation\EventFilterInterface | |
$session | PHPCR\SessionInterface |
public getNodePathForIdentifier ( $uuid, $workspace = null ) |
protected getNodeReferences ( string $path, string $name = null, boolean $weak_reference = false ) : array | ||
$path | string | the path for which we need the references |
$name | string | the name of the referencing properties or null for all |
$weak_reference | boolean | whether to get weak or strong references |
return | array | list of paths to nodes that reference $path |
protected getRequest ( $method, $uri, $addWorkspacePathToUri = true ) : |
||
return | The Request |
protected getRequiredDomElementByTagNameNS ( DOMNode $dom, string $namespace, string $element, string $errorMessage = '' ) : boolean | DOMNode | ||
$dom | DOMNode | The DOM element which content should be searched |
$namespace | string | The namespace of the searched element |
$element | string | The name of the searched element |
$errorMessage | string | The error message in case the element is not found |
return | boolean | DOMNode |
public getWorkspaceUri ( ) : null | string | ||
return | null | string |
protected isStringValid ( $string ) : boolean | ||
$string | string value | |
return | boolean | true if string is OK, false otherwise. |
public lockNode ( $absPath, $isDeep, $isSessionScoped, $timeoutHint = PHP_INT_MAX, $ownerInfo = null ) |
public login ( PHPCR\CredentialsInterface $credentials = null, $workspaceName = null ) | ||
$credentials | PHPCR\CredentialsInterface |
public moveNodeImmediately ( $srcAbsPath, $dstAbsPath ) |
protected parseTimeout ( string $timeoutValue ) : integer | ||
$timeoutValue | string | The timeout in seconds or PHP_INT_MAX for infinite |
return | integer | the expire timestamp to be used with Lock::setExpireTime, that is when this lock expires in seconds since 1970 or null for inifinite |
protected propertyToJsopString ( |
||
$property | ||
return | mixed | string |
public registerNodeTypesCnd ( $cnd, $allowUpdate ) |
public reorderChildren ( |
||
$node |
public restoreItem ( $removeExisting, $versionPath, $path ) |
public sendExpect ( boolean $send = true ) | ||
$send | boolean | Whether to send the header or not |
public setCheckLoginOnServer ( $bool ) |
protected stripServerRootFromUri ( string $uri ) : string | ||
$uri | string | a full uri including the server path, workspace and jcr%3aroot |
return | string | absolute path in the current work space |
protected updateLastModified ( |
||
$node |
public updateNode ( |
||
$node |
public updateProperties ( |
||
$node |
protected bool $checkLoginOnServer | ||
return | boolean |
protected SimpleCredentials,PHPCR $credentials | ||
return | PHPCR\SimpleCredentials |
protected curl,Jackalope\Transport\Jackrabbit $curl | ||
return | Jackalope\Transport\Jackrabbit\curl |
protected array[]string $defaultHeaders | ||
return | array[]string |
protected $descriptors |
protected FactoryInterface,Jackalope $factory | ||
return | Jackalope\FactoryInterface |
protected NodeTypeManager,Jackalope\NodeType $nodeTypeManager | ||
return |
protected string $server | ||
return | string |
protected NodeTypeXmlConverter,Jackalope\NodeType $typeXmlConverter | ||
return |
protected ValueConverter,PHPCR\Util $valueConverter | ||
return | PHPCR\Util\ValueConverter |
protected string $workspace | ||
return | string |
protected string $workspaceUri | ||
return | string |
protected string $workspaceUriRoot | ||
return | string |