??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/turanoil.kz/wp-includes/Requests/src/Hooks.php
⬅ Kembali
<?php
/**
* Handles adding and dispatching events
*
* @package Requests\EventDispatcher
*/
namespace WpOrg\Requests;
use WpOrg\Requests\Exception\InvalidArgument;
use WpOrg\Requests\HookManager;
use WpOrg\Requests\Utility\InputValidator;
/**
* Handles adding and dispatching events
*
* @package Requests\EventDispatcher
*/
class Hooks implements HookManager {
/**
* Registered callbacks for each hook
*
* @var array
*/
protected $hooks = [];
/**
* Register a callback for a hook
*
* @param string $hook Hook name
* @param callable $callback Function/method to call on event
* @param int $priority Priority number. <0 is executed earlier, >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;
}
public function __wakeup() {
throw new \LogicException( __CLASS__ . ' should never be unserialized' );
}
}
Nama
Tipe
Ukuran
Diubah
Aksi
📁 Auth
dir
—
2025-03-22 03:46
📁 Cookie
dir
—
2025-03-17 15:33
📁 Exception
dir
—
2026-05-30 11:29
📁 Proxy
dir
—
2025-03-22 03:46
📁 Response
dir
—
2026-05-30 11:29
📁 Transport
dir
—
2025-03-22 03:46
📁 Utility
dir
—
2025-03-17 15:33
🐘 Auth.php
php
860 B
2022-12-16 02:32
🐘 Autoload.php
php
9.1 KB
2023-04-05 17:12
🐘 Capability.php
php
652 B
2023-04-05 17:12
🐘 Cookie.php
php
15 KB
2024-03-25 16:23
🐘 Exception.php
php
1.1 KB
2022-12-16 02:32
🐘 HookManager.php
php
709 B
2022-12-16 02:32
🐘 Hooks.php
php
3 KB
2023-10-12 16:34
🐘 IdnaEncoder.php
php
12.2 KB
2026-05-21 04:46
🐘 Ipv6.php
php
5.5 KB
2026-05-21 04:46
🐘 Iri.php
php
29 KB
2026-05-21 04:46
🐘 Port.php
php
1.5 KB
2022-12-16 02:32
🐘 Proxy.php
php
867 B
2022-12-16 02:32
🐘 Requests.php
php
33.2 KB
2026-05-21 04:46
🐘 Response.php
php
4.2 KB
2023-04-05 17:12
🐘 Session.php
php
8.9 KB
2023-10-12 16:34
🐘 Ssl.php
php
5.3 KB
2022-12-16 02:32
🐘 Transport.php
php
1.5 KB
2022-12-16 02:32
📄 error_log
file
2.5 KB
2026-06-23 09:36