TerminateEvent

Extends ConsoleEvent

Event triggered immediately before the process is terminated.

since

2.0.0

package

Joomla Framework

Methods

__construct

Constructor.

__construct(string name, array arguments = []) : mixed
inherited
since

1.0

Arguments

name

stringThe event name.

arguments

arrayThe event arguments.

Response

mixed

__serialize

Serialize the event.

__serialize() : array
inherited
since

2.0.0

Response

arrayThe data to be serialized

__unserialize

Unserialize the event.

__unserialize(array data) : void
inherited
since

2.0.0

Arguments

data

arrayThe serialized event.

addArgument

Add an event argument, only if it is not existing.

addArgument(string name, mixed value) : $this
inherited
since

1.0

Arguments

name

stringThe argument name.

value

mixedThe argument value.

Response

$this

clearArguments

Clear all event arguments.

clearArguments() : array
inherited
since

1.0

Response

arrayThe old arguments.

count

Count the number of arguments.

count() : int
inherited
since

1.0

Response

intThe number of arguments.

getApplication

Get the active application.

getApplication() : \Joomla\Console\Application
inherited
since

2.0.0

Response

\Joomla\Console\Application

getArgument

Get an event argument value.

getArgument(string name, mixed default = null) : mixed
inherited
since

1.0

Arguments

name

stringThe argument name.

default

mixedThe default value if not found.

Response

mixedThe argument value or the default value.

getArguments

Get all event arguments.

getArguments() : array
inherited
since

1.0

Response

arrayAn associative array of argument names as keys and their values as values.

getCommand

Get the command being executed.

getCommand() : \Joomla\Console\Command\AbstractCommand|null
inherited
since

2.0.0

Response

\Joomla\Console\Command\AbstractCommand|null

getExitCode

Gets the exit code.

getExitCode() : int
since

2.0.0

Response

int

getName

Get the event name.

getName() : string
inherited
since

1.0

Response

stringThe event name.

hasArgument

Tell if the given event argument exists.

hasArgument(string name) : bool
inherited
since

1.0

Arguments

name

stringThe argument name.

Response

boolTrue if it exists, false otherwise.

isStopped

Tell if the event propagation is stopped.

isStopped() : bool
inherited
since

1.0

Response

boolTrue if stopped, false otherwise.

offsetExists

Tell if the given event argument exists.

offsetExists(string name) : bool
inherited
since

1.0

Arguments

name

stringThe argument name.

Response

boolTrue if it exists, false otherwise.

offsetGet

Get an event argument value.

offsetGet(string name) : mixed
inherited
since

1.0

Arguments

name

stringThe argument name.

Response

mixedThe argument value or null if not existing.

offsetSet

Set the value of an event argument.

offsetSet(string name, mixed value) : void
inherited
since

1.0

throws

\InvalidArgumentExceptionIf the argument name is null.

Arguments

name

stringThe argument name.

value

mixedThe argument value.

offsetUnset

Remove an event argument.

offsetUnset(string name) : void
inherited
since

1.0

Arguments

name

stringThe argument name.

removeArgument

Remove an event argument.

removeArgument(string name) : mixed
inherited
since

1.0

Arguments

name

stringThe argument name.

Response

mixedThe old argument value or null if it is not existing.

serialize

Serialize the event.

serialize() : string
inherited
since

1.0

Response

stringThe serialized event.

setArgument

Add argument to event.

setArgument(string name, mixed value) : $this
inherited
since

1.0

Arguments

name

stringArgument name.

value

mixedValue.

Response

$this

setExitCode

Sets the exit code.

setExitCode(int exitCode) : void
since

2.0.0

Arguments

exitCode

intThe command exit code.

stop

Stop the event propagation.

stop() : void
inherited deprecated
since

1.0

deprecated

3.0 Use stopPropogation instead

stopPropagation

Stops the propagation of the event to further event listeners.

stopPropagation() : void
inherited
since

2.0.0

unserialize

Unserialize the event.

unserialize(string serialized) : void
inherited
since

1.0

Arguments

serialized

stringThe serialized event.

Properties

exitCode

The exit code to use for the application.

since

2.0.0

Type(s)

int

application

The active application.

inherited
since

2.0.0

Type(s)

\Joomla\Console\Application

command

The command being executed.

inherited
since

2.0.0

Type(s)

\Joomla\Console\Command\AbstractCommand|null

name

The event name.

inherited
since

1.0

Type(s)

string

arguments

The event arguments.

inherited
since

1.0

Type(s)

array

stopped

A flag to see if the event propagation is stopped.

inherited
since

1.0

Type(s)

bool