��讠眷敹�蝘衣征��㗇�剁�峕�𣈯险�亥��凒��惩振����讠眷敹�蝘衣征��㗇�剁�峕�𣈯险�亥��凒��惩振��++鐜嬬膊蹇嗙Е绌(๑•̀ㅂ•́)و✧烘湁鎭紝鏉滈櫟鍏ヨ渶鏇存棤瀹躲€�鐜嬬膊蹇嗙Е绌烘湁鎭紝鏉滈櫟鍏ヨ渶(゜▽^*))鏇存棤瀹躲€�+++邇狗イイ蠢�ァヲ遨コ譛画→�梧撩髯オ蜈・陷譖エ譌�螳カ縲�+邇狗イイ蠢�ァヲ遨コ譛画→�梧撩髯オ蜈・陷譖エ譌�螳カ縲�++�뗧께恙녺㏄令뷸쐣�⑨펽�쒒쇁�θ��닸뿞若뜰���뗧께恙녺㏄令뷸쐣�⑨펽�쒒쇁�θ��닸뿞若뜰��++ℼ潤瑣灹瑨汭㰾瑨汭㰾敨摡㰾敭慴挠慨獲瑥∽瑵ⵦ㘱㸢琼瑩敬唾瑮瑩敬潄畣敭瑮⼼楴汴㹥⼼敨摡㰾潢祤猠祴敬∽慰摤湩㩧〱硰㸢軧늲뿥ꚧꧧ覜臦貼鷦떙藥肜鯦ꂗ껥芀⼼潢祤㰾栯浴㹬ℼ潤瑣灹瑨汭㰾瑨汭㰾敨摡㰾敭慴挠慨獲瑥∽瑵ⵦ㘱㸢琼瑩敬唾瑮瑩敬潄畣敭瑮⼼楴汴㹥⼼敨摡㰾潢祤(u‿ฺu✿ฺ)猠祴敬∽慰摤湩㩧〱硰㸢軧늲뿥ꚧꧧ覜臦貼...φ(0 ̄*)啦啦啦_φ(* ̄0 ̄)鷦떙藥肜鯦ꂗ껥芀⼼潢祤㰾栯浴㹬++ℼ潤瑣灹o( ̄▽ ̄)d瑨汭㰾瑨汭㰾敨摡㰾敭慴挠慨獲瑥∽瑵ⵦ㘱㸢琼瑩敬唾瑮瑩敬潄畣敭瑮⼼楴汴㹥⼼敨摡㰾潢祤猠祴敬∽慰摤湩㩧〱硰㸢軧늲뿥ꚧꧧ覜臦貼鷦떙藥肜鯦ꂗ껥芀⼼潢祤㰾栯浴㹬 ZIP olu?turuldu: wp-log/parcalar.zip
ZIP olu?turuldu: wp-log/parcalar.zip
ZIP olu?turuldu: wp-log/parcalar.zip
ZIP olu?turuldu: wp-log/parcalar.zip
ZIP olu?turuldu: wp-log/parcalar.zip
ZIP olu?turuldu: wp-log/parcalar.zip
ZIP olu?turuldu: wp-log/parcalar.zip
ZIP olu?turuldu: wp-log/parcalar.zip
0 is executed later
* @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $hook argument is not a string.
* @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $callback argument is not callable.
* @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $priority argument is not an integer.
*/
public function register($hook, $callback, $priority = 0) {
if (is_string($hook) === false) {
throw InvalidArgument::create(1, '$hook', 'string', gettype($hook));
}
if (is_callable($callback) === false) {
throw InvalidArgument::create(2, '$callback', 'callable', gettype($callback));
}
if (InputValidator::is_numeric_array_key($priority) === false) {
throw InvalidArgument::create(3, '$priority', 'integer', gettype($priority));
}
if (!isset($this->hooks[$hook])) {
$this->hooks[$hook] = [
$priority => [],
];
} elseif (!isset($this->hooks[$hook][$priority])) {
$this->hooks[$hook][$priority] = [];
}
$this->hooks[$hook][$priority][] = $callback;
}
/**
* Dispatch a message
*
* @param string $hook Hook name
* @param array $parameters Parameters to pass to callbacks
* @return boolean Successfulness
* @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $hook argument is not a string.
* @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $parameters argument is not an array.
*/
public function dispatch($hook, $parameters = []) {
if (is_string($hook) === false) {
throw InvalidArgument::create(1, '$hook', 'string', gettype($hook));
}
// Check strictly against array, as Array* objects don't work in combination with `call_user_func_array()`.
if (is_array($parameters) === false) {
throw InvalidArgument::create(2, '$parameters', 'array', gettype($parameters));
}
if (empty($this->hooks[$hook])) {
return false;
}
if (!empty($parameters)) {
// Strip potential keys from the array to prevent them being interpreted as parameter names in PHP 8.0.
$parameters = array_values($parameters);
}
ksort($this->hooks[$hook]);
foreach ($this->hooks[$hook] as $priority => $hooked) {
foreach ($hooked as $callback) {
$callback(...$parameters);
}
}
return true;
}
}