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:
1109
vendor/thecodingmachine/safe/generated/8.5/functionsList.php
vendored
Normal file
1109
vendor/thecodingmachine/safe/generated/8.5/functionsList.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
180
vendor/thecodingmachine/safe/generated/8.5/pcntl.php
vendored
Normal file
180
vendor/thecodingmachine/safe/generated/8.5/pcntl.php
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\PcntlException;
|
||||
|
||||
/**
|
||||
* @param int|null $pid
|
||||
* @return array|bool
|
||||
* @throws PcntlException
|
||||
*
|
||||
*/
|
||||
function pcntl_getcpuaffinity(?int $pid = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($pid !== null) {
|
||||
$safeResult = \pcntl_getcpuaffinity($pid);
|
||||
} else {
|
||||
$safeResult = \pcntl_getcpuaffinity();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PcntlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int|null $process_id
|
||||
* @param int $mode
|
||||
* @return int
|
||||
* @throws PcntlException
|
||||
*
|
||||
*/
|
||||
function pcntl_getpriority(?int $process_id = null, int $mode = PRIO_PROCESS): int
|
||||
{
|
||||
error_clear_last();
|
||||
if ($mode !== PRIO_PROCESS) {
|
||||
$safeResult = \pcntl_getpriority($process_id, $mode);
|
||||
} elseif ($process_id !== null) {
|
||||
$safeResult = \pcntl_getpriority($process_id);
|
||||
} else {
|
||||
$safeResult = \pcntl_getpriority();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PcntlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int|null $pid
|
||||
* @param array $hmask
|
||||
* @throws PcntlException
|
||||
*
|
||||
*/
|
||||
function pcntl_setcpuaffinity(?int $pid = null, ?array $hmask = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($hmask !== null) {
|
||||
$safeResult = \pcntl_setcpuaffinity($pid, $hmask);
|
||||
} elseif ($pid !== null) {
|
||||
$safeResult = \pcntl_setcpuaffinity($pid);
|
||||
} else {
|
||||
$safeResult = \pcntl_setcpuaffinity();
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PcntlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $priority
|
||||
* @param int|null $process_id
|
||||
* @param int $mode
|
||||
* @throws PcntlException
|
||||
*
|
||||
*/
|
||||
function pcntl_setpriority(int $priority, ?int $process_id = null, int $mode = PRIO_PROCESS): void
|
||||
{
|
||||
error_clear_last();
|
||||
if ($mode !== PRIO_PROCESS) {
|
||||
$safeResult = \pcntl_setpriority($priority, $process_id, $mode);
|
||||
} elseif ($process_id !== null) {
|
||||
$safeResult = \pcntl_setpriority($priority, $process_id);
|
||||
} else {
|
||||
$safeResult = \pcntl_setpriority($priority);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw PcntlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @throws PcntlException
|
||||
*
|
||||
*/
|
||||
function pcntl_signal_dispatch(): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pcntl_signal_dispatch();
|
||||
if ($safeResult === false) {
|
||||
throw PcntlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $signal
|
||||
* @param callable|int $handler
|
||||
* @param bool $restart_syscalls
|
||||
* @throws PcntlException
|
||||
*
|
||||
*/
|
||||
function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pcntl_signal($signal, $handler, $restart_syscalls);
|
||||
if ($safeResult === false) {
|
||||
throw PcntlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $mode
|
||||
* @param array $signals
|
||||
* @param array|null $old_signals
|
||||
* @throws PcntlException
|
||||
*
|
||||
*/
|
||||
function pcntl_sigprocmask(int $mode, array $signals, ?array &$old_signals = null): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pcntl_sigprocmask($mode, $signals, $old_signals);
|
||||
if ($safeResult === false) {
|
||||
throw PcntlException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $signals
|
||||
* @param array|null $info
|
||||
* @param int $seconds
|
||||
* @param int $nanoseconds
|
||||
* @return int
|
||||
* @throws PcntlException
|
||||
*
|
||||
*/
|
||||
function pcntl_sigtimedwait(array $signals, ?array &$info = [], int $seconds = 0, int $nanoseconds = 0): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pcntl_sigtimedwait($signals, $info, $seconds, $nanoseconds);
|
||||
if ($safeResult === false) {
|
||||
throw PcntlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $signals
|
||||
* @param array|null $info
|
||||
* @return int
|
||||
* @throws PcntlException
|
||||
*
|
||||
*/
|
||||
function pcntl_sigwaitinfo(array $signals, ?array &$info = []): int
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \pcntl_sigwaitinfo($signals, $info);
|
||||
if ($safeResult === false) {
|
||||
throw PcntlException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
1119
vendor/thecodingmachine/safe/generated/8.5/rector-migrate.php
vendored
Normal file
1119
vendor/thecodingmachine/safe/generated/8.5/rector-migrate.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
34
vendor/thecodingmachine/safe/generated/8.5/rpminfo.php
vendored
Normal file
34
vendor/thecodingmachine/safe/generated/8.5/rpminfo.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\RpminfoException;
|
||||
|
||||
/**
|
||||
* @param int $tag
|
||||
* @throws RpminfoException
|
||||
*
|
||||
*/
|
||||
function rpmaddtag(int $tag): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \rpmaddtag($tag);
|
||||
if ($safeResult === false) {
|
||||
throw RpminfoException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $text
|
||||
* @throws RpminfoException
|
||||
*
|
||||
*/
|
||||
function rpmdefine(string $text): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \rpmdefine($text);
|
||||
if ($safeResult === false) {
|
||||
throw RpminfoException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
34
vendor/thecodingmachine/safe/generated/8.5/shmop.php
vendored
Normal file
34
vendor/thecodingmachine/safe/generated/8.5/shmop.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\ShmopException;
|
||||
|
||||
/**
|
||||
* @param \Shmop $shmop
|
||||
* @throws ShmopException
|
||||
*
|
||||
*/
|
||||
function shmop_delete(\Shmop $shmop): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \shmop_delete($shmop);
|
||||
if ($safeResult === false) {
|
||||
throw ShmopException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Shmop $shmop
|
||||
* @param int $offset
|
||||
* @param int $size
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
function shmop_read(\Shmop $shmop, int $offset, int $size): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \shmop_read($shmop, $offset, $size);
|
||||
return $safeResult;
|
||||
}
|
||||
643
vendor/thecodingmachine/safe/generated/8.5/uodbc.php
vendored
Normal file
643
vendor/thecodingmachine/safe/generated/8.5/uodbc.php
vendored
Normal file
@@ -0,0 +1,643 @@
|
||||
<?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 null|string $user
|
||||
* @param null|string $password
|
||||
* @param int $cursor_option
|
||||
* @return \Odbc\Connection
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_connect(string $dsn, ?string $user = null, ?string $password = null, int $cursor_option = SQL_CUR_USE_DRIVER): \Odbc\Connection
|
||||
{
|
||||
error_clear_last();
|
||||
if ($cursor_option !== SQL_CUR_USE_DRIVER) {
|
||||
$safeResult = \odbc_connect($dsn, $user, $password, $cursor_option);
|
||||
} elseif ($password !== null) {
|
||||
$safeResult = \odbc_connect($dsn, $user, $password);
|
||||
} elseif ($user !== null) {
|
||||
$safeResult = \odbc_connect($dsn, $user);
|
||||
} else {
|
||||
$safeResult = \odbc_connect($dsn);
|
||||
}
|
||||
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 null|string $user
|
||||
* @param null|string $password
|
||||
* @param int $cursor_option
|
||||
* @return \Odbc\Connection
|
||||
* @throws UodbcException
|
||||
*
|
||||
*/
|
||||
function odbc_pconnect(string $dsn, ?string $user = null, ?string $password = null, int $cursor_option = SQL_CUR_USE_DRIVER): \Odbc\Connection
|
||||
{
|
||||
error_clear_last();
|
||||
if ($cursor_option !== SQL_CUR_USE_DRIVER) {
|
||||
$safeResult = \odbc_pconnect($dsn, $user, $password, $cursor_option);
|
||||
} elseif ($password !== null) {
|
||||
$safeResult = \odbc_pconnect($dsn, $user, $password);
|
||||
} elseif ($user !== null) {
|
||||
$safeResult = \odbc_pconnect($dsn, $user);
|
||||
} else {
|
||||
$safeResult = \odbc_pconnect($dsn);
|
||||
}
|
||||
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;
|
||||
}
|
||||
188
vendor/thecodingmachine/safe/generated/8.5/xdiff.php
vendored
Normal file
188
vendor/thecodingmachine/safe/generated/8.5/xdiff.php
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\XdiffException;
|
||||
|
||||
/**
|
||||
* @param string $old_file
|
||||
* @param string $new_file
|
||||
* @param string $dest
|
||||
* @throws XdiffException
|
||||
*
|
||||
*/
|
||||
function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xdiff_file_bdiff($old_file, $new_file, $dest);
|
||||
if ($safeResult === false) {
|
||||
throw XdiffException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $file
|
||||
* @param string $patch
|
||||
* @param string $dest
|
||||
* @throws XdiffException
|
||||
*
|
||||
*/
|
||||
function xdiff_file_bpatch(string $file, string $patch, string $dest): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xdiff_file_bpatch($file, $patch, $dest);
|
||||
if ($safeResult === false) {
|
||||
throw XdiffException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $old_file
|
||||
* @param string $new_file
|
||||
* @param string $dest
|
||||
* @throws XdiffException
|
||||
*
|
||||
*/
|
||||
function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xdiff_file_diff_binary($old_file, $new_file, $dest);
|
||||
if ($safeResult === false) {
|
||||
throw XdiffException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $old_file
|
||||
* @param string $new_file
|
||||
* @param string $dest
|
||||
* @param int $context
|
||||
* @param bool $minimal
|
||||
* @throws XdiffException
|
||||
*
|
||||
*/
|
||||
function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $context = 3, bool $minimal = false): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xdiff_file_diff($old_file, $new_file, $dest, $context, $minimal);
|
||||
if ($safeResult === false) {
|
||||
throw XdiffException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $file
|
||||
* @param string $patch
|
||||
* @param string $dest
|
||||
* @throws XdiffException
|
||||
*
|
||||
*/
|
||||
function xdiff_file_patch_binary(string $file, string $patch, string $dest): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xdiff_file_patch_binary($file, $patch, $dest);
|
||||
if ($safeResult === false) {
|
||||
throw XdiffException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $old_file
|
||||
* @param string $new_file
|
||||
* @param string $dest
|
||||
* @throws XdiffException
|
||||
*
|
||||
*/
|
||||
function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): void
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xdiff_file_rabdiff($old_file, $new_file, $dest);
|
||||
if ($safeResult === false) {
|
||||
throw XdiffException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $str
|
||||
* @param string $patch
|
||||
* @return string
|
||||
* @throws XdiffException
|
||||
*
|
||||
*/
|
||||
function xdiff_string_bpatch(string $str, string $patch): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xdiff_string_bpatch($str, $patch);
|
||||
if ($safeResult === false) {
|
||||
throw XdiffException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $str
|
||||
* @param string $patch
|
||||
* @return string
|
||||
* @throws XdiffException
|
||||
*
|
||||
*/
|
||||
function xdiff_string_patch_binary(string $str, string $patch): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xdiff_string_patch_binary($str, $patch);
|
||||
if ($safeResult === false) {
|
||||
throw XdiffException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $str
|
||||
* @param string $patch
|
||||
* @param int $flags
|
||||
* @param null|string $error
|
||||
* @return string
|
||||
* @throws XdiffException
|
||||
*
|
||||
*/
|
||||
function xdiff_string_patch(string $str, string $patch, ?int $flags = null, ?string &$error = null): string
|
||||
{
|
||||
error_clear_last();
|
||||
if ($error !== null) {
|
||||
$safeResult = \xdiff_string_patch($str, $patch, $flags, $error);
|
||||
} elseif ($flags !== null) {
|
||||
$safeResult = \xdiff_string_patch($str, $patch, $flags);
|
||||
} else {
|
||||
$safeResult = \xdiff_string_patch($str, $patch);
|
||||
}
|
||||
if ($safeResult === false) {
|
||||
throw XdiffException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $old_data
|
||||
* @param string $new_data
|
||||
* @return string
|
||||
* @throws XdiffException
|
||||
*
|
||||
*/
|
||||
function xdiff_string_rabdiff(string $old_data, string $new_data): string
|
||||
{
|
||||
error_clear_last();
|
||||
$safeResult = \xdiff_string_rabdiff($old_data, $new_data);
|
||||
if ($safeResult === false) {
|
||||
throw XdiffException::createFromPhpError();
|
||||
}
|
||||
return $safeResult;
|
||||
}
|
||||
415
vendor/thecodingmachine/safe/generated/8.5/zlib.php
vendored
Normal file
415
vendor/thecodingmachine/safe/generated/8.5/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 = false): 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