Copied!

SchemaBuilderEvent

SchemaBuilderEvent.php : 20
Extends Event

Gives subscribers the editor of the schema being built. DBAL 4.5 deprecated changing a schema or a table in place, so subscribers add and change tables and sequences with a schema editor, which the schema builder creates the schema from once the event has been dispatched.

Methods

public__construct()

SchemaBuilderEvent.php : 22
public __construct(SchemaBuilderInterface $schemaBuilder, SchemaEditor $schemaEditor)

Parameters

Name Type Default value Description
$schemaBuilder SchemaBuilderInterface - -
$schemaEditor SchemaEditor - -

publicgetSchemaBuilder()

SchemaBuilderEvent.php : 36
public getSchemaBuilder() : SchemaBuilderInterface

Return values

SchemaBuilderInterface

publicgetSchemaEditor()

SchemaBuilderEvent.php : 31

The editor of the schema being built. Tables and sequences added or changed with it end up in the built schema, the tables with the schema's default table options under their own.

public getSchemaEditor() : SchemaEditor

Return values

SchemaEditor

publichasSequence()

SchemaBuilderEvent.php : 46
public hasSequence(string $name) : bool

Parameters

Name Type Default value Description
$name string - -

Return values

bool

publichasTable()

SchemaBuilderEvent.php : 41
public hasTable(string $name) : bool

Parameters

Name Type Default value Description
$name string - -

Return values

bool

publicisPropagationStopped()

Event.php : 35
public isPropagationStopped() : bool

Return values

bool

publicstopPropagation()

Event.php : 47

Stops the propagation of the event to further event listeners.

public stopPropagation() : void

If multiple event listeners are connected to the same event, no further event listener will be triggered once any trigger calls stopPropagation().