public addHookProperty ( string $property, object | null | callable $toObject, string $toMethod = null, array $options = [] ) : string | ||
$property | string | Method name to hook into, NOT including the three preceding underscores May also be Class::Method for same result as using the fromClass option. |
$toObject | object | null | callable | Object to call $toMethod from, Or null if $toMethod is a function outside of an object, Or function|callable if $toObject is not applicable or function is provided as a closure. |
$toMethod | string | Method from $toObject, or function name to call on a hook event. Optional. |
$options | array | See self::$defaultHookOptions at the beginning of this class. Optional. |
return | string | A special Hook ID that should be retained if you need to remove the hook later |