[Web] update directorytree/ldaprecord

This commit is contained in:
FreddleSpl0it
2024-02-20 10:30:11 +01:00
parent 40146839ef
commit d479d18507
481 changed files with 13919 additions and 6171 deletions
@@ -10,6 +10,10 @@
* file that was distributed with this source code.
*/
if ('cli' !== PHP_SAPI) {
throw new Exception('This script must be run from the command line.');
}
/**
* Starts a dump server to collect and output dumps on a single place with multiple formats support.
*
@@ -9,40 +9,52 @@
* file that was distributed with this source code.
*/
use Symfony\Component\VarDumper\Caster\ScalarStub;
use Symfony\Component\VarDumper\VarDumper;
if (!function_exists('dump')) {
/**
* @author Nicolas Grekas <p@tchwork.com>
* @author Alexandre Daubois <alex.daubois@gmail.com>
*/
function dump(mixed $var, mixed ...$moreVars): mixed
function dump(mixed ...$vars): mixed
{
VarDumper::dump($var);
if (!$vars) {
VarDumper::dump(new ScalarStub('🐛'));
foreach ($moreVars as $v) {
VarDumper::dump($v);
return null;
}
if (1 < func_num_args()) {
return func_get_args();
if (array_key_exists(0, $vars) && 1 === count($vars)) {
VarDumper::dump($vars[0]);
$k = 0;
} else {
foreach ($vars as $k => $v) {
VarDumper::dump($v, is_int($k) ? 1 + $k : $k);
}
}
return $var;
if (1 < count($vars)) {
return $vars;
}
return $vars[$k];
}
}
if (!function_exists('dd')) {
/**
* @return never
*/
function dd(...$vars): void
function dd(mixed ...$vars): never
{
if (!in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !headers_sent()) {
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true) && !headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
foreach ($vars as $v) {
VarDumper::dump($v);
if (array_key_exists(0, $vars) && 1 === count($vars)) {
VarDumper::dump($vars[0]);
} else {
foreach ($vars as $k => $v) {
VarDumper::dump($v, is_int($k) ? 1 + $k : $k);
}
}
exit(1);