Nextcloud PHP API (master)

MetadataNamedEvent extends AMetadataEvent
in package

MetadataNamedEvent is an event similar to MetadataBackgroundEvent completed with a target name, used to limit the refresh of metadata only listeners capable of filtering themselves out.

Meaning that when using this event, your app must implement a filter on the event's registered name returned by getName()

This event is mostly triggered when a registered name is added to the files scan i.e. ./occ files:scan --generate-metadata [name]

Tags
see
AMetadataEvent::getMetadata()
see
AMetadataEvent::getNode()
see
MetadataNamedEvent::getName()
since
28.0.0

Table of Contents

Properties

$metadata  : IFilesMetadata
$node  : Node
$name  : string
$propagationStopped  : bool

Methods

__construct()  : mixed
Compatibility constructor
getMetadata()  : IFilesMetadata
returns metadata. if known, it already contains data from the database.
getName()  : string
get the assigned name for the event.
getNode()  : Node
returns related node
isPropagationStopped()  : bool
{@inheritDoc}
stopPropagation()  : void
Stops the propagation of the event to further event listeners

Properties

$propagationStopped

private bool $propagationStopped = false
Tags
since
22.0.0

Methods

getMetadata()

returns metadata. if known, it already contains data from the database.

public getMetadata() : IFilesMetadata

If the object is modified using its setters, changes are stored in database at the end of the event.

Tags
since
28.0.0
Return values
IFilesMetadata

getName()

get the assigned name for the event.

public getName() : string

This is used to know if your app is the called one when running the ./occ files:scan --generate-metadata [name]

Tags
since
28.0.0
Return values
string

isPropagationStopped()

{@inheritDoc}

public isPropagationStopped() : bool
Tags
since
22.0.0
see
StoppableEventInterface
Return values
bool

stopPropagation()

Stops the propagation of the event to further event listeners

public stopPropagation() : void
Tags
since
22.0.0

        
On this page

Search results