Stand: SMTP-Test, Admin-Mail-Tab, Notifiable-Fix, Lazy-Quill
- 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>
This commit is contained in:
123
vendor/thecodingmachine/safe/generated/8.4/apache.php
vendored
Normal file
123
vendor/thecodingmachine/safe/generated/8.4/apache.php
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\ApacheException;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @throws ApacheException
|
||||
*
|
||||
*/
|
||||
function apache_get_version(): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \apache_get_version();
|
||||
if ($safeResult === false) {
|
||||
throw ApacheException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $variable
|
||||
* @param bool $walk_to_top
|
||||
* @return string
|
||||
* @throws ApacheException
|
||||
*
|
||||
*/
|
||||
function apache_getenv(string $variable, bool $walk_to_top = false): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \apache_getenv($variable, $walk_to_top);
|
||||
if ($safeResult === false) {
|
||||
throw ApacheException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @return object
|
||||
* @throws ApacheException
|
||||
*
|
||||
*/
|
||||
function apache_lookup_uri(string $filename): object
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \apache_lookup_uri($filename);
|
||||
if ($safeResult === false) {
|
||||
throw ApacheException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return array|false
|
||||
*
|
||||
*/
|
||||
function apache_request_headers()
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \apache_request_headers();
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return array|false
|
||||
*
|
||||
*/
|
||||
function apache_response_headers()
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \apache_response_headers();
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $variable
|
||||
* @param string $value
|
||||
* @param bool $walk_to_top
|
||||
* @throws ApacheException
|
||||
*
|
||||
*/
|
||||
function apache_setenv(string $variable, string $value, bool $walk_to_top = false): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \apache_setenv($variable, $value, $walk_to_top);
|
||||
if ($safeResult === false) {
|
||||
throw ApacheException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
*/
|
||||
function getallheaders(): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \getallheaders();
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $uri
|
||||
* @throws ApacheException
|
||||
*
|
||||
*/
|
||||
function virtual(string $uri): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \virtual($uri);
|
||||
if ($safeResult === false) {
|
||||
throw ApacheException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
115
vendor/thecodingmachine/safe/generated/8.4/array.php
vendored
Normal file
115
vendor/thecodingmachine/safe/generated/8.4/array.php
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\ArrayException;
|
||||
|
||||
/**
|
||||
* @param array $array
|
||||
* @param callable $callback
|
||||
* @throws ArrayException
|
||||
*
|
||||
*/
|
||||
function array_all(array $array, callable $callback): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \array_all($array, $callback);
|
||||
if ($safeResult === false) {
|
||||
throw ArrayException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $keys
|
||||
* @param array $values
|
||||
* @return array
|
||||
*
|
||||
*/
|
||||
function array_combine(array $keys, array $values): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \array_combine($keys, $values);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $array
|
||||
* @return array
|
||||
*
|
||||
*/
|
||||
function array_flip(array $array): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \array_flip($array);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $array
|
||||
* @param array $replacements
|
||||
* @return array
|
||||
*
|
||||
*/
|
||||
function array_replace_recursive(array $array, array ...$replacements): array
|
||||
{
|
||||
error_clear_last();
|
||||
if ($replacements !== []) {
|
||||
$safeResult = \array_replace_recursive($array, ...$replacements);
|
||||
} else {
|
||||
$safeResult = \array_replace_recursive($array);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $array
|
||||
* @param array $replacements
|
||||
* @return array
|
||||
*
|
||||
*/
|
||||
function array_replace(array $array, array ...$replacements): array
|
||||
{
|
||||
error_clear_last();
|
||||
if ($replacements !== []) {
|
||||
$safeResult = \array_replace($array, ...$replacements);
|
||||
} else {
|
||||
$safeResult = \array_replace($array);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array|object $array
|
||||
* @param callable $callback
|
||||
* @param mixed $arg
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function array_walk_recursive(&$array, callable $callback, $arg = null): bool
|
||||
{
|
||||
error_clear_last();
|
||||
if ($arg !== null) {
|
||||
$safeResult = \array_walk_recursive($array, $callback, $arg);
|
||||
} else {
|
||||
$safeResult = \array_walk_recursive($array, $callback);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $array
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function shuffle(array &$array): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \shuffle($array);
|
||||
return $safeResult;
|
||||
}
|
||||
226
vendor/thecodingmachine/safe/generated/8.4/curl.php
vendored
Normal file
226
vendor/thecodingmachine/safe/generated/8.4/curl.php
vendored
Normal file
@@ -0,0 +1,226 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\CurlException;
|
||||
|
||||
/**
|
||||
* @param \CurlHandle $handle
|
||||
* @return \CurlHandle
|
||||
* @throws CurlException
|
||||
*
|
||||
*/
|
||||
function curl_copy_handle(\CurlHandle $handle): \CurlHandle
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \curl_copy_handle($handle);
|
||||
if ($safeResult === false) {
|
||||
throw CurlException::createFromPhpError($handle);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \CurlHandle $handle
|
||||
* @param string $string
|
||||
* @return string
|
||||
* @throws CurlException
|
||||
*
|
||||
*/
|
||||
function curl_escape(\CurlHandle $handle, string $string): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \curl_escape($handle, $string);
|
||||
if ($safeResult === false) {
|
||||
throw CurlException::createFromPhpError($handle);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \CurlHandle $handle
|
||||
* @return bool|string
|
||||
* @throws CurlException
|
||||
*
|
||||
*/
|
||||
function curl_exec(\CurlHandle $handle)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \curl_exec($handle);
|
||||
if ($safeResult === false) {
|
||||
throw CurlException::createFromPhpError($handle);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \CurlHandle $handle
|
||||
* @param int|null $option
|
||||
* @return mixed
|
||||
* @throws CurlException
|
||||
*
|
||||
*/
|
||||
function curl_getinfo(\CurlHandle $handle, ?int $option = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($option !== null) {
|
||||
$safeResult = \curl_getinfo($handle, $option);
|
||||
} else {
|
||||
$safeResult = \curl_getinfo($handle);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw CurlException::createFromPhpError($handle);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param null|string $url
|
||||
* @return \CurlHandle
|
||||
* @throws CurlException
|
||||
*
|
||||
*/
|
||||
function curl_init(?string $url = null): \CurlHandle
|
||||
{
|
||||
error_clear_last();
|
||||
if ($url !== null) {
|
||||
$safeResult = \curl_init($url);
|
||||
} else {
|
||||
$safeResult = \curl_init();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw CurlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \CurlMultiHandle $multi_handle
|
||||
* @param int|null $queued_messages
|
||||
* @return array
|
||||
* @throws CurlException
|
||||
*
|
||||
*/
|
||||
function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_messages = null): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \curl_multi_info_read($multi_handle, $queued_messages);
|
||||
if ($safeResult === false) {
|
||||
throw CurlException::createFromPhpError($multi_handle);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return \CurlMultiHandle
|
||||
*
|
||||
*/
|
||||
function curl_multi_init(): \CurlMultiHandle
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \curl_multi_init();
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \CurlMultiHandle $multi_handle
|
||||
* @param int $option
|
||||
* @param mixed $value
|
||||
* @throws CurlException
|
||||
*
|
||||
*/
|
||||
function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \curl_multi_setopt($multi_handle, $option, $value);
|
||||
if ($safeResult === false) {
|
||||
throw CurlException::createFromPhpError($multi_handle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \CurlHandle $handle
|
||||
* @param int $option
|
||||
* @param mixed $value
|
||||
* @throws CurlException
|
||||
*
|
||||
*/
|
||||
function curl_setopt(\CurlHandle $handle, int $option, $value): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \curl_setopt($handle, $option, $value);
|
||||
if ($safeResult === false) {
|
||||
throw CurlException::createFromPhpError($handle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \CurlShareHandle $share_handle
|
||||
* @return int
|
||||
*
|
||||
*/
|
||||
function curl_share_errno(\CurlShareHandle $share_handle): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \curl_share_errno($share_handle);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \CurlShareHandle $share_handle
|
||||
* @param int $option
|
||||
* @param mixed $value
|
||||
* @throws CurlException
|
||||
*
|
||||
*/
|
||||
function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \curl_share_setopt($share_handle, $option, $value);
|
||||
if ($safeResult === false) {
|
||||
throw CurlException::createFromPhpError($share_handle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \CurlHandle $handle
|
||||
* @param string $string
|
||||
* @return string
|
||||
* @throws CurlException
|
||||
*
|
||||
*/
|
||||
function curl_unescape(\CurlHandle $handle, string $string): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \curl_unescape($handle, $string);
|
||||
if ($safeResult === false) {
|
||||
throw CurlException::createFromPhpError($handle);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \CurlHandle $handle
|
||||
* @throws CurlException
|
||||
*
|
||||
*/
|
||||
function curl_upkeep(\CurlHandle $handle): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \curl_upkeep($handle);
|
||||
if ($safeResult === false) {
|
||||
throw CurlException::createFromPhpError($handle);
|
||||
}
|
||||
}
|
||||
369
vendor/thecodingmachine/safe/generated/8.4/datetime.php
vendored
Normal file
369
vendor/thecodingmachine/safe/generated/8.4/datetime.php
vendored
Normal file
@@ -0,0 +1,369 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\DatetimeException;
|
||||
|
||||
/**
|
||||
* @param string $datetime
|
||||
* @param \DateTimeZone|null $timezone
|
||||
* @return \DateTimeImmutable
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function date_create_immutable(string $datetime = "now", ?\DateTimeZone $timezone = null): \DateTimeImmutable
|
||||
{
|
||||
error_clear_last();
|
||||
if ($timezone !== null) {
|
||||
$safeResult = \date_create_immutable($datetime, $timezone);
|
||||
} else {
|
||||
$safeResult = \date_create_immutable($datetime);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param null|string $datetime
|
||||
* @param \DateTimeZone|null $timezone
|
||||
* @return \DateTime
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function date_create(?string $datetime = "now", ?\DateTimeZone $timezone = null): \DateTime
|
||||
{
|
||||
error_clear_last();
|
||||
if ($timezone !== null) {
|
||||
$safeResult = \date_create($datetime, $timezone);
|
||||
} else {
|
||||
$safeResult = \date_create($datetime);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $format
|
||||
* @param string $datetime
|
||||
* @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function date_parse_from_format(string $format, string $datetime): ?array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \date_parse_from_format($format, $datetime);
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $datetime
|
||||
* @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null
|
||||
*
|
||||
*/
|
||||
function date_parse(string $datetime): ?array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \date_parse($datetime);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $timestamp
|
||||
* @param float $latitude
|
||||
* @param float $longitude
|
||||
* @return array{sunrise: int|bool,sunset: int|bool,transit: int|bool,civil_twilight_begin: int|bool,civil_twilight_end: int|bool,nautical_twilight_begin: int|bool,nautical_twilight_end: int|bool,astronomical_twilight_begin: int|bool,astronomical_twilight_end: int|bool}|false
|
||||
*
|
||||
*/
|
||||
function date_sun_info(int $timestamp, float $latitude, float $longitude)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \date_sun_info($timestamp, $latitude, $longitude);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $timestamp
|
||||
* @param int $returnFormat
|
||||
* @param float|null $latitude
|
||||
* @param float|null $longitude
|
||||
* @param float|null $zenith
|
||||
* @param float|null $utcOffset
|
||||
* @return mixed
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude = null, ?float $longitude = null, ?float $zenith = null, ?float $utcOffset = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($utcOffset !== null) {
|
||||
$safeResult = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset);
|
||||
} elseif ($zenith !== null) {
|
||||
$safeResult = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith);
|
||||
} elseif ($longitude !== null) {
|
||||
$safeResult = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude);
|
||||
} elseif ($latitude !== null) {
|
||||
$safeResult = \date_sunrise($timestamp, $returnFormat, $latitude);
|
||||
} else {
|
||||
$safeResult = \date_sunrise($timestamp, $returnFormat);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $timestamp
|
||||
* @param int $returnFormat
|
||||
* @param float|null $latitude
|
||||
* @param float|null $longitude
|
||||
* @param float|null $zenith
|
||||
* @param float|null $utcOffset
|
||||
* @return mixed
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude = null, ?float $longitude = null, ?float $zenith = null, ?float $utcOffset = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($utcOffset !== null) {
|
||||
$safeResult = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset);
|
||||
} elseif ($zenith !== null) {
|
||||
$safeResult = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith);
|
||||
} elseif ($longitude !== null) {
|
||||
$safeResult = \date_sunset($timestamp, $returnFormat, $latitude, $longitude);
|
||||
} elseif ($latitude !== null) {
|
||||
$safeResult = \date_sunset($timestamp, $returnFormat, $latitude);
|
||||
} else {
|
||||
$safeResult = \date_sunset($timestamp, $returnFormat);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $format
|
||||
* @param int|null $timestamp
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
function date(string $format, ?int $timestamp = null): string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($timestamp !== null) {
|
||||
$safeResult = \date($format, $timestamp);
|
||||
} else {
|
||||
$safeResult = \date($format);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $hour
|
||||
* @param int|null $minute
|
||||
* @param int|null $second
|
||||
* @param int|null $month
|
||||
* @param int|null $day
|
||||
* @param int|null $year
|
||||
* @return int
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function gmmktime(int $hour, ?int $minute = null, ?int $second = null, ?int $month = null, ?int $day = null, ?int $year = null): int
|
||||
{
|
||||
error_clear_last();
|
||||
if ($year !== null) {
|
||||
$safeResult = \gmmktime($hour, $minute, $second, $month, $day, $year);
|
||||
} elseif ($day !== null) {
|
||||
$safeResult = \gmmktime($hour, $minute, $second, $month, $day);
|
||||
} elseif ($month !== null) {
|
||||
$safeResult = \gmmktime($hour, $minute, $second, $month);
|
||||
} elseif ($second !== null) {
|
||||
$safeResult = \gmmktime($hour, $minute, $second);
|
||||
} elseif ($minute !== null) {
|
||||
$safeResult = \gmmktime($hour, $minute);
|
||||
} else {
|
||||
$safeResult = \gmmktime($hour);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $format
|
||||
* @param int|null $timestamp
|
||||
* @return string
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function gmstrftime(string $format, ?int $timestamp = null): string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($timestamp !== null) {
|
||||
$safeResult = \gmstrftime($format, $timestamp);
|
||||
} else {
|
||||
$safeResult = \gmstrftime($format);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $format
|
||||
* @param int|null $timestamp
|
||||
* @return int
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function idate(string $format, ?int $timestamp = null): int
|
||||
{
|
||||
error_clear_last();
|
||||
if ($timestamp !== null) {
|
||||
$safeResult = \idate($format, $timestamp);
|
||||
} else {
|
||||
$safeResult = \idate($format);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $hour
|
||||
* @param int|null $minute
|
||||
* @param int|null $second
|
||||
* @param int|null $month
|
||||
* @param int|null $day
|
||||
* @param int|null $year
|
||||
* @return int
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function mktime(int $hour, ?int $minute = null, ?int $second = null, ?int $month = null, ?int $day = null, ?int $year = null): int
|
||||
{
|
||||
error_clear_last();
|
||||
if ($year !== null) {
|
||||
$safeResult = \mktime($hour, $minute, $second, $month, $day, $year);
|
||||
} elseif ($day !== null) {
|
||||
$safeResult = \mktime($hour, $minute, $second, $month, $day);
|
||||
} elseif ($month !== null) {
|
||||
$safeResult = \mktime($hour, $minute, $second, $month);
|
||||
} elseif ($second !== null) {
|
||||
$safeResult = \mktime($hour, $minute, $second);
|
||||
} elseif ($minute !== null) {
|
||||
$safeResult = \mktime($hour, $minute);
|
||||
} else {
|
||||
$safeResult = \mktime($hour);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $format
|
||||
* @param int|null $timestamp
|
||||
* @return string
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function strftime(string $format, ?int $timestamp = null): string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($timestamp !== null) {
|
||||
$safeResult = \strftime($format, $timestamp);
|
||||
} else {
|
||||
$safeResult = \strftime($format);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $timestamp
|
||||
* @param string $format
|
||||
* @return array
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function strptime(string $timestamp, string $format): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \strptime($timestamp, $format);
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $datetime
|
||||
* @param int|null $baseTimestamp
|
||||
* @return int
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function strtotime(string $datetime, ?int $baseTimestamp = null): int
|
||||
{
|
||||
error_clear_last();
|
||||
if ($baseTimestamp !== null) {
|
||||
$safeResult = \strtotime($datetime, $baseTimestamp);
|
||||
} else {
|
||||
$safeResult = \strtotime($datetime);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $abbr
|
||||
* @param int $utcOffset
|
||||
* @param int $isDST
|
||||
* @return string
|
||||
* @throws DatetimeException
|
||||
*
|
||||
*/
|
||||
function timezone_name_from_abbr(string $abbr, int $utcOffset = -1, int $isDST = -1): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \timezone_name_from_abbr($abbr, $utcOffset, $isDST);
|
||||
if ($safeResult === false) {
|
||||
throw DatetimeException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
464
vendor/thecodingmachine/safe/generated/8.4/ftp.php
vendored
Normal file
464
vendor/thecodingmachine/safe/generated/8.4/ftp.php
vendored
Normal file
@@ -0,0 +1,464 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\FtpException;
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param int $size
|
||||
* @param null|string $response
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_alloc(\FTP\Connection $ftp, int $size, ?string &$response = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_alloc($ftp, $size, $response);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $remote_filename
|
||||
* @param string $local_filename
|
||||
* @param FTP_ASCII|FTP_BINARY $mode
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_append(\FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_append($ftp, $remote_filename, $local_filename, $mode);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_cdup(\FTP\Connection $ftp): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_cdup($ftp);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $directory
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_chdir(\FTP\Connection $ftp, string $directory): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_chdir($ftp, $directory);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param int $permissions
|
||||
* @param string $filename
|
||||
* @return int
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_chmod(\FTP\Connection $ftp, int $permissions, string $filename): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_chmod($ftp, $permissions, $filename);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_close(\FTP\Connection $ftp): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_close($ftp);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $hostname
|
||||
* @param int $port
|
||||
* @param int $timeout
|
||||
* @return \FTP\Connection
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): \FTP\Connection
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_connect($hostname, $port, $timeout);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $filename
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_delete(\FTP\Connection $ftp, string $filename): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_delete($ftp, $filename);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param resource $stream
|
||||
* @param string $remote_filename
|
||||
* @param FTP_ASCII|FTP_BINARY $mode
|
||||
* @param int $offset
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_fget(\FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_fget($ftp, $stream, $remote_filename, $mode, $offset);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $remote_filename
|
||||
* @param resource $stream
|
||||
* @param FTP_ASCII|FTP_BINARY $mode
|
||||
* @param int $offset
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_fput(\FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_fput($ftp, $remote_filename, $stream, $mode, $offset);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $local_filename
|
||||
* @param string $remote_filename
|
||||
* @param FTP_ASCII|FTP_BINARY $mode
|
||||
* @param int $offset
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_get(\FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_get($ftp, $local_filename, $remote_filename, $mode, $offset);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_login(\FTP\Connection $ftp, string $username, string $password): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_login($ftp, $username, $password);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $directory
|
||||
* @return string
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_mkdir(\FTP\Connection $ftp, string $directory): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_mkdir($ftp, $directory);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $directory
|
||||
* @return array
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_mlsd(\FTP\Connection $ftp, string $directory): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_mlsd($ftp, $directory);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $local_filename
|
||||
* @param string $remote_filename
|
||||
* @param FTP_ASCII|FTP_BINARY $mode
|
||||
* @param int $offset
|
||||
* @return int
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_nb_get(\FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_nb_get($ftp, $local_filename, $remote_filename, $mode, $offset);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $remote_filename
|
||||
* @param string $local_filename
|
||||
* @param FTP_ASCII|FTP_BINARY $mode
|
||||
* @param int $offset
|
||||
* @return int
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_nb_put(\FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_nb_put($ftp, $remote_filename, $local_filename, $mode, $offset);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $directory
|
||||
* @return array
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_nlist(\FTP\Connection $ftp, string $directory): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_nlist($ftp, $directory);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param bool $enable
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_pasv(\FTP\Connection $ftp, bool $enable): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_pasv($ftp, $enable);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $remote_filename
|
||||
* @param string $local_filename
|
||||
* @param FTP_ASCII|FTP_BINARY $mode
|
||||
* @param int $offset
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_put(\FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_put($ftp, $remote_filename, $local_filename, $mode, $offset);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @return string
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_pwd(\FTP\Connection $ftp): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_pwd($ftp);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $from
|
||||
* @param string $to
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_rename(\FTP\Connection $ftp, string $from, string $to): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_rename($ftp, $from, $to);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $directory
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_rmdir(\FTP\Connection $ftp, string $directory): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_rmdir($ftp, $directory);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $command
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_site(\FTP\Connection $ftp, string $command): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_site($ftp, $command);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @param string $filename
|
||||
* @return int
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_size(\FTP\Connection $ftp, string $filename): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_size($ftp, $filename);
|
||||
if ($safeResult === -1) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $hostname
|
||||
* @param int $port
|
||||
* @param int $timeout
|
||||
* @return \FTP\Connection
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): \FTP\Connection
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_ssl_connect($hostname, $port, $timeout);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \FTP\Connection $ftp
|
||||
* @return string
|
||||
* @throws FtpException
|
||||
*
|
||||
*/
|
||||
function ftp_systype(\FTP\Connection $ftp): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ftp_systype($ftp);
|
||||
if ($safeResult === false) {
|
||||
throw FtpException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
1106
vendor/thecodingmachine/safe/generated/8.4/functionsList.php
vendored
Normal file
1106
vendor/thecodingmachine/safe/generated/8.4/functionsList.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
26
vendor/thecodingmachine/safe/generated/8.4/gettext.php
vendored
Normal file
26
vendor/thecodingmachine/safe/generated/8.4/gettext.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\GettextException;
|
||||
|
||||
/**
|
||||
* @param string $domain
|
||||
* @param null|string $directory
|
||||
* @return string
|
||||
* @throws GettextException
|
||||
*
|
||||
*/
|
||||
function bindtextdomain(string $domain, ?string $directory = null): string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($directory !== null) {
|
||||
$safeResult = \bindtextdomain($domain, $directory);
|
||||
} else {
|
||||
$safeResult = \bindtextdomain($domain);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw GettextException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
239
vendor/thecodingmachine/safe/generated/8.4/ibmDb2.php
vendored
Normal file
239
vendor/thecodingmachine/safe/generated/8.4/ibmDb2.php
vendored
Normal file
@@ -0,0 +1,239 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\IbmDb2Exception;
|
||||
|
||||
/**
|
||||
* @param resource $connection
|
||||
* @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value
|
||||
* @return \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON|bool
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_autocommit($connection, $value = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($value !== null) {
|
||||
$safeResult = \db2_autocommit($connection, $value);
|
||||
} else {
|
||||
$safeResult = \db2_autocommit($connection);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stmt
|
||||
* @param int $parameter_number
|
||||
* @param string $variable_name
|
||||
* @param int $parameter_type
|
||||
* @param int $data_type
|
||||
* @param int $precision
|
||||
* @param int $scale
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_bind_param($stmt, int $parameter_number, string $variable_name, int $parameter_type = DB2_PARAM_IN, int $data_type = 0, int $precision = -1, int $scale = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision, $scale);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $connection
|
||||
* @return \stdClass
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_client_info($connection): \stdClass
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_client_info($connection);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $connection
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_close($connection): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_close($connection);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $connection
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_commit($connection): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_commit($connection);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stmt
|
||||
* @param array $parameters
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_execute($stmt, array $parameters = []): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_execute($stmt, $parameters);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stmt
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_free_result($stmt): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_free_result($stmt);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stmt
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_free_stmt($stmt): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_free_stmt($stmt);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $resource
|
||||
* @param string $option
|
||||
* @return string
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_get_option($resource, string $option): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_get_option($resource, $option);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stmt
|
||||
* @return 0|positive-int
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_num_rows($stmt): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_num_rows($stmt);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $connection
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_pclose($connection): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_pclose($connection);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $connection
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_rollback($connection): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_rollback($connection);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $connection
|
||||
* @return \stdClass
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_server_info($connection): \stdClass
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_server_info($connection);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $resource
|
||||
* @param array $options
|
||||
* @param int $type
|
||||
* @throws IbmDb2Exception
|
||||
*
|
||||
*/
|
||||
function db2_set_option($resource, array $options, int $type): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \db2_set_option($resource, $options, $type);
|
||||
if ($safeResult === false) {
|
||||
throw IbmDb2Exception::createFromPhpError();
|
||||
}
|
||||
}
|
||||
1683
vendor/thecodingmachine/safe/generated/8.4/image.php
vendored
Normal file
1683
vendor/thecodingmachine/safe/generated/8.4/image.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
881
vendor/thecodingmachine/safe/generated/8.4/imap.php
vendored
Normal file
881
vendor/thecodingmachine/safe/generated/8.4/imap.php
vendored
Normal file
@@ -0,0 +1,881 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\ImapException;
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @return string
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_8bit(string $string): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_8bit($string);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $folder
|
||||
* @param string $message
|
||||
* @param null|string $options
|
||||
* @param null|string $internal_date
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_append(\IMAP\Connection $imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($internal_date !== null) {
|
||||
$safeResult = \imap_append($imap, $folder, $message, $options, $internal_date);
|
||||
} elseif ($options !== null) {
|
||||
$safeResult = \imap_append($imap, $folder, $message, $options);
|
||||
} else {
|
||||
$safeResult = \imap_append($imap, $folder, $message);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @return string
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_base64(string $string): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_base64($string);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @return string
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_binary(string $string): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_binary($string);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param int $message_num
|
||||
* @param int $flags
|
||||
* @return string
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_body(\IMAP\Connection $imap, int $message_num, int $flags = 0): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_body($imap, $message_num, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param int $message_num
|
||||
* @param string $section
|
||||
* @return \stdClass
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_bodystruct(\IMAP\Connection $imap, int $message_num, string $section): \stdClass
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_bodystruct($imap, $message_num, $section);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @return \stdClass
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_check(\IMAP\Connection $imap): \stdClass
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_check($imap);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $sequence
|
||||
* @param string $flag
|
||||
* @param int $options
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_clearflag_full($imap, $sequence, $flag, $options);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param int $flags
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function imap_close(\IMAP\Connection $imap, int $flags = 0): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_close($imap, $flags);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $mailbox
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_createmailbox(\IMAP\Connection $imap, string $mailbox): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_createmailbox($imap, $mailbox);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $mailbox
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_deletemailbox(\IMAP\Connection $imap, string $mailbox): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_deletemailbox($imap, $mailbox);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $sequence
|
||||
* @param int $flags
|
||||
* @return array
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_fetch_overview(\IMAP\Connection $imap, string $sequence, int $flags = 0): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_fetch_overview($imap, $sequence, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param int $message_num
|
||||
* @param string $section
|
||||
* @param int $flags
|
||||
* @return string
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_fetchbody(\IMAP\Connection $imap, int $message_num, string $section, int $flags = 0): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_fetchbody($imap, $message_num, $section, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param int $message_num
|
||||
* @param int $flags
|
||||
* @return string
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_fetchheader(\IMAP\Connection $imap, int $message_num, int $flags = 0): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_fetchheader($imap, $message_num, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param int $message_num
|
||||
* @param string $section
|
||||
* @param int $flags
|
||||
* @return string
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_fetchmime(\IMAP\Connection $imap, int $message_num, string $section, int $flags = 0): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_fetchmime($imap, $message_num, $section, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param int $message_num
|
||||
* @param int $flags
|
||||
* @return \stdClass
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_fetchstructure(\IMAP\Connection $imap, int $message_num, int $flags = 0): \stdClass
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_fetchstructure($imap, $message_num, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param int $flags
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function imap_gc(\IMAP\Connection $imap, int $flags): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_gc($imap, $flags);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $mailbox
|
||||
* @return array
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_getacl(\IMAP\Connection $imap, string $mailbox): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_getacl($imap, $mailbox);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $reference
|
||||
* @param string $pattern
|
||||
* @return array
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pattern): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_getmailboxes($imap, $reference, $pattern);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $reference
|
||||
* @param string $pattern
|
||||
* @return array
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_getsubscribed(\IMAP\Connection $imap, string $reference, string $pattern): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_getsubscribed($imap, $reference, $pattern);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param int $message_num
|
||||
* @param int $from_length
|
||||
* @param int $subject_length
|
||||
* @return \stdClass
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_headerinfo(\IMAP\Connection $imap, int $message_num, int $from_length = 0, int $subject_length = 0): \stdClass
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_headerinfo($imap, $message_num, $from_length, $subject_length);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @return array
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_headers(\IMAP\Connection $imap): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_headers($imap);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $reference
|
||||
* @param string $pattern
|
||||
* @param string $content
|
||||
* @return array
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_listscan(\IMAP\Connection $imap, string $reference, string $pattern, string $content): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_listscan($imap, $reference, $pattern, $content);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $reference
|
||||
* @param string $pattern
|
||||
* @return array
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_lsub(\IMAP\Connection $imap, string $reference, string $pattern): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_lsub($imap, $reference, $pattern);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $envelope
|
||||
* @param array $bodies
|
||||
* @return string
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_mail_compose(array $envelope, array $bodies): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_mail_compose($envelope, $bodies);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $message_nums
|
||||
* @param string $mailbox
|
||||
* @param int $flags
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_mail_copy(\IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_mail_copy($imap, $message_nums, $mailbox, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $message_nums
|
||||
* @param string $mailbox
|
||||
* @param int $flags
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_mail_move(\IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_mail_move($imap, $message_nums, $mailbox, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $to
|
||||
* @param string $subject
|
||||
* @param string $message
|
||||
* @param null|string $additional_headers
|
||||
* @param null|string $cc
|
||||
* @param null|string $bcc
|
||||
* @param null|string $return_path
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_mail(string $to, string $subject, string $message, ?string $additional_headers = null, ?string $cc = null, ?string $bcc = null, ?string $return_path = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($return_path !== null) {
|
||||
$safeResult = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc, $return_path);
|
||||
} elseif ($bcc !== null) {
|
||||
$safeResult = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc);
|
||||
} elseif ($cc !== null) {
|
||||
$safeResult = \imap_mail($to, $subject, $message, $additional_headers, $cc);
|
||||
} elseif ($additional_headers !== null) {
|
||||
$safeResult = \imap_mail($to, $subject, $message, $additional_headers);
|
||||
} else {
|
||||
$safeResult = \imap_mail($to, $subject, $message);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @return \stdClass|false
|
||||
*
|
||||
*/
|
||||
function imap_mailboxmsginfo(\IMAP\Connection $imap)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_mailboxmsginfo($imap);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @return array
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_mime_header_decode(string $string): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_mime_header_decode($string);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @return string
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_mutf7_to_utf8(string $string): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_mutf7_to_utf8($string);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @return int
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_num_msg(\IMAP\Connection $imap): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_num_msg($imap);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $mailbox
|
||||
* @param string $user
|
||||
* @param string $password
|
||||
* @param int $flags
|
||||
* @param int $retries
|
||||
* @param array $options
|
||||
* @return \IMAP\Connection
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []): \IMAP\Connection
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_open($mailbox, $user, $password, $flags, $retries, $options);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @return string
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_qprint(string $string): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_qprint($string);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $from
|
||||
* @param string $to
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_renamemailbox(\IMAP\Connection $imap, string $from, string $to): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_renamemailbox($imap, $from, $to);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param null|string $mailbox
|
||||
* @param null|string $hostname
|
||||
* @param null|string $personal
|
||||
* @return string
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_rfc822_write_address(?string $mailbox, ?string $hostname, ?string $personal): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_rfc822_write_address($mailbox, $hostname, $personal);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param int|resource|string $file
|
||||
* @param int $message_num
|
||||
* @param string $section
|
||||
* @param int $flags
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_savebody(\IMAP\Connection $imap, $file, int $message_num, string $section = "", int $flags = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_savebody($imap, $file, $message_num, $section, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $quota_root
|
||||
* @param int $mailbox_size
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_set_quota(\IMAP\Connection $imap, string $quota_root, int $mailbox_size): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_set_quota($imap, $quota_root, $mailbox_size);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $mailbox
|
||||
* @param string $user_id
|
||||
* @param string $rights
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_setacl(\IMAP\Connection $imap, string $mailbox, string $user_id, string $rights): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_setacl($imap, $mailbox, $user_id, $rights);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $sequence
|
||||
* @param string $flag
|
||||
* @param int $options
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_setflag_full($imap, $sequence, $flag, $options);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param int $criteria
|
||||
* @param int $reverse
|
||||
* @param int $flags
|
||||
* @param null|string $search_criteria
|
||||
* @param null|string $charset
|
||||
* @return array
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_sort(\IMAP\Connection $imap, int $criteria, int $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = null): array
|
||||
{
|
||||
error_clear_last();
|
||||
if ($charset !== null) {
|
||||
$safeResult = \imap_sort($imap, $criteria, $reverse, $flags, $search_criteria, $charset);
|
||||
} elseif ($search_criteria !== null) {
|
||||
$safeResult = \imap_sort($imap, $criteria, $reverse, $flags, $search_criteria);
|
||||
} else {
|
||||
$safeResult = \imap_sort($imap, $criteria, $reverse, $flags);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $mailbox
|
||||
* @param int $flags
|
||||
* @return \stdClass
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_status(\IMAP\Connection $imap, string $mailbox, int $flags): \stdClass
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_status($imap, $mailbox, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $mailbox
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_subscribe(\IMAP\Connection $imap, string $mailbox): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_subscribe($imap, $mailbox);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param int $flags
|
||||
* @return array
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_thread(\IMAP\Connection $imap, int $flags = SE_FREE): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_thread($imap, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $timeout_type
|
||||
* @param int $timeout
|
||||
* @return mixed
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_timeout(int $timeout_type, int $timeout = -1)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_timeout($timeout_type, $timeout);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $message_nums
|
||||
* @param int $flags
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function imap_undelete(\IMAP\Connection $imap, string $message_nums, int $flags = 0): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_undelete($imap, $message_nums, $flags);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \IMAP\Connection $imap
|
||||
* @param string $mailbox
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_unsubscribe(\IMAP\Connection $imap, string $mailbox): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_unsubscribe($imap, $mailbox);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @return string
|
||||
* @throws ImapException
|
||||
*
|
||||
*/
|
||||
function imap_utf8_to_mutf7(string $string): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \imap_utf8_to_mutf7($string);
|
||||
if ($safeResult === false) {
|
||||
throw ImapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
325
vendor/thecodingmachine/safe/generated/8.4/info.php
vendored
Normal file
325
vendor/thecodingmachine/safe/generated/8.4/info.php
vendored
Normal file
@@ -0,0 +1,325 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\InfoException;
|
||||
|
||||
/**
|
||||
* @param int $option
|
||||
* @param mixed $value
|
||||
* @return mixed
|
||||
*
|
||||
*/
|
||||
function assert_options(int $option, $value = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($value !== null) {
|
||||
$safeResult = \assert_options($option, $value);
|
||||
} else {
|
||||
$safeResult = \assert_options($option);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $title
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function cli_set_process_title(string $title): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \cli_set_process_title($title);
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $extension_filename
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function dl(string $extension_filename): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \dl($extension_filename);
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $option
|
||||
* @return mixed
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function get_cfg_var(string $option)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \get_cfg_var($option);
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function get_include_path(): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \get_include_path();
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function getlastmod(): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \getlastmod();
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function getmygid(): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \getmygid();
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function getmyinode(): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \getmyinode();
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function getmypid(): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \getmypid();
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function getmyuid(): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \getmyuid();
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $short_options
|
||||
* @param array $long_options
|
||||
* @param int|null $rest_index
|
||||
* @return array|array|array
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function getopt(string $short_options, array $long_options = [], ?int &$rest_index = null): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \getopt($short_options, $long_options, $rest_index);
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $mode
|
||||
* @return array
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function getrusage(int $mode = 0): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \getrusage($mode);
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $option
|
||||
* @return string
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function ini_get(string $option): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ini_get($option);
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $option
|
||||
* @param bool|float|int|null|string $value
|
||||
* @return string
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function ini_set(string $option, $value): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ini_set($option, $value);
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return non-empty-string
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function php_sapi_name(): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \php_sapi_name();
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $flags
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function phpcredits(int $flags = CREDITS_ALL): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \phpcredits($flags);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $flags
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function phpinfo(int $flags = INFO_ALL): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \phpinfo($flags);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $assignment
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function putenv(string $assignment): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \putenv($assignment);
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $include_path
|
||||
* @return string
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function set_include_path(string $include_path): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \set_include_path($include_path);
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $seconds
|
||||
* @throws InfoException
|
||||
*
|
||||
*/
|
||||
function set_time_limit(int $seconds): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \set_time_limit($seconds);
|
||||
if ($safeResult === false) {
|
||||
throw InfoException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
55
vendor/thecodingmachine/safe/generated/8.4/inotify.php
vendored
Normal file
55
vendor/thecodingmachine/safe/generated/8.4/inotify.php
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\InotifyException;
|
||||
|
||||
/**
|
||||
* @param resource $inotify_instance
|
||||
* @param string $pathname
|
||||
* @param int $mask
|
||||
* @return int
|
||||
* @throws InotifyException
|
||||
*
|
||||
*/
|
||||
function inotify_add_watch($inotify_instance, string $pathname, int $mask): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \inotify_add_watch($inotify_instance, $pathname, $mask);
|
||||
if ($safeResult === false) {
|
||||
throw InotifyException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return resource
|
||||
* @throws InotifyException
|
||||
*
|
||||
*/
|
||||
function inotify_init()
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \inotify_init();
|
||||
if ($safeResult === false) {
|
||||
throw InotifyException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $inotify_instance
|
||||
* @param int $watch_descriptor
|
||||
* @throws InotifyException
|
||||
*
|
||||
*/
|
||||
function inotify_rm_watch($inotify_instance, int $watch_descriptor): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \inotify_rm_watch($inotify_instance, $watch_descriptor);
|
||||
if ($safeResult === false) {
|
||||
throw InotifyException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
666
vendor/thecodingmachine/safe/generated/8.4/ldap.php
vendored
Normal file
666
vendor/thecodingmachine/safe/generated/8.4/ldap.php
vendored
Normal file
@@ -0,0 +1,666 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\LdapException;
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
* @return string
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_8859_to_t61(string $value): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_8859_to_t61($value);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param string $dn
|
||||
* @param array $entry
|
||||
* @param array|null $controls
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($controls !== null) {
|
||||
$safeResult = \ldap_add($ldap, $dn, $entry, $controls);
|
||||
} else {
|
||||
$safeResult = \ldap_add($ldap, $dn, $entry);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param null|string $dn
|
||||
* @param null|string $password
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $password = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($password !== null) {
|
||||
$safeResult = \ldap_bind($ldap, $dn, $password);
|
||||
} elseif ($dn !== null) {
|
||||
$safeResult = \ldap_bind($ldap, $dn);
|
||||
} else {
|
||||
$safeResult = \ldap_bind($ldap);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param string $dn
|
||||
* @param string $attribute
|
||||
* @param string $value
|
||||
* @param array|null $controls
|
||||
* @return bool
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_compare(\LDAP\Connection $ldap, string $dn, string $attribute, string $value, ?array $controls = null): bool
|
||||
{
|
||||
error_clear_last();
|
||||
if ($controls !== null) {
|
||||
$safeResult = \ldap_compare($ldap, $dn, $attribute, $value, $controls);
|
||||
} else {
|
||||
$safeResult = \ldap_compare($ldap, $dn, $attribute, $value);
|
||||
}
|
||||
if ($safeResult === -1) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $link
|
||||
* @param resource $result
|
||||
* @param null|string $cookie
|
||||
* @param int|null $estimated
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_control_paged_result_response($link, $result, ?string &$cookie = null, ?int &$estimated = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_control_paged_result_response($link, $result, $cookie, $estimated);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $link
|
||||
* @param int $pagesize
|
||||
* @param bool $iscritical
|
||||
* @param string $cookie
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_control_paged_result($link, int $pagesize, bool $iscritical = false, string $cookie = ""): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_control_paged_result($link, $pagesize, $iscritical, $cookie);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param \LDAP\Result $result
|
||||
* @return int
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_count_entries(\LDAP\Connection $ldap, \LDAP\Result $result): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_count_entries($ldap, $result);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param string $dn
|
||||
* @param array|null $controls
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_delete(\LDAP\Connection $ldap, string $dn, ?array $controls = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($controls !== null) {
|
||||
$safeResult = \ldap_delete($ldap, $dn, $controls);
|
||||
} else {
|
||||
$safeResult = \ldap_delete($ldap, $dn);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $dn
|
||||
* @return string
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_dn2ufn(string $dn): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_dn2ufn($dn);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param string $user
|
||||
* @param string $old_password
|
||||
* @param string $new_password
|
||||
* @param array|null $controls
|
||||
* @return bool|string
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_exop_passwd(\LDAP\Connection $ldap, string $user = "", string $old_password = "", string $new_password = "", ?array &$controls = null)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_exop_passwd($ldap, $user, $old_password, $new_password, $controls);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @return bool|string
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_exop_whoami(\LDAP\Connection $ldap)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_exop_whoami($ldap);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param string $request_oid
|
||||
* @param null|string $request_data
|
||||
* @param array|null $controls
|
||||
* @param null|string $response_data
|
||||
* @param null|string $response_oid
|
||||
* @return bool|resource
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_exop(\LDAP\Connection $ldap, string $request_oid, ?string $request_data = null, ?array $controls = null, ?string &$response_data = null, ?string &$response_oid = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($response_oid !== null) {
|
||||
$safeResult = \ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data, $response_oid);
|
||||
} elseif ($response_data !== null) {
|
||||
$safeResult = \ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data);
|
||||
} elseif ($controls !== null) {
|
||||
$safeResult = \ldap_exop($ldap, $request_oid, $request_data, $controls);
|
||||
} elseif ($request_data !== null) {
|
||||
$safeResult = \ldap_exop($ldap, $request_oid, $request_data);
|
||||
} else {
|
||||
$safeResult = \ldap_exop($ldap, $request_oid);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $dn
|
||||
* @param int $with_attrib
|
||||
* @return array
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_explode_dn(string $dn, int $with_attrib): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_explode_dn($dn, $with_attrib);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param \LDAP\ResultEntry $entry
|
||||
* @return string
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_first_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_first_attribute($ldap, $entry);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param \LDAP\Result $result
|
||||
* @return \LDAP\ResultEntry
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_first_entry(\LDAP\Connection $ldap, \LDAP\Result $result): \LDAP\ResultEntry
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_first_entry($ldap, $result);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Result $result
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_free_result(\LDAP\Result $result): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_free_result($result);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param \LDAP\ResultEntry $entry
|
||||
* @return array
|
||||
*
|
||||
*/
|
||||
function ldap_get_attributes(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_get_attributes($ldap, $entry);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param \LDAP\ResultEntry $entry
|
||||
* @return string
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_get_dn(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_get_dn($ldap, $entry);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param \LDAP\Result $result
|
||||
* @return array
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_get_entries(\LDAP\Connection $ldap, \LDAP\Result $result): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_get_entries($ldap, $result);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param int $option
|
||||
* @param mixed $value
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_get_option(\LDAP\Connection $ldap, int $option, &$value = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_get_option($ldap, $option, $value);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param \LDAP\ResultEntry $entry
|
||||
* @param string $attribute
|
||||
* @return array
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_get_values_len(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, string $attribute): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_get_values_len($ldap, $entry, $attribute);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param \LDAP\ResultEntry $entry
|
||||
* @param string $attribute
|
||||
* @return array
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_get_values(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, string $attribute): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_get_values($ldap, $entry, $attribute);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param string $dn
|
||||
* @param array $entry
|
||||
* @param array|null $controls
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_mod_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($controls !== null) {
|
||||
$safeResult = \ldap_mod_add($ldap, $dn, $entry, $controls);
|
||||
} else {
|
||||
$safeResult = \ldap_mod_add($ldap, $dn, $entry);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param string $dn
|
||||
* @param array $entry
|
||||
* @param array|null $controls
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_mod_del(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($controls !== null) {
|
||||
$safeResult = \ldap_mod_del($ldap, $dn, $entry, $controls);
|
||||
} else {
|
||||
$safeResult = \ldap_mod_del($ldap, $dn, $entry);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param string $dn
|
||||
* @param array $entry
|
||||
* @param array|null $controls
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_mod_replace(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($controls !== null) {
|
||||
$safeResult = \ldap_mod_replace($ldap, $dn, $entry, $controls);
|
||||
} else {
|
||||
$safeResult = \ldap_mod_replace($ldap, $dn, $entry);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param string $dn
|
||||
* @param array $modifications_info
|
||||
* @param array|null $controls
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_modify_batch(\LDAP\Connection $ldap, string $dn, array $modifications_info, ?array $controls = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($controls !== null) {
|
||||
$safeResult = \ldap_modify_batch($ldap, $dn, $modifications_info, $controls);
|
||||
} else {
|
||||
$safeResult = \ldap_modify_batch($ldap, $dn, $modifications_info);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param \LDAP\ResultEntry $entry
|
||||
* @return string
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_next_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_next_attribute($ldap, $entry);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param \LDAP\Result $result
|
||||
* @param null|string $response_data
|
||||
* @param null|string $response_oid
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_parse_exop(\LDAP\Connection $ldap, \LDAP\Result $result, ?string &$response_data = null, ?string &$response_oid = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_parse_exop($ldap, $result, $response_data, $response_oid);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param \LDAP\Result $result
|
||||
* @param int|null $error_code
|
||||
* @param null|string $matched_dn
|
||||
* @param null|string $error_message
|
||||
* @param array|null $referrals
|
||||
* @param array|null $controls
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_parse_result(\LDAP\Connection $ldap, \LDAP\Result $result, ?int &$error_code, ?string &$matched_dn = null, ?string &$error_message = null, ?array &$referrals = null, ?array &$controls = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_parse_result($ldap, $result, $error_code, $matched_dn, $error_message, $referrals, $controls);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param string $dn
|
||||
* @param string $new_rdn
|
||||
* @param string $new_parent
|
||||
* @param bool $delete_old_rdn
|
||||
* @param array|null $controls
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_rename(\LDAP\Connection $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($controls !== null) {
|
||||
$safeResult = \ldap_rename($ldap, $dn, $new_rdn, $new_parent, $delete_old_rdn, $controls);
|
||||
} else {
|
||||
$safeResult = \ldap_rename($ldap, $dn, $new_rdn, $new_parent, $delete_old_rdn);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @param null|string $dn
|
||||
* @param null|string $password
|
||||
* @param null|string $mech
|
||||
* @param null|string $realm
|
||||
* @param null|string $authc_id
|
||||
* @param null|string $authz_id
|
||||
* @param null|string $props
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_sasl_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $password = null, ?string $mech = null, ?string $realm = null, ?string $authc_id = null, ?string $authz_id = null, ?string $props = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($props !== null) {
|
||||
$safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id, $authz_id, $props);
|
||||
} elseif ($authz_id !== null) {
|
||||
$safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id, $authz_id);
|
||||
} elseif ($authc_id !== null) {
|
||||
$safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id);
|
||||
} elseif ($realm !== null) {
|
||||
$safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm);
|
||||
} elseif ($mech !== null) {
|
||||
$safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech);
|
||||
} elseif ($password !== null) {
|
||||
$safeResult = \ldap_sasl_bind($ldap, $dn, $password);
|
||||
} elseif ($dn !== null) {
|
||||
$safeResult = \ldap_sasl_bind($ldap, $dn);
|
||||
} else {
|
||||
$safeResult = \ldap_sasl_bind($ldap);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param null|resource $ldap
|
||||
* @param int $option
|
||||
* @param mixed $value
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_set_option($ldap, int $option, $value): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_set_option($ldap, $option, $value);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \LDAP\Connection $ldap
|
||||
* @throws LdapException
|
||||
*
|
||||
*/
|
||||
function ldap_unbind(\LDAP\Connection $ldap): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ldap_unbind($ldap);
|
||||
if ($safeResult === false) {
|
||||
throw LdapException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
413
vendor/thecodingmachine/safe/generated/8.4/mbstring.php
vendored
Normal file
413
vendor/thecodingmachine/safe/generated/8.4/mbstring.php
vendored
Normal file
@@ -0,0 +1,413 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\MbstringException;
|
||||
|
||||
/**
|
||||
* @param int $codepoint
|
||||
* @param null|string $encoding
|
||||
* @return string
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_chr(int $codepoint, ?string $encoding = null): string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($encoding !== null) {
|
||||
$safeResult = \mb_chr($codepoint, $encoding);
|
||||
} else {
|
||||
$safeResult = \mb_chr($codepoint);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array|string $string
|
||||
* @param string $to_encoding
|
||||
* @param mixed $from_encoding
|
||||
* @return array|string
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_convert_encoding($string, string $to_encoding, $from_encoding = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($from_encoding !== null) {
|
||||
$safeResult = \mb_convert_encoding($string, $to_encoding, $from_encoding);
|
||||
} else {
|
||||
$safeResult = \mb_convert_encoding($string, $to_encoding);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $to_encoding
|
||||
* @param array|string $from_encoding
|
||||
* @param array|object|string $var
|
||||
* @param array|object|string $vars
|
||||
* @return string
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_convert_variables(string $to_encoding, $from_encoding, &$var, ...$vars): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \mb_convert_variables($to_encoding, $from_encoding, $var, ...$vars);
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param non-empty-list|non-falsy-string|null $encoding
|
||||
* @return bool|list
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_detect_order($encoding = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($encoding !== null) {
|
||||
$safeResult = \mb_detect_order($encoding);
|
||||
} else {
|
||||
$safeResult = \mb_detect_order();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $encoding
|
||||
* @return false|list
|
||||
*
|
||||
*/
|
||||
function mb_encoding_aliases(string $encoding)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \mb_encoding_aliases($encoding);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $pattern
|
||||
* @param callable(array):string $callback
|
||||
* @param string $string
|
||||
* @param null|string $options
|
||||
* @return null|string
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): ?string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($options !== null) {
|
||||
$safeResult = \mb_ereg_replace_callback($pattern, $callback, $string, $options);
|
||||
} else {
|
||||
$safeResult = \mb_ereg_replace_callback($pattern, $callback, $string);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $pattern
|
||||
* @param string $replacement
|
||||
* @param string $string
|
||||
* @param null|string $options
|
||||
* @return null|string
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null): ?string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($options !== null) {
|
||||
$safeResult = \mb_ereg_replace($pattern, $replacement, $string, $options);
|
||||
} else {
|
||||
$safeResult = \mb_ereg_replace($pattern, $replacement, $string);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_ereg_search_getregs(): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \mb_ereg_search_getregs();
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @param null|string $pattern
|
||||
* @param null|string $options
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $options = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($options !== null) {
|
||||
$safeResult = \mb_ereg_search_init($string, $pattern, $options);
|
||||
} elseif ($pattern !== null) {
|
||||
$safeResult = \mb_ereg_search_init($string, $pattern);
|
||||
} else {
|
||||
$safeResult = \mb_ereg_search_init($string);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param null|string $pattern
|
||||
* @param null|string $options
|
||||
* @return array
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_ereg_search_regs(?string $pattern = null, ?string $options = null): array
|
||||
{
|
||||
error_clear_last();
|
||||
if ($options !== null) {
|
||||
$safeResult = \mb_ereg_search_regs($pattern, $options);
|
||||
} elseif ($pattern !== null) {
|
||||
$safeResult = \mb_ereg_search_regs($pattern);
|
||||
} else {
|
||||
$safeResult = \mb_ereg_search_regs();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $offset
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_ereg_search_setpos(int $offset): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \mb_ereg_search_setpos($offset);
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $pattern
|
||||
* @param string $replacement
|
||||
* @param string $string
|
||||
* @param null|string $options
|
||||
* @return string
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_eregi_replace(string $pattern, string $replacement, string $string, ?string $options = null): string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($options !== null) {
|
||||
$safeResult = \mb_eregi_replace($pattern, $replacement, $string, $options);
|
||||
} else {
|
||||
$safeResult = \mb_eregi_replace($pattern, $replacement, $string);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @return mixed
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_get_info(string $type = "all")
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \mb_get_info($type);
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param null|string $encoding
|
||||
* @return bool|string
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_http_output(?string $encoding = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($encoding !== null) {
|
||||
$safeResult = \mb_http_output($encoding);
|
||||
} else {
|
||||
$safeResult = \mb_http_output();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param null|string $encoding
|
||||
* @return bool|string
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_internal_encoding(?string $encoding = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($encoding !== null) {
|
||||
$safeResult = \mb_internal_encoding($encoding);
|
||||
} else {
|
||||
$safeResult = \mb_internal_encoding();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @param null|string $encoding
|
||||
* @return int
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_ord(string $string, ?string $encoding = null): int
|
||||
{
|
||||
error_clear_last();
|
||||
if ($encoding !== null) {
|
||||
$safeResult = \mb_ord($string, $encoding);
|
||||
} else {
|
||||
$safeResult = \mb_ord($string);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @param array|null $result
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_parse_str(string $string, ?array &$result): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \mb_parse_str($string, $result);
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param null|string $encoding
|
||||
* @return bool|string
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_regex_encoding(?string $encoding = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($encoding !== null) {
|
||||
$safeResult = \mb_regex_encoding($encoding);
|
||||
} else {
|
||||
$safeResult = \mb_regex_encoding();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $to
|
||||
* @param string $subject
|
||||
* @param string $message
|
||||
* @param array|null|string $additional_headers
|
||||
* @param null|string $additional_params
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_send_mail(string $to, string $subject, string $message, $additional_headers = [], ?string $additional_params = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($additional_params !== null) {
|
||||
$safeResult = \mb_send_mail($to, $subject, $message, $additional_headers, $additional_params);
|
||||
} else {
|
||||
$safeResult = \mb_send_mail($to, $subject, $message, $additional_headers);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $pattern
|
||||
* @param string $string
|
||||
* @param int $limit
|
||||
* @return list
|
||||
* @throws MbstringException
|
||||
*
|
||||
*/
|
||||
function mb_split(string $pattern, string $string, int $limit = -1): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \mb_split($pattern, $string, $limit);
|
||||
if ($safeResult === false) {
|
||||
throw MbstringException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
239
vendor/thecodingmachine/safe/generated/8.4/misc.php
vendored
Normal file
239
vendor/thecodingmachine/safe/generated/8.4/misc.php
vendored
Normal file
@@ -0,0 +1,239 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\MiscException;
|
||||
|
||||
/**
|
||||
* @param string $constant_name
|
||||
* @param mixed $value
|
||||
* @param bool $case_insensitive
|
||||
* @throws MiscException
|
||||
*
|
||||
*/
|
||||
function define(string $constant_name, $value, bool $case_insensitive = false): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \define($constant_name, $value, $case_insensitive);
|
||||
if ($safeResult === false) {
|
||||
throw MiscException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @param bool $return
|
||||
* @return bool|string
|
||||
* @throws MiscException
|
||||
*
|
||||
*/
|
||||
function highlight_file(string $filename, bool $return = false)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \highlight_file($filename, $return);
|
||||
if ($safeResult === false) {
|
||||
throw MiscException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @param bool $return
|
||||
* @return bool|string
|
||||
*
|
||||
*/
|
||||
function highlight_string(string $string, bool $return = false)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \highlight_string($string, $return);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param bool $as_number
|
||||
* @return array{0:int,1:int}|float|int
|
||||
* @throws MiscException
|
||||
*
|
||||
*/
|
||||
function hrtime(bool $as_number = false)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \hrtime($as_number);
|
||||
if ($safeResult === false) {
|
||||
throw MiscException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $format
|
||||
* @param mixed $values
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
function pack(string $format, ...$values): string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($values !== []) {
|
||||
$safeResult = \pack($format, ...$values);
|
||||
} else {
|
||||
$safeResult = \pack($format);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int|string $in_codepage
|
||||
* @param int|string $out_codepage
|
||||
* @param string $subject
|
||||
* @return string
|
||||
* @throws MiscException
|
||||
*
|
||||
*/
|
||||
function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sapi_windows_cp_conv($in_codepage, $out_codepage, $subject);
|
||||
if ($safeResult === null) {
|
||||
throw MiscException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $codepage
|
||||
* @throws MiscException
|
||||
*
|
||||
*/
|
||||
function sapi_windows_cp_set(int $codepage): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sapi_windows_cp_set($codepage);
|
||||
if ($safeResult === false) {
|
||||
throw MiscException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $event
|
||||
* @param int $pid
|
||||
* @throws MiscException
|
||||
*
|
||||
*/
|
||||
function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sapi_windows_generate_ctrl_event($event, $pid);
|
||||
if ($safeResult === false) {
|
||||
throw MiscException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param callable|null $handler
|
||||
* @param bool $add
|
||||
* @throws MiscException
|
||||
*
|
||||
*/
|
||||
function sapi_windows_set_ctrl_handler(?callable $handler, bool $add = true): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sapi_windows_set_ctrl_handler($handler, $add);
|
||||
if ($safeResult === false) {
|
||||
throw MiscException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @param bool|null $enable
|
||||
* @throws MiscException
|
||||
*
|
||||
*/
|
||||
function sapi_windows_vt100_support($stream, ?bool $enable = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($enable !== null) {
|
||||
$safeResult = \sapi_windows_vt100_support($stream, $enable);
|
||||
} else {
|
||||
$safeResult = \sapi_windows_vt100_support($stream);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw MiscException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $seconds
|
||||
* @return false|int
|
||||
*
|
||||
*/
|
||||
function sleep(int $seconds)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sleep($seconds);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $seconds
|
||||
* @param int $nanoseconds
|
||||
* @return array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool
|
||||
* @throws MiscException
|
||||
*
|
||||
*/
|
||||
function time_nanosleep(int $seconds, int $nanoseconds)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \time_nanosleep($seconds, $nanoseconds);
|
||||
if ($safeResult === false) {
|
||||
throw MiscException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param float $timestamp
|
||||
* @throws MiscException
|
||||
*
|
||||
*/
|
||||
function time_sleep_until(float $timestamp): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \time_sleep_until($timestamp);
|
||||
if ($safeResult === false) {
|
||||
throw MiscException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $format
|
||||
* @param string $string
|
||||
* @param int $offset
|
||||
* @return array
|
||||
* @throws MiscException
|
||||
*
|
||||
*/
|
||||
function unpack(string $format, string $string, int $offset = 0): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \unpack($format, $string, $offset);
|
||||
if ($safeResult === false) {
|
||||
throw MiscException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
262
vendor/thecodingmachine/safe/generated/8.4/network.php
vendored
Normal file
262
vendor/thecodingmachine/safe/generated/8.4/network.php
vendored
Normal file
@@ -0,0 +1,262 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\NetworkException;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function closelog(): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \closelog();
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $hostname
|
||||
* @param int $type
|
||||
* @param array|null $authoritative_name_servers
|
||||
* @param array|null $additional_records
|
||||
* @param bool $raw
|
||||
* @return list
|
||||
* @throws NetworkException
|
||||
*
|
||||
*/
|
||||
function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authoritative_name_servers = null, ?array &$additional_records = null, bool $raw = false): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \dns_get_record($hostname, $type, $authoritative_name_servers, $additional_records, $raw);
|
||||
if ($safeResult === false) {
|
||||
throw NetworkException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $hostname
|
||||
* @param int $port
|
||||
* @param int|null $error_code
|
||||
* @param null|string $error_message
|
||||
* @param float|null $timeout
|
||||
* @return resource
|
||||
* @throws NetworkException
|
||||
*
|
||||
*/
|
||||
function fsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ?string &$error_message = null, ?float $timeout = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($timeout !== null) {
|
||||
$safeResult = \fsockopen($hostname, $port, $error_code, $error_message, $timeout);
|
||||
} else {
|
||||
$safeResult = \fsockopen($hostname, $port, $error_code, $error_message);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw NetworkException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @throws NetworkException
|
||||
*
|
||||
*/
|
||||
function gethostname(): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gethostname();
|
||||
if ($safeResult === false) {
|
||||
throw NetworkException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $protocol
|
||||
* @return int
|
||||
* @throws NetworkException
|
||||
*
|
||||
*/
|
||||
function getprotobyname(string $protocol): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \getprotobyname($protocol);
|
||||
if ($safeResult === false) {
|
||||
throw NetworkException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $protocol
|
||||
* @return string
|
||||
* @throws NetworkException
|
||||
*
|
||||
*/
|
||||
function getprotobynumber(int $protocol): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \getprotobynumber($protocol);
|
||||
if ($safeResult === false) {
|
||||
throw NetworkException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $port
|
||||
* @param string $protocol
|
||||
* @return string
|
||||
* @throws NetworkException
|
||||
*
|
||||
*/
|
||||
function getservbyport(int $port, string $protocol): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \getservbyport($port, $protocol);
|
||||
if ($safeResult === false) {
|
||||
throw NetworkException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param callable $callback
|
||||
* @throws NetworkException
|
||||
*
|
||||
*/
|
||||
function header_register_callback(callable $callback): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \header_register_callback($callback);
|
||||
if ($safeResult === false) {
|
||||
throw NetworkException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $ip
|
||||
* @return string
|
||||
* @throws NetworkException
|
||||
*
|
||||
*/
|
||||
function inet_ntop(string $ip): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \inet_ntop($ip);
|
||||
if ($safeResult === false) {
|
||||
throw NetworkException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $ip
|
||||
* @return string
|
||||
* @throws NetworkException
|
||||
*
|
||||
*/
|
||||
function inet_pton(string $ip): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \inet_pton($ip);
|
||||
if ($safeResult === false) {
|
||||
throw NetworkException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $ip
|
||||
* @return false|string
|
||||
*
|
||||
*/
|
||||
function long2ip(int $ip)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \long2ip($ip);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws NetworkException
|
||||
*
|
||||
*/
|
||||
function net_get_interfaces(): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \net_get_interfaces();
|
||||
if ($safeResult === false) {
|
||||
throw NetworkException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $prefix
|
||||
* @param int $flags
|
||||
* @param int $facility
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function openlog(string $prefix, int $flags, int $facility): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \openlog($prefix, $flags, $facility);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $hostname
|
||||
* @param int $port
|
||||
* @param int|null $error_code
|
||||
* @param null|string $error_message
|
||||
* @param float|null $timeout
|
||||
* @return resource
|
||||
* @throws NetworkException
|
||||
*
|
||||
*/
|
||||
function pfsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ?string &$error_message = null, ?float $timeout = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($timeout !== null) {
|
||||
$safeResult = \pfsockopen($hostname, $port, $error_code, $error_message, $timeout);
|
||||
} else {
|
||||
$safeResult = \pfsockopen($hostname, $port, $error_code, $error_message);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw NetworkException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $priority
|
||||
* @param string $message
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function syslog(int $priority, string $message): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \syslog($priority, $message);
|
||||
return $safeResult;
|
||||
}
|
||||
1009
vendor/thecodingmachine/safe/generated/8.4/openssl.php
vendored
Normal file
1009
vendor/thecodingmachine/safe/generated/8.4/openssl.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
147
vendor/thecodingmachine/safe/generated/8.4/outcontrol.php
vendored
Normal file
147
vendor/thecodingmachine/safe/generated/8.4/outcontrol.php
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\OutcontrolException;
|
||||
|
||||
/**
|
||||
* @throws OutcontrolException
|
||||
*
|
||||
*/
|
||||
function ob_clean(): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ob_clean();
|
||||
if ($safeResult === false) {
|
||||
throw OutcontrolException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @throws OutcontrolException
|
||||
*
|
||||
*/
|
||||
function ob_end_clean(): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ob_end_clean();
|
||||
if ($safeResult === false) {
|
||||
throw OutcontrolException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @throws OutcontrolException
|
||||
*
|
||||
*/
|
||||
function ob_end_flush(): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ob_end_flush();
|
||||
if ($safeResult === false) {
|
||||
throw OutcontrolException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @throws OutcontrolException
|
||||
*
|
||||
*/
|
||||
function ob_flush(): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ob_flush();
|
||||
if ($safeResult === false) {
|
||||
throw OutcontrolException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @throws OutcontrolException
|
||||
*
|
||||
*/
|
||||
function ob_get_clean(): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ob_get_clean();
|
||||
if ($safeResult === false) {
|
||||
throw OutcontrolException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @throws OutcontrolException
|
||||
*
|
||||
*/
|
||||
function ob_get_flush(): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \ob_get_flush();
|
||||
if ($safeResult === false) {
|
||||
throw OutcontrolException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array|callable|null|string $callback
|
||||
* @param int $chunk_size
|
||||
* @param int $flags
|
||||
* @throws OutcontrolException
|
||||
*
|
||||
*/
|
||||
function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($flags !== PHP_OUTPUT_HANDLER_STDFLAGS) {
|
||||
$safeResult = \ob_start($callback, $chunk_size, $flags);
|
||||
} elseif ($chunk_size !== 0) {
|
||||
$safeResult = \ob_start($callback, $chunk_size);
|
||||
} elseif ($callback !== null) {
|
||||
$safeResult = \ob_start($callback);
|
||||
} else {
|
||||
$safeResult = \ob_start();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw OutcontrolException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
* @throws OutcontrolException
|
||||
*
|
||||
*/
|
||||
function output_add_rewrite_var(string $name, string $value): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \output_add_rewrite_var($name, $value);
|
||||
if ($safeResult === false) {
|
||||
throw OutcontrolException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @throws OutcontrolException
|
||||
*
|
||||
*/
|
||||
function output_reset_rewrite_vars(): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \output_reset_rewrite_vars();
|
||||
if ($safeResult === false) {
|
||||
throw OutcontrolException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
793
vendor/thecodingmachine/safe/generated/8.4/pgsql.php
vendored
Normal file
793
vendor/thecodingmachine/safe/generated/8.4/pgsql.php
vendored
Normal file
@@ -0,0 +1,793 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\PgsqlException;
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_cancel_query(\PgSql\Connection $connection): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_cancel_query($connection);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $connection_string
|
||||
* @param int $flags
|
||||
* @return \PgSql\Connection
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_connect(string $connection_string, int $flags = 0): \PgSql\Connection
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_connect($connection_string, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_connection_reset(\PgSql\Connection $connection): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_connection_reset($connection);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $table_name
|
||||
* @param array $values
|
||||
* @param int $flags
|
||||
* @return array
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_convert(\PgSql\Connection $connection, string $table_name, array $values, int $flags = 0): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_convert($connection, $table_name, $values, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $table_name
|
||||
* @param array $rows
|
||||
* @param string $separator
|
||||
* @param string $null_as
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_copy_from(\PgSql\Connection $connection, string $table_name, array $rows, string $separator = "\t", string $null_as = "\\\\N"): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_copy_from($connection, $table_name, $rows, $separator, $null_as);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $table_name
|
||||
* @param string $separator
|
||||
* @param string $null_as
|
||||
* @return array
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_copy_to(\PgSql\Connection $connection, string $table_name, string $separator = "\t", string $null_as = "\\\\N"): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_copy_to($connection, $table_name, $separator, $null_as);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $table_name
|
||||
* @param array $conditions
|
||||
* @param int $flags
|
||||
* @return mixed
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_delete(\PgSql\Connection $connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_delete($connection, $table_name, $conditions, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection|null $connection
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_end_copy(?\PgSql\Connection $connection = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($connection !== null) {
|
||||
$safeResult = \pg_end_copy($connection);
|
||||
} else {
|
||||
$safeResult = \pg_end_copy();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $stmtname
|
||||
* @param array $params
|
||||
* @return \PgSql\Result
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_execute(?\PgSql\Connection $connection = null, ?string $stmtname = null, ?array $params = null): \PgSql\Result
|
||||
{
|
||||
error_clear_last();
|
||||
if ($params !== null) {
|
||||
$safeResult = \pg_execute($connection, $stmtname, $params);
|
||||
} elseif ($stmtname !== null) {
|
||||
$safeResult = \pg_execute($connection, $stmtname);
|
||||
} elseif ($connection !== null) {
|
||||
$safeResult = \pg_execute($connection);
|
||||
} else {
|
||||
$safeResult = \pg_execute();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Result $result
|
||||
* @param string $field
|
||||
* @return int
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_field_num(\PgSql\Result $result, string $field): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_field_num($result, $field);
|
||||
if ($safeResult === -1) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Result $result
|
||||
* @param int $field
|
||||
* @param bool $oid_only
|
||||
* @return mixed
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_field_table(\PgSql\Result $result, int $field, bool $oid_only = false)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_field_table($result, $field, $oid_only);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @return mixed
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_flush(\PgSql\Connection $connection)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_flush($connection);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Result $result
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_free_result(\PgSql\Result $result): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_free_result($result);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection|null $connection
|
||||
* @return string
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_host(?\PgSql\Connection $connection = null): string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($connection !== null) {
|
||||
$safeResult = \pg_host($connection);
|
||||
} else {
|
||||
$safeResult = \pg_host();
|
||||
}
|
||||
if ($safeResult === '') {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $table_name
|
||||
* @param array $values
|
||||
* @param int $flags
|
||||
* @return mixed
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_insert(\PgSql\Connection $connection, string $table_name, array $values, int $flags = PGSQL_DML_EXEC)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_insert($connection, $table_name, $values, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Result $result
|
||||
* @return string
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_last_oid(\PgSql\Result $result): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_last_oid($result);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Lob $lob
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_lo_close(\PgSql\Lob $lob): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_lo_close($lob);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param int $oid
|
||||
* @param string $pathname
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_lo_export(?\PgSql\Connection $connection = null, ?int $oid = null, ?string $pathname = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($pathname !== null) {
|
||||
$safeResult = \pg_lo_export($connection, $oid, $pathname);
|
||||
} elseif ($oid !== null) {
|
||||
$safeResult = \pg_lo_export($connection, $oid);
|
||||
} elseif ($connection !== null) {
|
||||
$safeResult = \pg_lo_export($connection);
|
||||
} else {
|
||||
$safeResult = \pg_lo_export();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $pathname
|
||||
* @param $object_id
|
||||
* @return int
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_lo_import(?\PgSql\Connection $connection = null, ?string $pathname = null, $object_id = null): int
|
||||
{
|
||||
error_clear_last();
|
||||
if ($object_id !== null) {
|
||||
$safeResult = \pg_lo_import($connection, $pathname, $object_id);
|
||||
} elseif ($pathname !== null) {
|
||||
$safeResult = \pg_lo_import($connection, $pathname);
|
||||
} elseif ($connection !== null) {
|
||||
$safeResult = \pg_lo_import($connection);
|
||||
} else {
|
||||
$safeResult = \pg_lo_import();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param int $oid
|
||||
* @param string $mode
|
||||
* @return \PgSql\Lob
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_lo_open(\PgSql\Connection $connection, int $oid, string $mode): \PgSql\Lob
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_lo_open($connection, $oid, $mode);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Lob $lob
|
||||
* @param int $length
|
||||
* @return string
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_lo_read(\PgSql\Lob $lob, int $length = 8192): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_lo_read($lob, $length);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Lob $lob
|
||||
* @param int $offset
|
||||
* @param int $whence
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_lo_seek(\PgSql\Lob $lob, int $offset, int $whence = SEEK_CUR): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_lo_seek($lob, $offset, $whence);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Lob $lob
|
||||
* @param int $size
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_lo_truncate(\PgSql\Lob $lob, int $size): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_lo_truncate($lob, $size);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param int $oid
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_lo_unlink(\PgSql\Connection $connection, int $oid): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_lo_unlink($connection, $oid);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Lob $lob
|
||||
* @param string $data
|
||||
* @param int|null $length
|
||||
* @return int
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_lo_write(\PgSql\Lob $lob, string $data, ?int $length = null): int
|
||||
{
|
||||
error_clear_last();
|
||||
if ($length !== null) {
|
||||
$safeResult = \pg_lo_write($lob, $data, $length);
|
||||
} else {
|
||||
$safeResult = \pg_lo_write($lob, $data);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $table_name
|
||||
* @param bool $extended
|
||||
* @return array
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_meta_data(\PgSql\Connection $connection, string $table_name, bool $extended = false): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_meta_data($connection, $table_name, $extended);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $param_name
|
||||
* @return string
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_parameter_status(?\PgSql\Connection $connection = null, ?string $param_name = null): string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($param_name !== null) {
|
||||
$safeResult = \pg_parameter_status($connection, $param_name);
|
||||
} elseif ($connection !== null) {
|
||||
$safeResult = \pg_parameter_status($connection);
|
||||
} else {
|
||||
$safeResult = \pg_parameter_status();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $connection_string
|
||||
* @param int $flags
|
||||
* @return \PgSql\Connection
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_pconnect(string $connection_string, int $flags = 0): \PgSql\Connection
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_pconnect($connection_string, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection|null $connection
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_ping(?\PgSql\Connection $connection = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($connection !== null) {
|
||||
$safeResult = \pg_ping($connection);
|
||||
} else {
|
||||
$safeResult = \pg_ping();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $stmtname
|
||||
* @param string $query
|
||||
* @return \PgSql\Result
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_prepare(?\PgSql\Connection $connection = null, ?string $stmtname = null, ?string $query = null): \PgSql\Result
|
||||
{
|
||||
error_clear_last();
|
||||
if ($query !== null) {
|
||||
$safeResult = \pg_prepare($connection, $stmtname, $query);
|
||||
} elseif ($stmtname !== null) {
|
||||
$safeResult = \pg_prepare($connection, $stmtname);
|
||||
} elseif ($connection !== null) {
|
||||
$safeResult = \pg_prepare($connection);
|
||||
} else {
|
||||
$safeResult = \pg_prepare();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $data
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_put_line(?\PgSql\Connection $connection = null, ?string $data = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($data !== null) {
|
||||
$safeResult = \pg_put_line($connection, $data);
|
||||
} elseif ($connection !== null) {
|
||||
$safeResult = \pg_put_line($connection);
|
||||
} else {
|
||||
$safeResult = \pg_put_line();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $query
|
||||
* @param array $params
|
||||
* @return \PgSql\Result
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_query_params(?\PgSql\Connection $connection = null, ?string $query = null, ?array $params = null): \PgSql\Result
|
||||
{
|
||||
error_clear_last();
|
||||
if ($params !== null) {
|
||||
$safeResult = \pg_query_params($connection, $query, $params);
|
||||
} elseif ($query !== null) {
|
||||
$safeResult = \pg_query_params($connection, $query);
|
||||
} elseif ($connection !== null) {
|
||||
$safeResult = \pg_query_params($connection);
|
||||
} else {
|
||||
$safeResult = \pg_query_params();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $query
|
||||
* @return \PgSql\Result
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_query(?\PgSql\Connection $connection = null, ?string $query = null): \PgSql\Result
|
||||
{
|
||||
error_clear_last();
|
||||
if ($query !== null) {
|
||||
$safeResult = \pg_query($connection, $query);
|
||||
} elseif ($connection !== null) {
|
||||
$safeResult = \pg_query($connection);
|
||||
} else {
|
||||
$safeResult = \pg_query();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Result $result
|
||||
* @param int $field_code
|
||||
* @return null|string
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_result_error_field(\PgSql\Result $result, int $field_code): ?string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_result_error_field($result, $field_code);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Result $result
|
||||
* @param int $row
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_result_seek(\PgSql\Result $result, int $row): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_result_seek($result, $row);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $table_name
|
||||
* @param array $conditions
|
||||
* @param int $flags
|
||||
* @param int $mode
|
||||
* @return mixed
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_select(\PgSql\Connection $connection, string $table_name, array $conditions = [], int $flags = PGSQL_DML_EXEC, int $mode = PGSQL_ASSOC)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_select($connection, $table_name, $conditions, $flags, $mode);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param int $size
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_set_chunked_rows_size(\PgSql\Connection $connection, int $size): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_set_chunked_rows_size($connection, $size);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @return resource
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_socket(\PgSql\Connection $connection)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_socket($connection);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @param string $mode
|
||||
* @param \PgSql\Connection|null $connection
|
||||
* @param int $trace_mode
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_trace(string $filename, string $mode = "w", ?\PgSql\Connection $connection = null, int $trace_mode = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($trace_mode !== 0) {
|
||||
$safeResult = \pg_trace($filename, $mode, $connection, $trace_mode);
|
||||
} elseif ($connection !== null) {
|
||||
$safeResult = \pg_trace($filename, $mode, $connection);
|
||||
} else {
|
||||
$safeResult = \pg_trace($filename, $mode);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \PgSql\Connection $connection
|
||||
* @param string $table_name
|
||||
* @param array $values
|
||||
* @param array $conditions
|
||||
* @param int $flags
|
||||
* @return mixed
|
||||
* @throws PgsqlException
|
||||
*
|
||||
*/
|
||||
function pg_update(\PgSql\Connection $connection, string $table_name, array $values, array $conditions, int $flags = PGSQL_DML_EXEC)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pg_update($connection, $table_name, $values, $conditions, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw PgsqlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
364
vendor/thecodingmachine/safe/generated/8.4/posix.php
vendored
Normal file
364
vendor/thecodingmachine/safe/generated/8.4/posix.php
vendored
Normal file
@@ -0,0 +1,364 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\PosixException;
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @param int $flags
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_access(string $filename, int $flags = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_access($filename, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @param int $flags
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_eaccess(string $filename, int $flags = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_eaccess($filename, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $group_id
|
||||
* @return array{name: string, passwd: string, gid: int, members: list}
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_getgrgid(int $group_id): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_getgrgid($group_id);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return array{name: string, passwd: string, gid: int, members: list}
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_getgrnam(string $name): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_getgrnam($name);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return list
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_getgroups(): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_getgroups();
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_getlogin(): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_getlogin();
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $user_id
|
||||
* @return array{name: string, passwd: string, uid: int, gid: int, gecos: string, dir: string, shell: string}
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_getpwuid(int $user_id): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_getpwuid($user_id);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int|null $resource
|
||||
* @return array
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_getrlimit(?int $resource = null): array
|
||||
{
|
||||
error_clear_last();
|
||||
if ($resource !== null) {
|
||||
$safeResult = \posix_getrlimit($resource);
|
||||
} else {
|
||||
$safeResult = \posix_getrlimit();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $process_id
|
||||
* @return int
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_getsid(int $process_id): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_getsid($process_id);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $username
|
||||
* @param int $group_id
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_initgroups(string $username, int $group_id): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_initgroups($username, $group_id);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $process_id
|
||||
* @param int $signal
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_kill(int $process_id, int $signal): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_kill($process_id, $signal);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @param int $permissions
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_mkfifo(string $filename, int $permissions): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_mkfifo($filename, $permissions);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @param int $flags
|
||||
* @param int $major
|
||||
* @param int $minor
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_mknod($filename, $flags, $major, $minor);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $group_id
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_setegid(int $group_id): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_setegid($group_id);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $user_id
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_seteuid(int $user_id): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_seteuid($user_id);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $group_id
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_setgid(int $group_id): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_setgid($group_id);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $process_id
|
||||
* @param int $process_group_id
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_setpgid(int $process_id, int $process_group_id): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_setpgid($process_id, $process_group_id);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $resource
|
||||
* @param int $soft_limit
|
||||
* @param int $hard_limit
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_setrlimit($resource, $soft_limit, $hard_limit);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_setsid(): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_setsid();
|
||||
if ($safeResult === -1) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $user_id
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_setuid(int $user_id): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_setuid($user_id);
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_times(): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_times();
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws PosixException
|
||||
*
|
||||
*/
|
||||
function posix_uname(): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \posix_uname();
|
||||
if ($safeResult === false) {
|
||||
throw PosixException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
287
vendor/thecodingmachine/safe/generated/8.4/pspell.php
vendored
Normal file
287
vendor/thecodingmachine/safe/generated/8.4/pspell.php
vendored
Normal file
@@ -0,0 +1,287 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\PspellException;
|
||||
|
||||
/**
|
||||
* @param int $dictionary
|
||||
* @param string $word
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_add_to_personal(int $dictionary, string $word): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_add_to_personal($dictionary, $word);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $dictionary
|
||||
* @param string $word
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_add_to_session(int $dictionary, string $word): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_add_to_session($dictionary, $word);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $dictionary
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_clear_session(int $dictionary): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_clear_session($dictionary);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $language
|
||||
* @param string $spelling
|
||||
* @param string $jargon
|
||||
* @param string $encoding
|
||||
* @return false|int
|
||||
*
|
||||
*/
|
||||
function pspell_config_create(string $language, string $spelling = "", string $jargon = "", string $encoding = "")
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_config_create($language, $spelling, $jargon, $encoding);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $config
|
||||
* @param string $directory
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_config_data_dir(int $config, string $directory): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_config_data_dir($config, $directory);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $config
|
||||
* @param string $directory
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_config_dict_dir(int $config, string $directory): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_config_dict_dir($config, $directory);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $config
|
||||
* @param int $min_length
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_config_ignore(int $config, int $min_length): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_config_ignore($config, $min_length);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $config
|
||||
* @param int $mode
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_config_mode(int $config, int $mode): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_config_mode($config, $mode);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $config
|
||||
* @param string $filename
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_config_personal(int $config, string $filename): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_config_personal($config, $filename);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $config
|
||||
* @param string $filename
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_config_repl(int $config, string $filename): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_config_repl($config, $filename);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $config
|
||||
* @param bool $allow
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_config_runtogether(int $config, bool $allow): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_config_runtogether($config, $allow);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $config
|
||||
* @param bool $save
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_config_save_repl(int $config, bool $save): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_config_save_repl($config, $save);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $config
|
||||
* @return int
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_new_config(int $config): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_new_config($config);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @param string $language
|
||||
* @param string $spelling
|
||||
* @param string $jargon
|
||||
* @param string $encoding
|
||||
* @param int $mode
|
||||
* @return int
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_new_personal(string $filename, string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_new_personal($filename, $language, $spelling, $jargon, $encoding, $mode);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $language
|
||||
* @param string $spelling
|
||||
* @param string $jargon
|
||||
* @param string $encoding
|
||||
* @param int $mode
|
||||
* @return int
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_new($language, $spelling, $jargon, $encoding, $mode);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $dictionary
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_save_wordlist(int $dictionary): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_save_wordlist($dictionary);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $dictionary
|
||||
* @param string $misspelled
|
||||
* @param string $correct
|
||||
* @throws PspellException
|
||||
*
|
||||
*/
|
||||
function pspell_store_replacement(int $dictionary, string $misspelled, string $correct): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pspell_store_replacement($dictionary, $misspelled, $correct);
|
||||
if ($safeResult === false) {
|
||||
throw PspellException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
96
vendor/thecodingmachine/safe/generated/8.4/readline.php
vendored
Normal file
96
vendor/thecodingmachine/safe/generated/8.4/readline.php
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\ReadlineException;
|
||||
|
||||
/**
|
||||
* @param string $prompt
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function readline_add_history(string $prompt): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \readline_add_history($prompt);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $prompt
|
||||
* @param callable $callback
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function readline_callback_handler_install(string $prompt, callable $callback): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \readline_callback_handler_install($prompt, $callback);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function readline_clear_history(): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \readline_clear_history();
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param callable $callback
|
||||
* @throws ReadlineException
|
||||
*
|
||||
*/
|
||||
function readline_completion_function(callable $callback): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \readline_completion_function($callback);
|
||||
if ($safeResult === false) {
|
||||
throw ReadlineException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param null|string $filename
|
||||
* @throws ReadlineException
|
||||
*
|
||||
*/
|
||||
function readline_read_history(?string $filename = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($filename !== null) {
|
||||
$safeResult = \readline_read_history($filename);
|
||||
} else {
|
||||
$safeResult = \readline_read_history();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw ReadlineException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param null|string $filename
|
||||
* @throws ReadlineException
|
||||
*
|
||||
*/
|
||||
function readline_write_history(?string $filename = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($filename !== null) {
|
||||
$safeResult = \readline_write_history($filename);
|
||||
} else {
|
||||
$safeResult = \readline_write_history();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw ReadlineException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
1116
vendor/thecodingmachine/safe/generated/8.4/rector-migrate.php
vendored
Normal file
1116
vendor/thecodingmachine/safe/generated/8.4/rector-migrate.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
489
vendor/thecodingmachine/safe/generated/8.4/sockets.php
vendored
Normal file
489
vendor/thecodingmachine/safe/generated/8.4/sockets.php
vendored
Normal file
@@ -0,0 +1,489 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\SocketsException;
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @return \Socket
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_accept(\Socket $socket): \Socket
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_accept($socket);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \AddressInfo $address
|
||||
* @return \Socket
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_addrinfo_bind(\AddressInfo $address): \Socket
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_addrinfo_bind($address);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \AddressInfo $address
|
||||
* @return \Socket
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_addrinfo_connect(\AddressInfo $address): \Socket
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_addrinfo_connect($address);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $host
|
||||
* @param mixed $service
|
||||
* @param array $hints
|
||||
* @return \AddressInfo[]
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_addrinfo_lookup(string $host, $service = null, array $hints = []): array
|
||||
{
|
||||
error_clear_last();
|
||||
if ($hints !== []) {
|
||||
$safeResult = \socket_addrinfo_lookup($host, $service, $hints);
|
||||
} elseif ($service !== null) {
|
||||
$safeResult = \socket_addrinfo_lookup($host, $service);
|
||||
} else {
|
||||
$safeResult = \socket_addrinfo_lookup($host);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_atmark(\Socket $socket): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_atmark($socket);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param string $address
|
||||
* @param int $port
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_bind(\Socket $socket, string $address, int $port = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_bind($socket, $address, $port);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param string $address
|
||||
* @param int|null $port
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_connect(\Socket $socket, string $address, ?int $port = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($port !== null) {
|
||||
$safeResult = \socket_connect($socket, $address, $port);
|
||||
} else {
|
||||
$safeResult = \socket_connect($socket, $address);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $port
|
||||
* @param int $backlog
|
||||
* @return \Socket
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_create_listen(int $port, int $backlog = SOMAXCONN): \Socket
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_create_listen($port, $backlog);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $domain
|
||||
* @param int $type
|
||||
* @param int $protocol
|
||||
* @param \Socket[]|null $pair
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_create_pair(int $domain, int $type, int $protocol, ?array &$pair): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_create_pair($domain, $type, $protocol, $pair);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $domain
|
||||
* @param int $type
|
||||
* @param int $protocol
|
||||
* @return \Socket
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_create(int $domain, int $type, int $protocol): \Socket
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_create($domain, $type, $protocol);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @return resource
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_export_stream(\Socket $socket)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_export_stream($socket);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param int $level
|
||||
* @param int $option
|
||||
* @return mixed
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_get_option(\Socket $socket, int $level, int $option)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_get_option($socket, $level, $option);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param null|string $address
|
||||
* @param int|null $port
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_getpeername(\Socket $socket, ?string &$address, ?int &$port = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_getpeername($socket, $address, $port);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param null|string $address
|
||||
* @param int|null $port
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_getsockname(\Socket $socket, ?string &$address, ?int &$port = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_getsockname($socket, $address, $port);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @return \Socket
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_import_stream($stream): \Socket
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_import_stream($stream);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param int $backlog
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_listen(\Socket $socket, int $backlog = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_listen($socket, $backlog);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param int $length
|
||||
* @param int $mode
|
||||
* @return string
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_read(\Socket $socket, int $length, int $mode = PHP_BINARY_READ): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_read($socket, $length, $mode);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param string $data
|
||||
* @param int $length
|
||||
* @param int $flags
|
||||
* @return int
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_send(\Socket $socket, string $data, int $length, int $flags): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_send($socket, $data, $length, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param array $message
|
||||
* @param int $flags
|
||||
* @return int
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_sendmsg(\Socket $socket, array $message, int $flags = 0): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_sendmsg($socket, $message, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param string $data
|
||||
* @param int $length
|
||||
* @param int $flags
|
||||
* @param string $address
|
||||
* @param int|null $port
|
||||
* @return int
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_sendto(\Socket $socket, string $data, int $length, int $flags, string $address, ?int $port = null): int
|
||||
{
|
||||
error_clear_last();
|
||||
if ($port !== null) {
|
||||
$safeResult = \socket_sendto($socket, $data, $length, $flags, $address, $port);
|
||||
} else {
|
||||
$safeResult = \socket_sendto($socket, $data, $length, $flags, $address);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_set_block(\Socket $socket): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_set_block($socket);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_set_nonblock(\Socket $socket): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_set_nonblock($socket);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param int $level
|
||||
* @param int $option
|
||||
* @param array|int|string $value
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_set_option(\Socket $socket, int $level, int $option, $value): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_set_option($socket, $level, $option, $value);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param int $mode
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_shutdown(\Socket $socket, int $mode = 2): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_shutdown($socket, $mode);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Socket $socket
|
||||
* @param int $process_id
|
||||
* @return string
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_wsaprotocol_info_export(\Socket $socket, int $process_id): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_wsaprotocol_info_export($socket, $process_id);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $info_id
|
||||
* @return \Socket
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_wsaprotocol_info_import(string $info_id): \Socket
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_wsaprotocol_info_import($info_id);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $info_id
|
||||
* @throws SocketsException
|
||||
*
|
||||
*/
|
||||
function socket_wsaprotocol_info_release(string $info_id): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \socket_wsaprotocol_info_release($info_id);
|
||||
if ($safeResult === false) {
|
||||
throw SocketsException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
326
vendor/thecodingmachine/safe/generated/8.4/sodium.php
vendored
Normal file
326
vendor/thecodingmachine/safe/generated/8.4/sodium.php
vendored
Normal file
@@ -0,0 +1,326 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\SodiumException;
|
||||
|
||||
/**
|
||||
* @param string $ciphertext
|
||||
* @param string $additional_data
|
||||
* @param string $nonce
|
||||
* @param string $key
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_aead_aegis128l_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_aead_aegis128l_decrypt($ciphertext, $additional_data, $nonce, $key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $ciphertext
|
||||
* @param string $additional_data
|
||||
* @param string $nonce
|
||||
* @param string $key
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_aead_aegis256_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_aead_aegis256_decrypt($ciphertext, $additional_data, $nonce, $key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $ciphertext
|
||||
* @param string $additional_data
|
||||
* @param string $nonce
|
||||
* @param string $key
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_aead_aes256gcm_decrypt($ciphertext, $additional_data, $nonce, $key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $ciphertext
|
||||
* @param string $additional_data
|
||||
* @param string $nonce
|
||||
* @param string $key
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, $additional_data, $nonce, $key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
* @param string $additional_data
|
||||
* @param string $nonce
|
||||
* @param string $key
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $additional_data, string $nonce, string $key): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_aead_chacha20poly1305_encrypt($message, $additional_data, $nonce, $key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $ciphertext
|
||||
* @param string $additional_data
|
||||
* @param string $nonce
|
||||
* @param string $key
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_aead_chacha20poly1305_ietf_decrypt($ciphertext, $additional_data, $nonce, $key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
* @param string $additional_data
|
||||
* @param string $nonce
|
||||
* @param string $key
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_aead_chacha20poly1305_ietf_encrypt($message, $additional_data, $nonce, $key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $ciphertext
|
||||
* @param string $additional_data
|
||||
* @param string $nonce
|
||||
* @param string $key
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, $additional_data, $nonce, $key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
* @param string $additional_data
|
||||
* @param string $nonce
|
||||
* @param string $key
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_aead_xchacha20poly1305_ietf_encrypt($message, $additional_data, $nonce, $key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $mac
|
||||
* @param string $message
|
||||
* @param string $key
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_auth_verify(string $mac, string $message, string $key): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_auth_verify($mac, $message, $key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $ciphertext
|
||||
* @param string $nonce
|
||||
* @param string $key_pair
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_pair): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_box_open($ciphertext, $nonce, $key_pair);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $ciphertext
|
||||
* @param string $key_pair
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_box_seal_open($ciphertext, $key_pair);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param non-empty-string $state
|
||||
* @param string $message
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_generichash_update(string &$state, string $message): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_generichash_update($state, $message);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $ciphertext
|
||||
* @param string $nonce
|
||||
* @param string $key
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string $key): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_secretbox_open($ciphertext, $nonce, $key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $signed_message
|
||||
* @param non-empty-string $public_key
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_sign_open(string $signed_message, string $public_key): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_sign_open($signed_message, $public_key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param non-empty-string $signature
|
||||
* @param string $message
|
||||
* @param non-empty-string $public_key
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_sign_verify_detached(string $signature, string $message, string $public_key): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_sign_verify_detached($signature, $message, $public_key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
* @param string $nonce
|
||||
* @param int $counter
|
||||
* @param string $key
|
||||
* @return string
|
||||
* @throws SodiumException
|
||||
*
|
||||
*/
|
||||
function sodium_crypto_stream_xchacha20_xor_ic(string $message, string $nonce, int $counter, string $key): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \sodium_crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key);
|
||||
if ($safeResult === false) {
|
||||
throw SodiumException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
490
vendor/thecodingmachine/safe/generated/8.4/stream.php
vendored
Normal file
490
vendor/thecodingmachine/safe/generated/8.4/stream.php
vendored
Normal file
@@ -0,0 +1,490 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\StreamException;
|
||||
|
||||
/**
|
||||
* @param resource $context
|
||||
* @param array $options
|
||||
* @return true
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_context_set_options($context, array $options): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_context_set_options($context, $options);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $context
|
||||
* @param array $params
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_context_set_params($context, array $params): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_context_set_params($context, $params);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $from
|
||||
* @param resource $to
|
||||
* @param int|null $length
|
||||
* @param int $offset
|
||||
* @return int
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_copy_to_stream($from, $to, ?int $length = null, int $offset = 0): int
|
||||
{
|
||||
error_clear_last();
|
||||
if ($offset !== 0) {
|
||||
$safeResult = \stream_copy_to_stream($from, $to, $length, $offset);
|
||||
} elseif ($length !== null) {
|
||||
$safeResult = \stream_copy_to_stream($from, $to, $length);
|
||||
} else {
|
||||
$safeResult = \stream_copy_to_stream($from, $to);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @param string $filtername
|
||||
* @param int $read_write
|
||||
* @param mixed $params
|
||||
* @return resource
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_filter_append($stream, string $filtername, ?int $read_write = null, $params = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($params !== null) {
|
||||
$safeResult = \stream_filter_append($stream, $filtername, $read_write, $params);
|
||||
} elseif ($read_write !== null) {
|
||||
$safeResult = \stream_filter_append($stream, $filtername, $read_write);
|
||||
} else {
|
||||
$safeResult = \stream_filter_append($stream, $filtername);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @param string $filtername
|
||||
* @param int $read_write
|
||||
* @param mixed $params
|
||||
* @return resource
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_filter_prepend($stream, string $filtername, ?int $read_write = null, $params = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($params !== null) {
|
||||
$safeResult = \stream_filter_prepend($stream, $filtername, $read_write, $params);
|
||||
} elseif ($read_write !== null) {
|
||||
$safeResult = \stream_filter_prepend($stream, $filtername, $read_write);
|
||||
} else {
|
||||
$safeResult = \stream_filter_prepend($stream, $filtername);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $filter_name
|
||||
* @param string $class
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_filter_register(string $filter_name, string $class): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_filter_register($filter_name, $class);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream_filter
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_filter_remove($stream_filter): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_filter_remove($stream_filter);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @param int|null $length
|
||||
* @param int $offset
|
||||
* @return string
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_get_contents($stream, ?int $length = null, int $offset = -1): string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($offset !== -1) {
|
||||
$safeResult = \stream_get_contents($stream, $length, $offset);
|
||||
} elseif ($length !== null) {
|
||||
$safeResult = \stream_get_contents($stream, $length);
|
||||
} else {
|
||||
$safeResult = \stream_get_contents($stream);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @param int $length
|
||||
* @param string $ending
|
||||
* @return string
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_get_line($stream, int $length, string $ending = ""): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_get_line($stream, $length, $ending);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_isatty($stream): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_isatty($stream);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @return string
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_resolve_include_path(string $filename): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_resolve_include_path($filename);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @param bool $enable
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_set_blocking($stream, bool $enable): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_set_blocking($stream, $enable);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @param int $seconds
|
||||
* @param int $microseconds
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_set_timeout($stream, int $seconds, int $microseconds = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_set_timeout($stream, $seconds, $microseconds);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $socket
|
||||
* @param float|null $timeout
|
||||
* @param null|string $peer_name
|
||||
* @return resource
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_socket_accept($socket, ?float $timeout = null, ?string &$peer_name = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($peer_name !== null) {
|
||||
$safeResult = \stream_socket_accept($socket, $timeout, $peer_name);
|
||||
} elseif ($timeout !== null) {
|
||||
$safeResult = \stream_socket_accept($socket, $timeout);
|
||||
} else {
|
||||
$safeResult = \stream_socket_accept($socket);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $address
|
||||
* @param int|null $error_code
|
||||
* @param null|string $error_message
|
||||
* @param float|null $timeout
|
||||
* @param int-mask $flags
|
||||
* @param null|resource $context
|
||||
* @return resource
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_socket_client(string $address, ?int &$error_code = null, ?string &$error_message = null, ?float $timeout = null, int $flags = STREAM_CLIENT_CONNECT, $context = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($context !== null) {
|
||||
$safeResult = \stream_socket_client($address, $error_code, $error_message, $timeout, $flags, $context);
|
||||
} elseif ($flags !== STREAM_CLIENT_CONNECT) {
|
||||
$safeResult = \stream_socket_client($address, $error_code, $error_message, $timeout, $flags);
|
||||
} elseif ($timeout !== null) {
|
||||
$safeResult = \stream_socket_client($address, $error_code, $error_message, $timeout);
|
||||
} else {
|
||||
$safeResult = \stream_socket_client($address, $error_code, $error_message);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $socket
|
||||
* @param bool $remote
|
||||
* @return string
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_socket_get_name($socket, bool $remote): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_socket_get_name($socket, $remote);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $domain
|
||||
* @param int $type
|
||||
* @param int $protocol
|
||||
* @return resource[]
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_socket_pair(int $domain, int $type, int $protocol): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_socket_pair($domain, $type, $protocol);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $socket
|
||||
* @param int $length
|
||||
* @param int $flags
|
||||
* @param null|string $address
|
||||
* @return string
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_socket_recvfrom($socket, int $length, int $flags = 0, ?string &$address = null): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_socket_recvfrom($socket, $length, $flags, $address);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $socket
|
||||
* @param string $data
|
||||
* @param int $flags
|
||||
* @param string $address
|
||||
* @return int
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_socket_sendto($socket, string $data, int $flags = 0, string $address = ""): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_socket_sendto($socket, $data, $flags, $address);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $address
|
||||
* @param int|null $error_code
|
||||
* @param null|string $error_message
|
||||
* @param int $flags
|
||||
* @param null|resource $context
|
||||
* @return resource
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_socket_server(string $address, ?int &$error_code = null, ?string &$error_message = null, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($context !== null) {
|
||||
$safeResult = \stream_socket_server($address, $error_code, $error_message, $flags, $context);
|
||||
} else {
|
||||
$safeResult = \stream_socket_server($address, $error_code, $error_message, $flags);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @param int $mode
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_socket_shutdown($stream, int $mode): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_socket_shutdown($stream, $mode);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_supports_lock($stream): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_supports_lock($stream);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $protocol
|
||||
* @param string $class
|
||||
* @param int $flags
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_wrapper_register(string $protocol, string $class, int $flags = 0): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_wrapper_register($protocol, $class, $flags);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $protocol
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_wrapper_restore(string $protocol): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_wrapper_restore($protocol);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $protocol
|
||||
* @throws StreamException
|
||||
*
|
||||
*/
|
||||
function stream_wrapper_unregister(string $protocol): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \stream_wrapper_unregister($protocol);
|
||||
if ($safeResult === false) {
|
||||
throw StreamException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
627
vendor/thecodingmachine/safe/generated/8.4/uodbc.php
vendored
Normal file
627
vendor/thecodingmachine/safe/generated/8.4/uodbc.php
vendored
Normal file
@@ -0,0 +1,627 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\UodbcException;
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param bool|null $enable
|
||||
* @return mixed
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_autocommit(\Odbc\Connection $odbc, ?bool $enable = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($enable !== null) {
|
||||
$safeResult = \odbc_autocommit($odbc, $enable);
|
||||
} else {
|
||||
$safeResult = \odbc_autocommit($odbc);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $statement
|
||||
* @param int $mode
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function odbc_binmode(int $statement, int $mode): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_binmode($statement, $mode);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param string $catalog
|
||||
* @param string $schema
|
||||
* @param string $table
|
||||
* @param string $column
|
||||
* @return \Odbc\Result|false
|
||||
*
|
||||
*/
|
||||
function odbc_columnprivileges(\Odbc\Connection $odbc, string $catalog, string $schema, string $table, string $column)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_columnprivileges($odbc, $catalog, $schema, $table, $column);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param null|string $catalog
|
||||
* @param null|string $schema
|
||||
* @param null|string $table
|
||||
* @param null|string $column
|
||||
* @return \Odbc\Result|false
|
||||
*
|
||||
*/
|
||||
function odbc_columns(\Odbc\Connection $odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $column = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($column !== null) {
|
||||
$safeResult = \odbc_columns($odbc, $catalog, $schema, $table, $column);
|
||||
} elseif ($table !== null) {
|
||||
$safeResult = \odbc_columns($odbc, $catalog, $schema, $table);
|
||||
} elseif ($schema !== null) {
|
||||
$safeResult = \odbc_columns($odbc, $catalog, $schema);
|
||||
} elseif ($catalog !== null) {
|
||||
$safeResult = \odbc_columns($odbc, $catalog);
|
||||
} else {
|
||||
$safeResult = \odbc_columns($odbc);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_commit(\Odbc\Connection $odbc): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_commit($odbc);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $dsn
|
||||
* @param string $user
|
||||
* @param string $password
|
||||
* @param int $cursor_option
|
||||
* @return \Odbc\Connection
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_connect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER): \Odbc\Connection
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_connect($dsn, $user, $password, $cursor_option);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Result $statement
|
||||
* @return string
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_cursor(\Odbc\Result $statement): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_cursor($statement);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param int $fetch_type
|
||||
* @return array
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_data_source(\Odbc\Connection $odbc, int $fetch_type): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_data_source($odbc, $fetch_type);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param string $query
|
||||
* @return \Odbc\Result
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_exec(\Odbc\Connection $odbc, string $query): \Odbc\Result
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_exec($odbc, $query);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Result $statement
|
||||
* @param array $params
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_execute(\Odbc\Result $statement, array $params = []): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_execute($statement, $params);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Result $statement
|
||||
* @param array|null $array
|
||||
* @param int|null $row
|
||||
* @return int
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_fetch_into(\Odbc\Result $statement, ?array &$array, ?int $row = null): int
|
||||
{
|
||||
error_clear_last();
|
||||
if ($row !== null) {
|
||||
$safeResult = \odbc_fetch_into($statement, $array, $row);
|
||||
} else {
|
||||
$safeResult = \odbc_fetch_into($statement, $array);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Result $statement
|
||||
* @param int $field
|
||||
* @return int
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_field_len(\Odbc\Result $statement, int $field): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_field_len($statement, $field);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Result $statement
|
||||
* @param int $field
|
||||
* @return string
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_field_name(\Odbc\Result $statement, int $field): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_field_name($statement, $field);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Result $statement
|
||||
* @param string $field
|
||||
* @return int
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_field_num(\Odbc\Result $statement, string $field): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_field_num($statement, $field);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Result $statement
|
||||
* @param int $field
|
||||
* @return int
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_field_scale(\Odbc\Result $statement, int $field): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_field_scale($statement, $field);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Result $statement
|
||||
* @param int $field
|
||||
* @return string
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_field_type(\Odbc\Result $statement, int $field): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_field_type($statement, $field);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param string $pk_catalog
|
||||
* @param string $pk_schema
|
||||
* @param string $pk_table
|
||||
* @param string $fk_catalog
|
||||
* @param string $fk_schema
|
||||
* @param string $fk_table
|
||||
* @return \Odbc\Result|false
|
||||
*
|
||||
*/
|
||||
function odbc_foreignkeys(\Odbc\Connection $odbc, string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_foreignkeys($odbc, $pk_catalog, $pk_schema, $pk_table, $fk_catalog, $fk_schema, $fk_table);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param int $data_type
|
||||
* @return \Odbc\Result|false
|
||||
*
|
||||
*/
|
||||
function odbc_gettypeinfo(\Odbc\Connection $odbc, int $data_type = 0)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_gettypeinfo($odbc, $data_type);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Result $statement
|
||||
* @param int $length
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function odbc_longreadlen(\Odbc\Result $statement, int $length): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_longreadlen($statement, $length);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Result $statement
|
||||
* @return int
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_num_fields(\Odbc\Result $statement): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_num_fields($statement);
|
||||
if ($safeResult === -1) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $dsn
|
||||
* @param string $user
|
||||
* @param string $password
|
||||
* @param int $cursor_option
|
||||
* @return \Odbc\Connection
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER): \Odbc\Connection
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_pconnect($dsn, $user, $password, $cursor_option);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param string $query
|
||||
* @return \Odbc\Result
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_prepare(\Odbc\Connection $odbc, string $query): \Odbc\Result
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_prepare($odbc, $query);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param string $catalog
|
||||
* @param string $schema
|
||||
* @param string $table
|
||||
* @return \Odbc\Result|false
|
||||
*
|
||||
*/
|
||||
function odbc_primarykeys(\Odbc\Connection $odbc, string $catalog, string $schema, string $table)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_primarykeys($odbc, $catalog, $schema, $table);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $odbc
|
||||
* @param null|string $catalog
|
||||
* @param null|string $schema
|
||||
* @param null|string $procedure
|
||||
* @param null|string $column
|
||||
* @return \Odbc\Result|false
|
||||
*
|
||||
*/
|
||||
function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null, ?string $column = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($column !== null) {
|
||||
$safeResult = \odbc_procedurecolumns($odbc, $catalog, $schema, $procedure, $column);
|
||||
} elseif ($procedure !== null) {
|
||||
$safeResult = \odbc_procedurecolumns($odbc, $catalog, $schema, $procedure);
|
||||
} elseif ($schema !== null) {
|
||||
$safeResult = \odbc_procedurecolumns($odbc, $catalog, $schema);
|
||||
} elseif ($catalog !== null) {
|
||||
$safeResult = \odbc_procedurecolumns($odbc, $catalog);
|
||||
} else {
|
||||
$safeResult = \odbc_procedurecolumns($odbc);
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $odbc
|
||||
* @param null|string $catalog
|
||||
* @param null|string $schema
|
||||
* @param null|string $procedure
|
||||
* @return \Odbc\Result
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_procedures($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null): \Odbc\Result
|
||||
{
|
||||
error_clear_last();
|
||||
if ($procedure !== null) {
|
||||
$safeResult = \odbc_procedures($odbc, $catalog, $schema, $procedure);
|
||||
} elseif ($schema !== null) {
|
||||
$safeResult = \odbc_procedures($odbc, $catalog, $schema);
|
||||
} elseif ($catalog !== null) {
|
||||
$safeResult = \odbc_procedures($odbc, $catalog);
|
||||
} else {
|
||||
$safeResult = \odbc_procedures($odbc);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Result $statement
|
||||
* @param string $format
|
||||
* @return int
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_result_all(\Odbc\Result $statement, string $format = ""): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_result_all($statement, $format);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Result $statement
|
||||
* @param mixed $field
|
||||
* @return mixed
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_result(\Odbc\Result $statement, $field)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_result($statement, $field);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_rollback(\Odbc\Connection $odbc): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_rollback($odbc);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection|\Odbc\Result $odbc
|
||||
* @param int $which
|
||||
* @param int $option
|
||||
* @param int $value
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_setoption($odbc, int $which, int $option, int $value): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_setoption($odbc, $which, $option, $value);
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param int $type
|
||||
* @param string $catalog
|
||||
* @param string $schema
|
||||
* @param string $table
|
||||
* @param int $scope
|
||||
* @param int $nullable
|
||||
* @return \Odbc\Result|false
|
||||
*
|
||||
*/
|
||||
function odbc_specialcolumns(\Odbc\Connection $odbc, int $type, string $catalog, string $schema, string $table, int $scope, int $nullable)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_specialcolumns($odbc, $type, $catalog, $schema, $table, $scope, $nullable);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param string $catalog
|
||||
* @param string $schema
|
||||
* @param string $table
|
||||
* @param int $unique
|
||||
* @param int $accuracy
|
||||
* @return \Odbc\Result|false
|
||||
*
|
||||
*/
|
||||
function odbc_statistics(\Odbc\Connection $odbc, string $catalog, string $schema, string $table, int $unique, int $accuracy)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_statistics($odbc, $catalog, $schema, $table, $unique, $accuracy);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param string $catalog
|
||||
* @param string $schema
|
||||
* @param string $table
|
||||
* @return \Odbc\Result|false
|
||||
*
|
||||
*/
|
||||
function odbc_tableprivileges(\Odbc\Connection $odbc, string $catalog, string $schema, string $table)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \odbc_tableprivileges($odbc, $catalog, $schema, $table);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Odbc\Connection $odbc
|
||||
* @param null|string $catalog
|
||||
* @param null|string $schema
|
||||
* @param null|string $table
|
||||
* @param null|string $types
|
||||
* @return \Odbc\Result
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_tables(\Odbc\Connection $odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $types = null): \Odbc\Result
|
||||
{
|
||||
error_clear_last();
|
||||
if ($types !== null) {
|
||||
$safeResult = \odbc_tables($odbc, $catalog, $schema, $table, $types);
|
||||
} elseif ($table !== null) {
|
||||
$safeResult = \odbc_tables($odbc, $catalog, $schema, $table);
|
||||
} elseif ($schema !== null) {
|
||||
$safeResult = \odbc_tables($odbc, $catalog, $schema);
|
||||
} elseif ($catalog !== null) {
|
||||
$safeResult = \odbc_tables($odbc, $catalog);
|
||||
} else {
|
||||
$safeResult = \odbc_tables($odbc);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw UodbcException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
177
vendor/thecodingmachine/safe/generated/8.4/xml.php
vendored
Normal file
177
vendor/thecodingmachine/safe/generated/8.4/xml.php
vendored
Normal file
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\XmlException;
|
||||
|
||||
/**
|
||||
* @param \XMLParser $parser
|
||||
* @throws XmlException
|
||||
*
|
||||
*/
|
||||
function xml_parser_free(\XMLParser $parser): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xml_parser_free($parser);
|
||||
if ($safeResult === false) {
|
||||
throw XmlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \XMLParser $parser
|
||||
* @param int $option
|
||||
* @param mixed $value
|
||||
* @throws XmlException
|
||||
*
|
||||
*/
|
||||
function xml_parser_set_option(\XMLParser $parser, int $option, $value): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xml_parser_set_option($parser, $option, $value);
|
||||
if ($safeResult === false) {
|
||||
throw XmlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \XMLParser $parser
|
||||
* @param callable $handler
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function xml_set_character_data_handler(\XMLParser $parser, callable $handler): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xml_set_character_data_handler($parser, $handler);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \XMLParser $parser
|
||||
* @param callable $handler
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function xml_set_default_handler(\XMLParser $parser, callable $handler): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xml_set_default_handler($parser, $handler);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \XMLParser $parser
|
||||
* @param callable $start_handler
|
||||
* @param callable $end_handler
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function xml_set_element_handler(\XMLParser $parser, callable $start_handler, callable $end_handler): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xml_set_element_handler($parser, $start_handler, $end_handler);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \XMLParser $parser
|
||||
* @param callable $handler
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function xml_set_end_namespace_decl_handler(\XMLParser $parser, callable $handler): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xml_set_end_namespace_decl_handler($parser, $handler);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \XMLParser $parser
|
||||
* @param callable $handler
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function xml_set_external_entity_ref_handler(\XMLParser $parser, callable $handler): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xml_set_external_entity_ref_handler($parser, $handler);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \XMLParser $parser
|
||||
* @param callable $handler
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function xml_set_notation_decl_handler(\XMLParser $parser, callable $handler): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xml_set_notation_decl_handler($parser, $handler);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \XMLParser $parser
|
||||
* @param object $object
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function xml_set_object(\XMLParser $parser, object $object): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xml_set_object($parser, $object);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \XMLParser $parser
|
||||
* @param callable $handler
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function xml_set_processing_instruction_handler(\XMLParser $parser, callable $handler): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xml_set_processing_instruction_handler($parser, $handler);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \XMLParser $parser
|
||||
* @param callable $handler
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function xml_set_start_namespace_decl_handler(\XMLParser $parser, callable $handler): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xml_set_start_namespace_decl_handler($parser, $handler);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \XMLParser $parser
|
||||
* @param callable $handler
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
function xml_set_unparsed_entity_decl_handler(\XMLParser $parser, callable $handler): bool
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xml_set_unparsed_entity_decl_handler($parser, $handler);
|
||||
return $safeResult;
|
||||
}
|
||||
415
vendor/thecodingmachine/safe/generated/8.4/zlib.php
vendored
Normal file
415
vendor/thecodingmachine/safe/generated/8.4/zlib.php
vendored
Normal file
@@ -0,0 +1,415 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\ZlibException;
|
||||
|
||||
/**
|
||||
* @param \DeflateContext $context
|
||||
* @param string $data
|
||||
* @param int $flush_mode
|
||||
* @return string
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function deflate_add(\DeflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \deflate_add($context, $data, $flush_mode);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $encoding
|
||||
* @param array $options
|
||||
* @return \DeflateContext
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function deflate_init(int $encoding, array $options = []): \DeflateContext
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \deflate_init($encoding, $options);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzclose($stream): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gzclose($stream);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $data
|
||||
* @param int $level
|
||||
* @param int $encoding
|
||||
* @return string
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_DEFLATE): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gzcompress($data, $level, $encoding);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $data
|
||||
* @param int $max_length
|
||||
* @return string
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzdecode(string $data, int $max_length = 0): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gzdecode($data, $max_length);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $data
|
||||
* @param int $level
|
||||
* @param int $encoding
|
||||
* @return string
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_RAW): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gzdeflate($data, $level, $encoding);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $data
|
||||
* @param int $level
|
||||
* @param int $encoding
|
||||
* @return string
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_GZIP): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gzencode($data, $level, $encoding);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @param $use_include_path
|
||||
* @return list
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzfile(string $filename, $use_include_path = 0): array
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gzfile($filename, $use_include_path);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @param int|null $length
|
||||
* @return string
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzgets($stream, ?int $length = null): string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($length !== null) {
|
||||
$safeResult = \gzgets($stream, $length);
|
||||
} else {
|
||||
$safeResult = \gzgets($stream);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $data
|
||||
* @param int $max_length
|
||||
* @return string
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzinflate(string $data, int $max_length = 0): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gzinflate($data, $max_length);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @param string $mode
|
||||
* @param $use_include_path
|
||||
* @return resource
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzopen(string $filename, string $mode, $use_include_path = 0)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gzopen($filename, $mode, $use_include_path);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @return false|int
|
||||
*
|
||||
*/
|
||||
function gzpassthru($stream)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gzpassthru($stream);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @param int $length
|
||||
* @return string
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzread($stream, int $length): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gzread($stream, $length);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzrewind($stream): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gzrewind($stream);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @return int
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gztell($stream): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gztell($stream);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $data
|
||||
* @param int $max_length
|
||||
* @return string
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzuncompress(string $data, int $max_length = 0): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \gzuncompress($data, $max_length);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @param string $data
|
||||
* @param int|null $length
|
||||
* @return int
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function gzwrite($stream, string $data, ?int $length = null): int
|
||||
{
|
||||
error_clear_last();
|
||||
if ($length !== null) {
|
||||
$safeResult = \gzwrite($stream, $data, $length);
|
||||
} else {
|
||||
$safeResult = \gzwrite($stream, $data);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \InflateContext $context
|
||||
* @return int
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function inflate_get_read_len(\InflateContext $context): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \inflate_get_read_len($context);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \InflateContext $context
|
||||
* @return false|int
|
||||
*
|
||||
*/
|
||||
function inflate_get_status(\InflateContext $context)
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \inflate_get_status($context);
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \InflateContext $context
|
||||
* @param string $data
|
||||
* @param int $flush_mode
|
||||
* @return string
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function inflate_add(\InflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \inflate_add($context, $data, $flush_mode);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $encoding
|
||||
* @param array $options
|
||||
* @return \InflateContext
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function inflate_init(int $encoding, array $options = []): \InflateContext
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \inflate_init($encoding, $options);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @param $use_include_path
|
||||
* @return 0|positive-int
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function readgzfile(string $filename, $use_include_path = 0): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \readgzfile($filename, $use_include_path);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $data
|
||||
* @param int $max_length
|
||||
* @return string
|
||||
* @throws ZlibException
|
||||
*
|
||||
*/
|
||||
function zlib_decode(string $data, int $max_length = 0): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \zlib_decode($data, $max_length);
|
||||
if ($safeResult === false) {
|
||||
throw ZlibException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
Reference in New Issue
Block a user