\app\framework\Component\StorageStorageEvent

Class StorageEvent

Each time an event is fired, an instance of Event class is passed to handlers. By extending this class you can implement your own event class and expand it with whatever functionality you might need.

Summary

Methods
Properties
Constants
__construct()
__get()
__set()
__isset()
__unset()
get()
getIterator()
isPropagationStopped()
stopPropagation()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
toArray()
getFile()
getStorage()
No public properties found
FILE_RENAMED
FILE_SAVED
FILE_DELETED
serialize()
unserialize()
$file
$storage
N/A
No private methods found
$propagationStopped
$eventData
N/A

Constants

FILE_RENAMED

FILE_RENAMED

This event is fired after a file was renamed, it also sets a property `oldKey` into the event object.<br /> You can use it if you need to know what file was renamed.

FILE_SAVED

FILE_SAVED

This event is fired after the file content was written to storage.

FILE_DELETED

FILE_DELETED

This event is fired after the file was deleted from the storage.

Properties

$propagationStopped

$propagationStopped : 

Type

$eventData

$eventData : 

Type

Methods

__get()

__get(string  $name) : mixed

Access internal data as if it was a real object

Parameters

string $name

Returns

mixed

__set()

__set(string  $name, mixed  $value) : void

Set internal data as if it was a real object

Parameters

string $name
mixed $value

__isset()

__isset(string  $name) : boolean

Override __isset

Parameters

string $name

Returns

boolean

__unset()

__unset(string  $name) : void

Override __unset

Parameters

string $name

get()

get(string  $name, mixed  $default = null) : mixed

Get value or return $default if there is no element set.

Parameters

string $name
mixed $default

Returns

mixed —

Config value or default value

getIterator()

getIterator() : \Traversable

(PHP 5 &gt;= 5.0.0)<br/> Retrieve an external iterator

Returns

\Traversable —

An instance of an object implementing Iterator or Traversable

isPropagationStopped()

isPropagationStopped() : boolean

Check if propagation for this event is stopped

Returns

boolean

stopPropagation()

stopPropagation() : void

Stops the propagation of the event to further event listeners.

After stopPropagation() is called, no other listeners will be processed.

offsetExists()

offsetExists(mixed  $offset) : boolean

(PHP 5 &gt;= 5.0.0)<br/> Whether a offset exists

Parameters

mixed $offset

An offset to check for.

Returns

boolean —

true on success or false on failure.

The return value will be casted to boolean if non-boolean was returned.

offsetGet()

offsetGet(mixed  $offset) : mixed

(PHP 5 &gt;= 5.0.0)<br/> Offset to retrieve

Parameters

mixed $offset

The offset to retrieve.

Returns

mixed —

Can return all value types.

offsetSet()

offsetSet(mixed  $offset, mixed  $value) : void

(PHP 5 &gt;= 5.0.0)<br/> Offset to set

Parameters

mixed $offset

The offset to assign the value to.

mixed $value

The value to set.

offsetUnset()

offsetUnset(mixed  $offset) : void

(PHP 5 &gt;= 5.0.0)<br/> Offset to unset

Parameters

mixed $offset

The offset to unset.

toArray()

toArray() : array

Get event data in form of an array

Returns

array —

Event data array

serialize()

serialize(  $value) : string

Serializes the given value.

Parameters

$value

Returns

string

unserialize()

unserialize(string  $string) : array|mixed

Unserializes the given string and returns the array.

Parameters

string $string

String to serialize.

Returns

array|mixed