Skip to content

Commit c97371a

Browse files
authored
Merge pull request #121 from Kharhamel/update
updated generated functions
2 parents 677c032 + 84fd1be commit c97371a

File tree

11 files changed

+292
-21
lines changed

11 files changed

+292
-21
lines changed

generated/bzip2.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@
1313
* @throws Bzip2Exception
1414
*
1515
*/
16-
function bzclose($bz): int
16+
function bzclose($bz): void
1717
{
1818
error_clear_last();
1919
$result = \bzclose($bz);
2020
if ($result === false) {
2121
throw Bzip2Exception::createFromPhpError();
2222
}
23-
return $result;
2423
}
2524

2625

generated/dir.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,7 @@ function getcwd(): string
7878
* @param resource $context For a description of the context parameter,
7979
* refer to the streams section of
8080
* the manual.
81-
* @return resource Returns a directory handle resource on success.
82-
*
83-
* If path is not a valid directory or the
84-
* directory can not be opened due to permission restrictions or
85-
* filesystem errors, opendir returns FALSE and
86-
* generates a PHP error of level
87-
* E_WARNING. You can suppress the error output of
88-
* opendir by prepending
89-
* '@' to the
90-
* front of the function name.
81+
* @return resource Returns a directory handle resource on success
9182
* @throws DirException
9283
*
9384
*/

generated/filesystem.php

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ function fflush($handle): void
215215
* supported by your OS to enhance performance.
216216
*
217217
* @param string $filename Name of the file to read.
218-
* @param bool $use_include_path As of PHP 5 the FILE_USE_INCLUDE_PATH constant can be used
218+
* @param bool $use_include_path The FILE_USE_INCLUDE_PATH constant can be used
219219
* to trigger include path
220220
* search.
221221
* This is not possible if strict typing
@@ -779,7 +779,7 @@ function flock($handle, int $operation, ?int &$wouldblock = null): void
779779
* can be set to '1' or TRUE if you want to search for the file in the
780780
* include_path, too.
781781
* @param resource $context
782-
* @return resource Returns a file pointer resource on success.
782+
* @return resource Returns a file pointer resource on success
783783
* @throws FilesystemException
784784
*
785785
*/
@@ -1180,6 +1180,32 @@ function parse_ini_string(string $ini, bool $process_sections = false, int $scan
11801180
}
11811181

11821182

1183+
/**
1184+
* Reads a file and writes it to the output buffer.
1185+
*
1186+
* @param string $filename The filename being read.
1187+
* @param bool $use_include_path You can use the optional second parameter and set it to TRUE, if
1188+
* you want to search for the file in the include_path, too.
1189+
* @param resource $context A context stream resource.
1190+
* @return int Returns the number of bytes read from the file on success
1191+
* @throws FilesystemException
1192+
*
1193+
*/
1194+
function readfile(string $filename, bool $use_include_path = false, $context = null): int
1195+
{
1196+
error_clear_last();
1197+
if ($context !== null) {
1198+
$result = \readfile($filename, $use_include_path, $context);
1199+
} else {
1200+
$result = \readfile($filename, $use_include_path);
1201+
}
1202+
if ($result === false) {
1203+
throw FilesystemException::createFromPhpError();
1204+
}
1205+
return $result;
1206+
}
1207+
1208+
11831209
/**
11841210
* readlink does the same as the readlink C function.
11851211
*

generated/functionsList.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
'mkdir',
162162
'parse_ini_file',
163163
'parse_ini_string',
164+
'readfile',
164165
'readlink',
165166
'realpath',
166167
'rename',
@@ -216,7 +217,9 @@
216217
'gnupg_setsignmode',
217218
'hash_hkdf',
218219
'hash_update_file',
220+
'fbird_blob_cancel',
219221
'ibase_add_user',
222+
'ibase_backup',
220223
'ibase_blob_cancel',
221224
'ibase_blob_create',
222225
'ibase_blob_get',
@@ -233,8 +236,10 @@
233236
'ibase_modify_user',
234237
'ibase_name_result',
235238
'ibase_pconnect',
239+
'ibase_restore',
236240
'ibase_rollback_ret',
237241
'ibase_rollback',
242+
'ibase_service_attach',
238243
'ibase_service_detach',
239244
'db2_autocommit',
240245
'db2_bind_param',
@@ -914,6 +919,9 @@
914919
'socket_set_option',
915920
'socket_shutdown',
916921
'socket_write',
922+
'socket_wsaprotocol_info_export',
923+
'socket_wsaprotocol_info_import',
924+
'socket_wsaprotocol_info_release',
917925
'sodium_crypto_pwhash_str',
918926
'sodium_crypto_pwhash',
919927
'solr_get_version',
@@ -1075,6 +1083,7 @@
10751083
'inflate_get_status',
10761084
'inflate_add',
10771085
'inflate_init',
1086+
'readgzfile',
10781087
'zlib_decode',
10791088
'json_decode',
10801089
'apc_fetch',

generated/ibase.php

Lines changed: 120 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@
44

55
use Safe\Exceptions\IbaseException;
66

7+
/**
8+
* This function will discard a BLOB if it has not yet been closed by
9+
* fbird_blob_close.
10+
*
11+
* @param resource $blob_handle A BLOB handle opened with fbird_blob_create.
12+
* @throws IbaseException
13+
*
14+
*/
15+
function fbird_blob_cancel($blob_handle): void
16+
{
17+
error_clear_last();
18+
$result = \fbird_blob_cancel($blob_handle);
19+
if ($result === false) {
20+
throw IbaseException::createFromPhpError();
21+
}
22+
}
23+
24+
725
/**
826
*
927
*
@@ -34,6 +52,44 @@ function ibase_add_user($service_handle, string $user_name, string $password, st
3452
}
3553

3654

55+
/**
56+
* This function passes the arguments to the (remote) database server. There it starts a new backup process. Therefore you
57+
* won't get any responses.
58+
*
59+
* @param resource $service_handle A previously opened connection to the database server.
60+
* @param string $source_db The absolute file path to the database on the database server. You can also use a database alias.
61+
* @param string $dest_file The path to the backup file on the database server.
62+
* @param int $options Additional options to pass to the database server for backup.
63+
* The options parameter can be a combination
64+
* of the following constants:
65+
* IBASE_BKP_IGNORE_CHECKSUMS,
66+
* IBASE_BKP_IGNORE_LIMBO,
67+
* IBASE_BKP_METADATA_ONLY,
68+
* IBASE_BKP_NO_GARBAGE_COLLECT,
69+
* IBASE_BKP_OLD_DESCRIPTIONS,
70+
* IBASE_BKP_NON_TRANSPORTABLE or
71+
* IBASE_BKP_CONVERT.
72+
* Read the section about for further information.
73+
* @param bool $verbose Since the backup process is done on the database server, you don't have any chance
74+
* to get its output. This argument is useless.
75+
* @return mixed Returns TRUE on success.
76+
*
77+
* Since the backup process is done on the (remote) server, this function just passes the arguments to it.
78+
* While the arguments are legal, you won't get FALSE.
79+
* @throws IbaseException
80+
*
81+
*/
82+
function ibase_backup($service_handle, string $source_db, string $dest_file, int $options = 0, bool $verbose = false)
83+
{
84+
error_clear_last();
85+
$result = \ibase_backup($service_handle, $source_db, $dest_file, $options, $verbose);
86+
if ($result === false) {
87+
throw IbaseException::createFromPhpError();
88+
}
89+
return $result;
90+
}
91+
92+
3793
/**
3894
* This function will discard a BLOB if it has not yet been closed by
3995
* ibase_blob_close.
@@ -453,6 +509,47 @@ function ibase_pconnect(string $database = null, string $username = null, string
453509
}
454510

455511

512+
/**
513+
* This function passes the arguments to the (remote) database server. There it starts a new restore process. Therefore you
514+
* won't get any responses.
515+
*
516+
* @param resource $service_handle A previously opened connection to the database server.
517+
* @param string $source_file The absolute path on the server where the backup file is located.
518+
* @param string $dest_db The path to create the new database on the server. You can also use database alias.
519+
* @param int $options Additional options to pass to the database server for restore.
520+
* The options parameter can be a combination
521+
* of the following constants:
522+
* IBASE_RES_DEACTIVATE_IDX,
523+
* IBASE_RES_NO_SHADOW,
524+
* IBASE_RES_NO_VALIDITY,
525+
* IBASE_RES_ONE_AT_A_TIME,
526+
* IBASE_RES_REPLACE,
527+
* IBASE_RES_CREATE,
528+
* IBASE_RES_USE_ALL_SPACE,
529+
* IBASE_PRP_PAGE_BUFFERS,
530+
* IBASE_PRP_SWEEP_INTERVAL,
531+
* IBASE_RES_CREATE.
532+
* Read the section about for further information.
533+
* @param bool $verbose Since the restore process is done on the database server, you don't have any chance
534+
* to get its output. This argument is useless.
535+
* @return mixed Returns TRUE on success.
536+
*
537+
* Since the restore process is done on the (remote) server, this function just passes the arguments to it.
538+
* While the arguments are legal, you won't get FALSE.
539+
* @throws IbaseException
540+
*
541+
*/
542+
function ibase_restore($service_handle, string $source_file, string $dest_db, int $options = 0, bool $verbose = false)
543+
{
544+
error_clear_last();
545+
$result = \ibase_restore($service_handle, $source_file, $dest_db, $options, $verbose);
546+
if ($result === false) {
547+
throw IbaseException::createFromPhpError();
548+
}
549+
return $result;
550+
}
551+
552+
456553
/**
457554
* Rolls back a transaction without closing it.
458555
*
@@ -500,7 +597,29 @@ function ibase_rollback($link_or_trans_identifier = null): void
500597
/**
501598
*
502599
*
503-
* @param resource $service_handle
600+
* @param string $host The name or ip address of the database host. You can define the port by adding
601+
* '/' and port number. If no port is specified, port 3050 will be used.
602+
* @param string $dba_username The name of any valid user.
603+
* @param string $dba_password The user's password.
604+
* @return resource Returns a Interbase / Firebird link identifier on success.
605+
* @throws IbaseException
606+
*
607+
*/
608+
function ibase_service_attach(string $host, string $dba_username, string $dba_password)
609+
{
610+
error_clear_last();
611+
$result = \ibase_service_attach($host, $dba_username, $dba_password);
612+
if ($result === false) {
613+
throw IbaseException::createFromPhpError();
614+
}
615+
return $result;
616+
}
617+
618+
619+
/**
620+
*
621+
*
622+
* @param resource $service_handle A previously created connection to the database server.
504623
* @throws IbaseException
505624
*
506625
*/

generated/image.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,15 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi
938938
*
939939
*
940940
*
941+
*
942+
* IMG_FILTER_SCATTER: Applies scatter effect
943+
* to the image, use arg1 and
944+
* arg2 to define the effect strength and
945+
* additionally arg3 to only apply the
946+
* on select pixel colors.
947+
*
948+
*
949+
*
941950
* @param int $arg1
942951
*
943952
*
@@ -965,6 +974,13 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi
965974
*
966975
*
967976
*
977+
*
978+
* IMG_FILTER_SCATTER: Effect substraction level.
979+
* This must not be higher or equal to the addition level set with
980+
* arg2.
981+
*
982+
*
983+
*
968984
* @param int $arg2
969985
*
970986
*
@@ -978,13 +994,24 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi
978994
*
979995
*
980996
*
997+
*
998+
* IMG_FILTER_SCATTER: Effect addition level.
999+
*
1000+
*
1001+
*
9811002
* @param int $arg3
9821003
*
9831004
*
9841005
* IMG_FILTER_COLORIZE: Value of blue component.
9851006
*
9861007
*
9871008
*
1009+
*
1010+
* IMG_FILTER_SCATTER: Optional array indexed color values
1011+
* to apply effect at.
1012+
*
1013+
*
1014+
*
9881015
* @param int $arg4
9891016
*
9901017
*

generated/json.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ function json_encode($value, int $options = 0, int $depth = 512): string
5454

5555

5656
/**
57-
*
57+
* Returns the error string of the last json_encode or json_decode
58+
* call, which did not specify JSON_THROW_ON_ERROR.
5859
*
5960
* @return string Returns the error message on success, "No error" if no
6061
* error has occurred.

generated/sem.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function msg_queue_exists(int $key): void
2626
* specified queue of the type specified by
2727
* desiredmsgtype.
2828
*
29-
* @param resource $queue
29+
* @param resource $queue Message queue resource handle
3030
* @param int $desiredmsgtype If desiredmsgtype is 0, the message from the front
3131
* of the queue is returned. If desiredmsgtype is
3232
* greater than 0, then the first message of that type is returned.
@@ -127,9 +127,13 @@ function msg_remove_queue($queue): void
127127
* msgtype (which MUST be greater than 0) to
128128
* the message queue specified by queue.
129129
*
130-
* @param resource $queue
131-
* @param int $msgtype
132-
* @param mixed $message
130+
* @param resource $queue Message queue resource handle
131+
* @param int $msgtype The type of the message (MUST be greater than 0)
132+
* @param mixed $message The body of the message.
133+
*
134+
* If serialize set to FALSE is supplied,
135+
* MUST be of type: string, integer, float
136+
* or bool. In other case a warning will be issued.
133137
* @param bool $serialize The optional serialize controls how the
134138
* message is sent. serialize
135139
* defaults to TRUE which means that the message is
@@ -147,7 +151,7 @@ function msg_remove_queue($queue): void
147151
* errorcode to MSG_EAGAIN,
148152
* indicating that you should try to send your message again a little
149153
* later on.
150-
* @param int $errorcode
154+
* @param int $errorcode If the function fails, the optional errorcode will be set to the value of the system errno variable.
151155
* @throws SemException
152156
*
153157
*/

0 commit comments

Comments
 (0)