Nextcloud PHP API (stable18)

IRuleMatcher extends IFileCheck

Class IRuleMatcher

Tags
since
18.0.0

Table of Contents

getEntity()  : IEntity
returns the entity which might provide more information, depending on the interfaces it implements
getFlows()  : array
getMatchingOperations()  : array
This method is left for backwards compatibility and easier porting of apps. Please use 'getFlows' instead (and setOperation if you implement an IComplexOperation).
setEntity()  : void
this method can only be called once and is typically called by the Flow engine, unless for IComplexOperations.
setEntitySubject()  : void
Equips the check with a subject fitting the Entity. For instance, an entity of File will receive an instance of OCP\Files\Node, or a comment entity might get an IComment.
setEventName()  : void
this method can be called once to set the event name that is currently being processed. The workflow engine takes care of this usually, only an IComplexOperation might want to make use of it.
setFileInfo()  : void
setOperation()  : void
this method can only be called once and is typically called by the Flow engine, unless for IComplexOperations.

Methods

getEntity()

returns the entity which might provide more information, depending on the interfaces it implements

public getEntity() : IEntity
Tags
since
18.0.0
Return values
IEntity

getFlows()

public getFlows([bool $returnFirstMatchingOperationOnly = true ]) : array
Parameters
$returnFirstMatchingOperationOnly : bool = true
Tags
throws
RuntimeException
since
18.0.0
Return values
array

getMatchingOperations()

This method is left for backwards compatibility and easier porting of apps. Please use 'getFlows' instead (and setOperation if you implement an IComplexOperation).

public getMatchingOperations(string $class[, bool $returnFirstMatchingOperationOnly = true ]) : array
Parameters
$class : string
$returnFirstMatchingOperationOnly : bool = true
Tags
since
18.0.0
deprecated
18.0.0
Return values
array

setEntity()

this method can only be called once and is typically called by the Flow engine, unless for IComplexOperations.

public setEntity(IEntity $entity) : void
Parameters
$entity : IEntity
Tags
throws
RuntimeException
since
18.0.0

setEntitySubject()

Equips the check with a subject fitting the Entity. For instance, an entity of File will receive an instance of OCP\Files\Node, or a comment entity might get an IComment.

public setEntitySubject(IEntity $entity, mixed $subject) : void

The implementing check must be aware of the incoming type.

If an unsupported subject is passed the implementation MAY throw an \UnexpectedValueException.

Parameters
$entity : IEntity
$subject : mixed
Tags
throws
UnexpectedValueException
since
18.0.0

setEventName()

this method can be called once to set the event name that is currently being processed. The workflow engine takes care of this usually, only an IComplexOperation might want to make use of it.

public setEventName(string $eventName) : void
Parameters
$eventName : string
Tags
throws
RuntimeException
since
18.0.9

setFileInfo()

public setFileInfo(IStorage $storage, string $path[, bool $isDir = false ]) : void
Parameters
$storage : IStorage
$path : string
$isDir : bool = false
Tags
since
18.0.0

setOperation()

this method can only be called once and is typically called by the Flow engine, unless for IComplexOperations.

public setOperation(IOperation $operation) : void
Parameters
$operation : IOperation
Tags
throws
RuntimeException
since
18.0.0

Search results