@@ -65,38 +65,49 @@ Hook::getInstance();
65
65
66
66
** setSingletonName()**
67
67
``` php
68
- setSingletonName($method);
68
+ Hook:: setSingletonName($method);
69
69
```
70
70
71
- | Atttribute | Description | Type |
71
+ | Atttribute | Description | Type | Required | Default
72
72
| --- | --- | --- |
73
- | $method | Set method name for use singleton pattern | string |
73
+ | $method | Set method name for use singleton pattern | string | Yes | |
74
74
75
+ ** addAction()**
76
+ ``` php
77
+ Hook::addAction($tag, $function, $priority, $args);
78
+ ```
75
79
80
+ | Atttribute | Description | Type | Required | Default
81
+ | --- | --- | --- |
82
+ | $tag | Action hook name | string | Yes | |
83
+ | $function | Function to attach to action hook | callable | Yes | |
84
+ | $priority | Set method name for use singleton pattern | int | No | 8 |
85
+ | $args | Set method name for use singleton pattern | int | No | 0 |
76
86
77
- ** Hook::addAction** ($tag, $function, $priority, $args);
78
-
79
- $tag → (** string** ) → Action hook name.
80
-
81
- $func → (** callable** ) → Function to attach to action hook.
82
-
83
- $priority → (** int** ) (Optional) → Order in which the action is executed.
84
-
85
- $args → (** int** ) (Optional) → Number of arguments accepted.
86
-
87
- ** Hook::addActions** ($actions);
88
-
89
- $actions → (** array** ) → Number of arguments accepted.
90
-
91
- ** Hook::doAction** ($tag, $args, $remove);
87
+ ** addActions()**
88
+ ``` php
89
+ Hook::addActions($actions);
90
+ ```
92
91
93
- $tag → (** string** ) → Action hook name.
92
+ | Atttribute | Description | Type | Required | Default
93
+ | --- | --- | --- |
94
+ | $actions | Actions hooks | array | Yes | |
94
95
95
- $args → (** mixed** ) (Optional) → Optional arguments.
96
+ ** doAction()**
97
+ ``` php
98
+ Hook::doAction($tag, $args, $remove);
99
+ ```
96
100
97
- $remove → (** boolean** ) (Optional) → Delete hook after executing actions.
101
+ | Atttribute | Description | Type | Required | Default
102
+ | --- | --- | --- |
103
+ | $tag | Action hook name | string | Yes | |
104
+ | $args | Optional arguments | mixed | No | array() |
105
+ | $remove | Delete hook after executing actions | boolean | No | true |
98
106
99
- ** Hook::current** ();
107
+ ** current()**
108
+ ``` php
109
+ Hook::current();
110
+ ```
100
111
101
112
### Usage
102
113
0 commit comments