Nextcloud PHP API (master)

AddMissingPrimaryKeyEvent extends Event
in package

Event to allow apps to register information about missing database primary keys

This event will be dispatched for checking on the admin settings and when running occ db:add-missing-primary-keys which will then create those keys

Tags
since
28.0.0

Table of Contents

Properties

$missingPrimaryKeys  : array<string|int, array{tableName: string, primaryKeyName: string, columns: string[], formerIndex: null|string}>
$propagationStopped  : bool

Methods

__construct()  : mixed
Compatibility constructor
addMissingPrimaryKey()  : void
getMissingPrimaryKeys()  : array<string|int, array{tableName: string, primaryKeyName: string, columns: string[], formerIndex: null|string}>
isPropagationStopped()  : bool
{@inheritDoc}
stopPropagation()  : void
Stops the propagation of the event to further event listeners

Properties

$missingPrimaryKeys

private array<string|int, array{tableName: string, primaryKeyName: string, columns: string[], formerIndex: null|string}> $missingPrimaryKeys = []

$propagationStopped

private bool $propagationStopped = false
Tags
since
22.0.0

Methods

__construct()

Compatibility constructor

public __construct() : mixed

In Nextcloud 17.0.0 this event class used a now deprecated/removed Symfony base class that had a constructor (with default arguments). To lower the risk of a breaking change (PHP won't allow parent constructor calls if there is none), this empty constructor's only purpose is to hopefully not break existing sub- classes of this class.

Tags
since
18.0.0

addMissingPrimaryKey()

public addMissingPrimaryKey(string $tableName, string $primaryKeyName, array<string|int, string> $columns[, string|null $formerIndex = null ]) : void
Parameters
$tableName : string
$primaryKeyName : string
$columns : array<string|int, string>
$formerIndex : string|null = null
Tags
since
28.0.0

getMissingPrimaryKeys()

public getMissingPrimaryKeys() : array<string|int, array{tableName: string, primaryKeyName: string, columns: string[], formerIndex: null|string}>
Tags
since
28.0.0
Return values
array<string|int, array{tableName: string, primaryKeyName: string, columns: string[], formerIndex: null|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