- 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>
96 lines
1.8 KiB
PHP
96 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace Safe;
|
|
|
|
use Safe\Exceptions\ApcuException;
|
|
|
|
/**
|
|
* @param bool $limited
|
|
* @return array
|
|
* @throws ApcuException
|
|
*
|
|
*/
|
|
function apcu_cache_info(bool $limited = false): array
|
|
{
|
|
error_clear_last();
|
|
$safeResult = \apcu_cache_info($limited);
|
|
if ($safeResult === false) {
|
|
throw ApcuException::createFromPhpError();
|
|
}
|
|
return $safeResult;
|
|
}
|
|
|
|
|
|
/**
|
|
* @param string $key
|
|
* @param int $old
|
|
* @param int $new
|
|
* @throws ApcuException
|
|
*
|
|
*/
|
|
function apcu_cas(string $key, int $old, int $new): void
|
|
{
|
|
error_clear_last();
|
|
$safeResult = \apcu_cas($key, $old, $new);
|
|
if ($safeResult === false) {
|
|
throw ApcuException::createFromPhpError();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* @param string $key
|
|
* @param int $step
|
|
* @param bool|null $success
|
|
* @param int $ttl
|
|
* @return int
|
|
* @throws ApcuException
|
|
*
|
|
*/
|
|
function apcu_dec(string $key, int $step = 1, ?bool &$success = null, int $ttl = 0): int
|
|
{
|
|
error_clear_last();
|
|
$safeResult = \apcu_dec($key, $step, $success, $ttl);
|
|
if ($safeResult === false) {
|
|
throw ApcuException::createFromPhpError();
|
|
}
|
|
return $safeResult;
|
|
}
|
|
|
|
|
|
/**
|
|
* @param string $key
|
|
* @param int $step
|
|
* @param bool|null $success
|
|
* @param int $ttl
|
|
* @return int
|
|
* @throws ApcuException
|
|
*
|
|
*/
|
|
function apcu_inc(string $key, int $step = 1, ?bool &$success = null, int $ttl = 0): int
|
|
{
|
|
error_clear_last();
|
|
$safeResult = \apcu_inc($key, $step, $success, $ttl);
|
|
if ($safeResult === false) {
|
|
throw ApcuException::createFromPhpError();
|
|
}
|
|
return $safeResult;
|
|
}
|
|
|
|
|
|
/**
|
|
* @param bool $limited
|
|
* @return array
|
|
* @throws ApcuException
|
|
*
|
|
*/
|
|
function apcu_sma_info(bool $limited = false): array
|
|
{
|
|
error_clear_last();
|
|
$safeResult = \apcu_sma_info($limited);
|
|
if ($safeResult === false) {
|
|
throw ApcuException::createFromPhpError();
|
|
}
|
|
return $safeResult;
|
|
}
|