- Fix: Notifiable-Trait zum User-Model hinzugefuegt (behebt notify()-500er) - Installer: SMTP-Verbindungstest mit EsmtpTransport + Ueberspringen-Link - Admin: Neuer E-Mail-Tab mit SMTP-Konfiguration + Verbindungstest - Admin: Lazy Quill-Initialisierung (nur sichtbare Locale wird geladen) - Uebersetzungen: 17 neue Mail-Keys in allen 6 Sprachen Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
73 lines
1.6 KiB
PHP
73 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace Safe;
|
|
|
|
use Safe\Exceptions\YamlException;
|
|
|
|
/**
|
|
* @param string $filename
|
|
* @param int $pos
|
|
* @param int|null $ndocs
|
|
* @param array|null $callbacks
|
|
* @return mixed
|
|
*
|
|
*/
|
|
function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, ?array $callbacks = null)
|
|
{
|
|
error_clear_last();
|
|
if ($callbacks !== null) {
|
|
$safeResult = \yaml_parse_file($filename, $pos, $ndocs, $callbacks);
|
|
} else {
|
|
$safeResult = \yaml_parse_file($filename, $pos, $ndocs);
|
|
}
|
|
return $safeResult;
|
|
}
|
|
|
|
|
|
/**
|
|
* @param string $url
|
|
* @param int $pos
|
|
* @param int|null $ndocs
|
|
* @param array|null $callbacks
|
|
* @return mixed
|
|
* @throws YamlException
|
|
*
|
|
*/
|
|
function yaml_parse_url(string $url, int $pos = 0, ?int &$ndocs = null, ?array $callbacks = null)
|
|
{
|
|
error_clear_last();
|
|
if ($callbacks !== null) {
|
|
$safeResult = \yaml_parse_url($url, $pos, $ndocs, $callbacks);
|
|
} else {
|
|
$safeResult = \yaml_parse_url($url, $pos, $ndocs);
|
|
}
|
|
if ($safeResult === false) {
|
|
throw YamlException::createFromPhpError();
|
|
}
|
|
return $safeResult;
|
|
}
|
|
|
|
|
|
/**
|
|
* @param string $input
|
|
* @param int $pos
|
|
* @param int|null $ndocs
|
|
* @param array|null $callbacks
|
|
* @return mixed
|
|
* @throws YamlException
|
|
*
|
|
*/
|
|
function yaml_parse(string $input, int $pos = 0, ?int &$ndocs = null, ?array $callbacks = null)
|
|
{
|
|
error_clear_last();
|
|
if ($callbacks !== null) {
|
|
$safeResult = \yaml_parse($input, $pos, $ndocs, $callbacks);
|
|
} else {
|
|
$safeResult = \yaml_parse($input, $pos, $ndocs);
|
|
}
|
|
if ($safeResult === false) {
|
|
throw YamlException::createFromPhpError();
|
|
}
|
|
return $safeResult;
|
|
}
|