Skip to content

Commit

Permalink
Merge pull request #121 from Kharhamel/update
Browse files Browse the repository at this point in the history
updated generated functions
  • Loading branch information
moufmouf authored Jun 21, 2019
2 parents 677c032 + 84fd1be commit c97371a
Show file tree
Hide file tree
Showing 11 changed files with 292 additions and 21 deletions.
3 changes: 1 addition & 2 deletions generated/bzip2.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@
* @throws Bzip2Exception
*
*/
function bzclose($bz): int
function bzclose($bz): void
{
error_clear_last();
$result = \bzclose($bz);
if ($result === false) {
throw Bzip2Exception::createFromPhpError();
}
return $result;
}


Expand Down
11 changes: 1 addition & 10 deletions generated/dir.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,7 @@ function getcwd(): string
* @param resource $context For a description of the context parameter,
* refer to the streams section of
* the manual.
* @return resource Returns a directory handle resource on success.
*
* If path is not a valid directory or the
* directory can not be opened due to permission restrictions or
* filesystem errors, opendir returns FALSE and
* generates a PHP error of level
* E_WARNING. You can suppress the error output of
* opendir by prepending
* '@' to the
* front of the function name.
* @return resource Returns a directory handle resource on success
* @throws DirException
*
*/
Expand Down
30 changes: 28 additions & 2 deletions generated/filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function fflush($handle): void
* supported by your OS to enhance performance.
*
* @param string $filename Name of the file to read.
* @param bool $use_include_path As of PHP 5 the FILE_USE_INCLUDE_PATH constant can be used
* @param bool $use_include_path The FILE_USE_INCLUDE_PATH constant can be used
* to trigger include path
* search.
* This is not possible if strict typing
Expand Down Expand Up @@ -779,7 +779,7 @@ function flock($handle, int $operation, ?int &$wouldblock = null): void
* can be set to '1' or TRUE if you want to search for the file in the
* include_path, too.
* @param resource $context
* @return resource Returns a file pointer resource on success.
* @return resource Returns a file pointer resource on success
* @throws FilesystemException
*
*/
Expand Down Expand Up @@ -1180,6 +1180,32 @@ function parse_ini_string(string $ini, bool $process_sections = false, int $scan
}


/**
* Reads a file and writes it to the output buffer.
*
* @param string $filename The filename being read.
* @param bool $use_include_path You can use the optional second parameter and set it to TRUE, if
* you want to search for the file in the include_path, too.
* @param resource $context A context stream resource.
* @return int Returns the number of bytes read from the file on success
* @throws FilesystemException
*
*/
function readfile(string $filename, bool $use_include_path = false, $context = null): int
{
error_clear_last();
if ($context !== null) {
$result = \readfile($filename, $use_include_path, $context);
} else {
$result = \readfile($filename, $use_include_path);
}
if ($result === false) {
throw FilesystemException::createFromPhpError();
}
return $result;
}


/**
* readlink does the same as the readlink C function.
*
Expand Down
9 changes: 9 additions & 0 deletions generated/functionsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
'mkdir',
'parse_ini_file',
'parse_ini_string',
'readfile',
'readlink',
'realpath',
'rename',
Expand Down Expand Up @@ -216,7 +217,9 @@
'gnupg_setsignmode',
'hash_hkdf',
'hash_update_file',
'fbird_blob_cancel',
'ibase_add_user',
'ibase_backup',
'ibase_blob_cancel',
'ibase_blob_create',
'ibase_blob_get',
Expand All @@ -233,8 +236,10 @@
'ibase_modify_user',
'ibase_name_result',
'ibase_pconnect',
'ibase_restore',
'ibase_rollback_ret',
'ibase_rollback',
'ibase_service_attach',
'ibase_service_detach',
'db2_autocommit',
'db2_bind_param',
Expand Down Expand Up @@ -914,6 +919,9 @@
'socket_set_option',
'socket_shutdown',
'socket_write',
'socket_wsaprotocol_info_export',
'socket_wsaprotocol_info_import',
'socket_wsaprotocol_info_release',
'sodium_crypto_pwhash_str',
'sodium_crypto_pwhash',
'solr_get_version',
Expand Down Expand Up @@ -1075,6 +1083,7 @@
'inflate_get_status',
'inflate_add',
'inflate_init',
'readgzfile',
'zlib_decode',
'json_decode',
'apc_fetch',
Expand Down
121 changes: 120 additions & 1 deletion generated/ibase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@

use Safe\Exceptions\IbaseException;

/**
* This function will discard a BLOB if it has not yet been closed by
* fbird_blob_close.
*
* @param resource $blob_handle A BLOB handle opened with fbird_blob_create.
* @throws IbaseException
*
*/
function fbird_blob_cancel($blob_handle): void
{
error_clear_last();
$result = \fbird_blob_cancel($blob_handle);
if ($result === false) {
throw IbaseException::createFromPhpError();
}
}


/**
*
*
Expand Down Expand Up @@ -34,6 +52,44 @@ function ibase_add_user($service_handle, string $user_name, string $password, st
}


/**
* This function passes the arguments to the (remote) database server. There it starts a new backup process. Therefore you
* won't get any responses.
*
* @param resource $service_handle A previously opened connection to the database server.
* @param string $source_db The absolute file path to the database on the database server. You can also use a database alias.
* @param string $dest_file The path to the backup file on the database server.
* @param int $options Additional options to pass to the database server for backup.
* The options parameter can be a combination
* of the following constants:
* IBASE_BKP_IGNORE_CHECKSUMS,
* IBASE_BKP_IGNORE_LIMBO,
* IBASE_BKP_METADATA_ONLY,
* IBASE_BKP_NO_GARBAGE_COLLECT,
* IBASE_BKP_OLD_DESCRIPTIONS,
* IBASE_BKP_NON_TRANSPORTABLE or
* IBASE_BKP_CONVERT.
* Read the section about for further information.
* @param bool $verbose Since the backup process is done on the database server, you don't have any chance
* to get its output. This argument is useless.
* @return mixed Returns TRUE on success.
*
* Since the backup process is done on the (remote) server, this function just passes the arguments to it.
* While the arguments are legal, you won't get FALSE.
* @throws IbaseException
*
*/
function ibase_backup($service_handle, string $source_db, string $dest_file, int $options = 0, bool $verbose = false)
{
error_clear_last();
$result = \ibase_backup($service_handle, $source_db, $dest_file, $options, $verbose);
if ($result === false) {
throw IbaseException::createFromPhpError();
}
return $result;
}


/**
* This function will discard a BLOB if it has not yet been closed by
* ibase_blob_close.
Expand Down Expand Up @@ -453,6 +509,47 @@ function ibase_pconnect(string $database = null, string $username = null, string
}


/**
* This function passes the arguments to the (remote) database server. There it starts a new restore process. Therefore you
* won't get any responses.
*
* @param resource $service_handle A previously opened connection to the database server.
* @param string $source_file The absolute path on the server where the backup file is located.
* @param string $dest_db The path to create the new database on the server. You can also use database alias.
* @param int $options Additional options to pass to the database server for restore.
* The options parameter can be a combination
* of the following constants:
* IBASE_RES_DEACTIVATE_IDX,
* IBASE_RES_NO_SHADOW,
* IBASE_RES_NO_VALIDITY,
* IBASE_RES_ONE_AT_A_TIME,
* IBASE_RES_REPLACE,
* IBASE_RES_CREATE,
* IBASE_RES_USE_ALL_SPACE,
* IBASE_PRP_PAGE_BUFFERS,
* IBASE_PRP_SWEEP_INTERVAL,
* IBASE_RES_CREATE.
* Read the section about for further information.
* @param bool $verbose Since the restore process is done on the database server, you don't have any chance
* to get its output. This argument is useless.
* @return mixed Returns TRUE on success.
*
* Since the restore process is done on the (remote) server, this function just passes the arguments to it.
* While the arguments are legal, you won't get FALSE.
* @throws IbaseException
*
*/
function ibase_restore($service_handle, string $source_file, string $dest_db, int $options = 0, bool $verbose = false)
{
error_clear_last();
$result = \ibase_restore($service_handle, $source_file, $dest_db, $options, $verbose);
if ($result === false) {
throw IbaseException::createFromPhpError();
}
return $result;
}


/**
* Rolls back a transaction without closing it.
*
Expand Down Expand Up @@ -500,7 +597,29 @@ function ibase_rollback($link_or_trans_identifier = null): void
/**
*
*
* @param resource $service_handle
* @param string $host The name or ip address of the database host. You can define the port by adding
* '/' and port number. If no port is specified, port 3050 will be used.
* @param string $dba_username The name of any valid user.
* @param string $dba_password The user's password.
* @return resource Returns a Interbase / Firebird link identifier on success.
* @throws IbaseException
*
*/
function ibase_service_attach(string $host, string $dba_username, string $dba_password)
{
error_clear_last();
$result = \ibase_service_attach($host, $dba_username, $dba_password);
if ($result === false) {
throw IbaseException::createFromPhpError();
}
return $result;
}


/**
*
*
* @param resource $service_handle A previously created connection to the database server.
* @throws IbaseException
*
*/
Expand Down
27 changes: 27 additions & 0 deletions generated/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,15 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi
*
*
*
*
* IMG_FILTER_SCATTER: Applies scatter effect
* to the image, use arg1 and
* arg2 to define the effect strength and
* additionally arg3 to only apply the
* on select pixel colors.
*
*
*
* @param int $arg1
*
*
Expand Down Expand Up @@ -965,6 +974,13 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi
*
*
*
*
* IMG_FILTER_SCATTER: Effect substraction level.
* This must not be higher or equal to the addition level set with
* arg2.
*
*
*
* @param int $arg2
*
*
Expand All @@ -978,13 +994,24 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi
*
*
*
*
* IMG_FILTER_SCATTER: Effect addition level.
*
*
*
* @param int $arg3
*
*
* IMG_FILTER_COLORIZE: Value of blue component.
*
*
*
*
* IMG_FILTER_SCATTER: Optional array indexed color values
* to apply effect at.
*
*
*
* @param int $arg4
*
*
Expand Down
3 changes: 2 additions & 1 deletion generated/json.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ function json_encode($value, int $options = 0, int $depth = 512): string


/**
*
* Returns the error string of the last json_encode or json_decode
* call, which did not specify JSON_THROW_ON_ERROR.
*
* @return string Returns the error message on success, "No error" if no
* error has occurred.
Expand Down
14 changes: 9 additions & 5 deletions generated/sem.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function msg_queue_exists(int $key): void
* specified queue of the type specified by
* desiredmsgtype.
*
* @param resource $queue
* @param resource $queue Message queue resource handle
* @param int $desiredmsgtype If desiredmsgtype is 0, the message from the front
* of the queue is returned. If desiredmsgtype is
* greater than 0, then the first message of that type is returned.
Expand Down Expand Up @@ -127,9 +127,13 @@ function msg_remove_queue($queue): void
* msgtype (which MUST be greater than 0) to
* the message queue specified by queue.
*
* @param resource $queue
* @param int $msgtype
* @param mixed $message
* @param resource $queue Message queue resource handle
* @param int $msgtype The type of the message (MUST be greater than 0)
* @param mixed $message The body of the message.
*
* If serialize set to FALSE is supplied,
* MUST be of type: string, integer, float
* or bool. In other case a warning will be issued.
* @param bool $serialize The optional serialize controls how the
* message is sent. serialize
* defaults to TRUE which means that the message is
Expand All @@ -147,7 +151,7 @@ function msg_remove_queue($queue): void
* errorcode to MSG_EAGAIN,
* indicating that you should try to send your message again a little
* later on.
* @param int $errorcode
* @param int $errorcode If the function fails, the optional errorcode will be set to the value of the system errno variable.
* @throws SemException
*
*/
Expand Down
Loading

0 comments on commit c97371a

Please sign in to comment.