phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
BaseHooksTrait.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ajax\common\html\traits
;
4
5
class
BaseHooksTrait
{
6
protected
$_hooks
=[];
7
12
public
function
hookExists
($hookKey){
13
return
isset($this->_hooks[$hookKey]);
14
}
15
20
public
function
getHook
($hookKey){
21
if
(isset($this->_hooks[$hookKey])){
22
return
$this->_hooks[$hookKey];
23
}
24
return
null
;
25
}
26
32
public
function
addHook
($hookKey,$callable){
33
$this->_hooks[$hookKey]=$callable;
34
}
35
42
public
function
execHook
($hookKey,...$variables){
43
if
(($hook=$this->
getHook
($hookKey))!=
null
){
44
return
call_user_func_array($hook,$variables);
45
}
46
return
;
47
}
48
}
49
Ajax\common\html\traits\BaseHooksTrait
Definition
BaseHooksTrait.php:5
Ajax\common\html\traits\BaseHooksTrait\hookExists
hookExists($hookKey)
Definition
BaseHooksTrait.php:12
Ajax\common\html\traits\BaseHooksTrait\execHook
execHook($hookKey,... $variables)
Executes the hook with key $hookKey.
Definition
BaseHooksTrait.php:42
Ajax\common\html\traits\BaseHooksTrait\getHook
getHook($hookKey)
Definition
BaseHooksTrait.php:20
Ajax\common\html\traits\BaseHooksTrait\addHook
addHook($hookKey, $callable)
Adds a new Hook.
Definition
BaseHooksTrait.php:32
Ajax\common\html\traits\BaseHooksTrait\$_hooks
$_hooks
Definition
BaseHooksTrait.php:6
Ajax\common\html\traits
Definition
BaseHooksTrait.php:3
Ajax
common
html
traits
BaseHooksTrait.php
Generated on Sun Dec 10 2023 16:15:57 for
phpMv-UI
by
doxygen
1.9.8