Properties

$_url

$_url : string

Type

string — URL of the node in the form ajxp.protocol://repository_id/path/to/node

$_metadata

$_metadata : array

Type

array — The node metadata

$_wrapperClassName

$_wrapperClassName : string

Type

string — Associated wrapper

$urlParts

$urlParts : array

Type

array — Parsed url fragments

$realFilePointer

$realFilePointer : string

Type

string — A local representation of a real file, if possible

$nodeInfoLoaded

$nodeInfoLoaded : boolean

Type

boolean — Whether the core information of the node is already loaded or not

$nodeInfoLevel

$nodeInfoLevel : string

Type

string — Details level passed to nodeLoadInfo()

$_user

$_user : String

Type

String

$_indexableMetaKeys

$_indexableMetaKeys : array

Type

array

$_metadataBulkUpdate

$_metadataBulkUpdate : boolean

Type

boolean

Methods

__construct()

__construct(string  $url, array  $metadata = array()) 

Parameters

string $url

URL of the node in the form ajxp.protocol://repository_id/path/to/node

array $metadata

Node metadata

__sleep()

__sleep() : array

Returns

array

setUrl()

setUrl(String  $url) : void

Parameters

String $url

of the node in the form ajxp.protocol://repository_id/path/to/node

setDriver()

setDriver(  $accessDriver) 

Parameters

$accessDriver

hasMetaStore()

hasMetaStore() : boolean

Check if there is currently a MetaStore provider set

Returns

boolean

startUpdatingMetadata()

startUpdatingMetadata() 

Start a session of set / remove Metadata calls without applying the node.meta_change hook

finishedUpdatingMetadata()

finishedUpdatingMetadata() 

Finish updating the metadata and trigger the node.meta_change event

Throws

\Exception

setMetadata()

setMetadata(  $nameSpace,   $metaData, boolean  $private = false, integer  $scope = AJXP_METADATA_SCOPE_REPOSITORY, boolean  $indexable = false) 

Parameters

$nameSpace
$metaData
boolean $private
integer $scope
boolean $indexable

removeMetadata()

removeMetadata(String  $nameSpace, boolean  $private = false, integer  $scope = AJXP_METADATA_SCOPE_REPOSITORY, boolean  $indexable = false) 

Parameters

String $nameSpace
boolean $private
integer $scope
boolean $indexable

retrieveMetadata()

retrieveMetadata(String  $nameSpace, boolean  $private = false, integer  $scope = AJXP_METADATA_SCOPE_REPOSITORY, boolean  $indexable = false) : array

Parameters

String $nameSpace
boolean $private
integer $scope
boolean $indexable

Returns

array

copyOrMoveMetadataFromNode()

copyOrMoveMetadataFromNode(\Pydio\Access\Core\Model\AJXP_Node  $originalNode, string  $nameSpace, string  $operation = "move", boolean  $private = false, integer  $scope = AJXP_METADATA_SCOPE_REPOSITORY, boolean  $indexable = false) : \Pydio\Access\Core\Model\array()

Parameters

\Pydio\Access\Core\Model\AJXP_Node $originalNode
string $nameSpace
string $operation
boolean $private
integer $scope
boolean $indexable

Returns

\Pydio\Access\Core\Model\array()

findMetadataInParent()

findMetadataInParent(  $nameSpace, boolean  $private = false, integer  $scope = AJXP_METADATA_SCOPE_REPOSITORY, boolean  $indexable = false) : array|boolean

Search for metadata in parents, recursively

Parameters

$nameSpace
boolean $private
integer $scope
boolean $indexable

Returns

array|boolean

collectMetadataInParents()

collectMetadataInParents(String  $nameSpace, boolean  $private = false, integer  $scope = AJXP_METADATA_SCOPE_REPOSITORY, boolean  $indexable = false, array  $collect = array()) 

Parameters

String $nameSpace
boolean $private
integer $scope
boolean $indexable
array $collect

collectMetadatasInParents()

collectMetadatasInParents(array  $nameSpaces, boolean  $private = false, integer  $scope = AJXP_METADATA_SCOPE_REPOSITORY, boolean  $indexable = false, array  $collect = array()) 

Parameters

array $nameSpaces
boolean $private
integer $scope
boolean $indexable
array $collect

collectRepositoryMetadatasInChildren()

collectRepositoryMetadatasInChildren(  $nameSpace,   $userScope) : array

Parameters

$nameSpace
$userScope

Returns

array

loadHash()

loadHash() : void

setLeaf()

setLeaf(boolean  $boolean) : void

Parameters

boolean $boolean

Leaf or Collection?

isLeaf()

isLeaf() : boolean

Returns

boolean

setLabel()

setLabel(  $label) : void

Parameters

$label

String Main label, will set the metadata "text" key.

getLabel()

getLabel() : string

Returns

string —

Try to get the metadata "text" key, or the basename of the node path.

getExtension()

getExtension() : string

Returns

string

hasExtension()

hasExtension(  $string) : boolean

Parameters

$string

Returns

boolean

listMetaKeys()

listMetaKeys() : array

List all set metadata keys

Returns

array

loadNodeInfo()

loadNodeInfo(boolean  $forceRefresh = false, boolean  $contextNode = false, mixed  $details = false) : void

Applies the "node.info" hook, thus going through the plugins that have registered this node, and loading all metadata at once.

Parameters

boolean $forceRefresh
boolean $contextNode

The parent node, if it can be useful for the hooks callbacks

mixed $details

A specification of expected metadata fields, or minimal

getRealFile()

getRealFile() : string

Get a real reference to the filesystem. Remote wrappers will copy the file locally.

This will last the time of the script and will be removed afterward.

Returns

string

wrapperIsRemote()

wrapperIsRemote() : boolean

Check if node wrapper is local or remote

Returns

boolean

getUrl()

getUrl() : string

Returns

string —

URL of the node in the form ajxp.protocol://repository_id/path/to/node

getPath()

getPath() : string

Returns

string —

The path from the root of the repository

isRoot()

isRoot() : boolean

Returns

boolean

getScheme()

getScheme() : string

Returns

string —

The scheme part of the url

getUserId()

getUserId() : string

Returns

string —

A username

setUserId()

setUserId(string  $userId) 

Parameters

string $userId

A username

hasUser()

hasUser() : string

Returns

string —

A username passed through url

getRepositoryId()

getRepositoryId() : string

Returns

string —

The repository identifer

mergeMetadata()

mergeMetadata(array  $metadata, boolean  $mergeValues = false) : void

Pass an array of metadata and merge its content with the current metadata.

Parameters

array $metadata
boolean $mergeValues

getNodeInfoMeta()

getNodeInfoMeta() : array

Return all metadata loaded during node.info, mainly used for caching.

Returns

array

setInfoLoaded()

setInfoLoaded(string  $level) 

Set nodeInfoLoaded to true from external.

Parameters

string $level

getSizeRecursive()

getSizeRecursive() : integer|mixed

Try the size of collection recursively.

Will trigger the node.size.recursive hook, allowing certain plugins to perform the operation if they have the information (e.g. meta.syncable). Otherwise will use the directoryUsage() method of the accessDriver.

Returns

integer|mixed

__get()

__get(  $varName) : array|null|string

Magic getter for metadata

Parameters

$varName

Returns

array|null|string

__set()

__set(  $metaName,   $metaValue) : void

Magic setter for metadata

Parameters

$metaName
$metaValue

jsonSerialize()

jsonSerialize() : mixed

Specify data which should be serialized to JSON

Returns

mixed —

data which can be serialized by json_encode, which is a value of any type other than a resource.

parseUrl()

parseUrl() : void

Safe parseUrl implementation