\TriTan\Common\HooksHookBuildId

Summary

Methods
Properties
Constants
buildUniqueId()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

buildUniqueId()

buildUniqueId(string  $hook, string|array  $function, integer|boolean  $priority) : string

Build Unique ID for storage and retrieval.

Simply using a function name is not enough, as several functions can have the same name when they are enclosed in classes.

Parameters

string $hook
string|array $function

Used for creating unique id

integer|boolean $priority

Used in counting how many hooks were applied. If === false and $function is an object reference, we return the unique id only if it already has one, false otherwise.

Returns

string —

unique ID for usage as array key