Traits

ResultAware

This Trait partially implements the ResultAwareInterface for mutable and immutable events.

You must additionally implement the typeCheckResult method or use one of the ResultType*Aware traits in your Event handler.
« More »

ResultTypeArrayAware

This Trait partially implements the ResultAwareInterface for type checking.

Events using this Trait (and the ResultAware trait) will expect event handlers to set results of an Array type.
« More »

ResultTypeBooleanAware

This Trait partially implements the ResultAwareInterface for type checking.

Events using this Trait (and the ResultAware trait) will expect event handlers to set results of a Boolean type.
« More »

ResultTypeFloatAware

This Trait partially implements the ResultAwareInterface for type checking.

Events using this Trait (and the ResultAware trait) will expect event handlers to set results of a Float type.
« More »

ResultTypeIntegerAware

This Trait partially implements the ResultAwareInterface for type checking.

Events using this Trait (and the ResultAware trait) will expect event handlers to set results of an Integer type.
« More »

ResultTypeMixedAware

This Trait partially implements the ResultAwareInterface for type checking.

Events using this Trait (and the ResultAware trait) will expect event handlers to set results of a any type. THIS IS A COP OUT! If you expect a nullable or union type it's best to implement the typeCheckResult method yourself to check for the exact types you expect.
« More »

ResultTypeNumericAware

This Trait partially implements the ResultAwareInterface for type checking.

Events using this Trait (and the ResultAware trait) will expect event handlers to set results of a Numeric type.
« More »

ResultTypeObjectAware

This Trait partially implements the ResultAwareInterface for type checking.

Events using this Trait (and the ResultAware trait) will expect event handlers to set results of an object type. If you do not set a list of acceptable result classes any PHP object will satisfy this type check.
« More »

ResultTypeStringAware

This Trait partially implements the ResultAwareInterface for type checking.

Events using this Trait (and the ResultAware trait) will expect event handlers to set results of a String type.
« More »

Interfaces

ResultAwareInterface

Defines an Event which has an append-only array argument named 'result'.

This is used for Events whose handlers are expected to return something when called, similar to how many plugin events worked in earlier versions of Joomla. This interface is partially implemented by the ResultAware trait. The typeCheckResult method is implemented by the various ResultType*Aware traits. Your event needs to use both the ResultAware trait and one of the ResultType*Aware traits. For example, if your event returns boolean results you need to use the ResultAware and ResultTypeBooleanAware traits in your event.
« More »