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
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
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
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
getMissingPrimaryKeys()
public
getMissingPrimaryKeys() : array<string|int, array{tableName: string, primaryKeyName: string, columns: string[], formerIndex: null|string}>
Tags
Return values
array<string|int, array{tableName: string, primaryKeyName: string, columns: string[], formerIndex: null|string}>isPropagationStopped()
{@inheritDoc}
public
isPropagationStopped() : bool
Tags
Return values
boolstopPropagation()
Stops the propagation of the event to further event listeners
public
stopPropagation() : void