[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Event/Result/ -> ResultAwareInterface.php (summary)

Joomla! Content Management System

Copyright: (C) 2022 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 55 lines (2 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 1 class

ResultAwareInterface:: (2 methods):
  addResult()
  typeCheckResult()


Interface: ResultAwareInterface  - X-Ref

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.

addResult($data)   X-Ref
Appends data to the result array of the event.

param: mixed  $data  What to add to the result array.
return: void

typeCheckResult($data)   X-Ref
Checks the type of the data being appended to the result argument.

param: mixed  $data  The data to type check
return: void



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer