diff options
Diffstat (limited to 'build/stubs')
-rw-r--r-- | build/stubs/SensitiveParameter.phpstub | 5 | ||||
-rw-r--r-- | build/stubs/app_api.php | 92 | ||||
-rw-r--r-- | build/stubs/excimer.php | 282 | ||||
-rw-r--r-- | build/stubs/ftp.php | 93 | ||||
-rw-r--r-- | build/stubs/gd.php | 3075 | ||||
-rw-r--r-- | build/stubs/imagick.php | 8098 | ||||
-rw-r--r-- | build/stubs/intl.php | 4150 | ||||
-rw-r--r-- | build/stubs/ldap.php | 198 | ||||
-rw-r--r-- | build/stubs/psr_container.php | 52 | ||||
-rw-r--r-- | build/stubs/redis.php | 2 |
10 files changed, 4516 insertions, 11531 deletions
diff --git a/build/stubs/SensitiveParameter.phpstub b/build/stubs/SensitiveParameter.phpstub new file mode 100644 index 00000000000..95715138927 --- /dev/null +++ b/build/stubs/SensitiveParameter.phpstub @@ -0,0 +1,5 @@ +<?php + +#[\Attribute(Attribute::TARGET_PARAMETER)] +class SensitiveParameter { +} diff --git a/build/stubs/app_api.php b/build/stubs/app_api.php new file mode 100644 index 00000000000..04a6042dffd --- /dev/null +++ b/build/stubs/app_api.php @@ -0,0 +1,92 @@ +<?php + +namespace OCA\AppAPI\Service { + use OCP\IRequest; + + class AppAPIService { + /** + * @param IRequest $request + * @param bool $isDav + * + * @return bool + */ + public function validateExAppRequestToNC(IRequest $request, bool $isDav = false): bool {} + } +} + +namespace OCA\AppAPI { + + use OCP\IRequest; + use OCP\Http\Client\IPromise; + use OCP\Http\Client\IResponse; + + class PublicFunctions { + + public function __construct( + private readonly ExAppService $exAppService, + private readonly AppAPIService $service, + ) { + } + + /** + * Request to ExApp with AppAPI auth headers + */ + public function exAppRequest( + string $appId, + string $route, + ?string $userId = null, + string $method = 'POST', + array $params = [], + array $options = [], + ?IRequest $request = null, + ): array|IResponse { + $exApp = $this->exAppService->getExApp($appId); + if ($exApp === null) { + return ['error' => sprintf('ExApp `%s` not found', $appId)]; + } + return $this->service->requestToExApp($exApp, $route, $userId, $method, $params, $options, $request); + } + + /** + * Async request to ExApp with AppAPI auth headers + * + * @throws \Exception if ExApp not found + */ + public function asyncExAppRequest( + string $appId, + string $route, + ?string $userId = null, + string $method = 'POST', + array $params = [], + array $options = [], + ?IRequest $request = null, + ): IPromise { + $exApp = $this->exAppService->getExApp($appId); + if ($exApp === null) { + throw new \Exception(sprintf('ExApp `%s` not found', $appId)); + } + return $this->service->requestToExAppAsync($exApp, $route, $userId, $method, $params, $options, $request); + } + + /** + * Get basic ExApp info by appid + * + * @param string $appId + * + * @return array|null ExApp info (appid, version, name, enabled) or null if no ExApp found + */ + public function getExApp(string $appId): ?array { + $exApp = $this->exAppService->getExApp($appId); + if ($exApp !== null) { + $info = $exApp->jsonSerialize(); + return [ + 'appid' => $info['appid'], + 'version' => $info['version'], + 'name' => $info['name'], + 'enabled' => $info['enabled'], + ]; + } + return null; + } + } +} diff --git a/build/stubs/excimer.php b/build/stubs/excimer.php new file mode 100644 index 00000000000..e29eb2fd219 --- /dev/null +++ b/build/stubs/excimer.php @@ -0,0 +1,282 @@ +<?php + +/** Real (wall-clock) time */ +define('EXCIMER_REAL', 0); + +/** CPU time (user and system) consumed by the thread during execution */ +define('EXCIMER_CPU', 1); + +/** + * A sampling profiler. + * + * Collects a stack trace every time a timer event fires. + */ +class ExcimerProfiler { + /** + * Set the period. + * + * This will take effect the next time start() is called. + * + * If this method is not called, the default period of 0.1 seconds + * will be used. + * + * @param float $period The period in seconds + */ + public function setPeriod($period) { + } + + /** + * Set the event type. May be either EXCIMER_REAL, for real (wall-clock) + * time, or EXCIMER_CPU, for CPU time. The default is EXCIMER_REAL. + * + * This will take effect the next time start() is called. + * + * @param int $eventType + */ + public function setEventType($eventType) { + } + + /** + * Set the maximum depth of stack trace collection. If this depth is + * exceeded, the traversal up the stack will be terminated, so the function + * will appear to have no caller. + * + * By default, there is no limit. If this is called with a depth of zero, + * the limit is disabled. + * + * This will take effect immediately. + * + * @param int $maxDepth + */ + public function setMaxDepth($maxDepth) { + } + + /** + * Set a callback which will be called once the specified number of samples + * has been collected. + * + * When the ExcimerProfiler object is destroyed, the callback will also + * be called, unless no samples have been collected. + * + * The callback will be called with a single argument: the ExcimerLog + * object containing the samples. Before the callback is called, a new + * ExcimerLog object will be created and registered with the + * ExcimerProfiler. So ExcimerProfiler::getLog() should not be used from + * the callback, since it will not return the samples. + * + * @param callable $callback + * @param int $maxSamples + */ + public function setFlushCallback($callback, $maxSamples) { + } + + /** + * Clear the flush callback. No callback will be called regardless of + * how many samples are collected. + */ + public function clearFlushCallback() { + } + + /** + * Start the profiler. If the profiler was already running, it will be + * stopped and restarted with new options. + */ + public function start() { + } + + /** + * Stop the profiler. + */ + public function stop() { + } + + /** + * Get the current ExcimerLog object. + * + * Note that if the profiler is running, the object thus returned may be + * modified by a timer event at any time, potentially invalidating your + * analysis. Instead, the profiler should be stopped first, or flush() + * should be used. + * + * @return ExcimerLog + */ + public function getLog() { + } + + /** + * Create and register a new ExcimerLog object, and return the old + * ExcimerLog object. + * + * This will return all accumulated events to this point, and reset the + * log with a new log of zero length. + * + * @return ExcimerLog + */ + public function flush() { + } +} + +/** + * A collected series of stack traces and some utility methods to aggregate them. + * + * ExcimerLog acts as a container for ExcimerLogEntry objects. The Iterator or + * ArrayAccess interfaces may be used to access them. For example: + * + * foreach ( $profiler->getLog() as $entry ) { + * var_dump( $entry->getTrace() ); + * } + */ +class ExcimerLog implements ArrayAccess, Iterator { + /** + * ExcimerLog is not constructible by user code. Objects of this type + * are available via: + * - ExcimerProfiler::getLog() + * - ExcimerProfiler::flush() + * - The callback to ExcimerProfiler::setFlushCallback() + */ + final private function __construct() { + } + + /** + * Aggregate the stack traces and convert them to a line-based format + * understood by Brendan Gregg's FlameGraph utility. Each stack trace is + * represented as a series of function names, separated by semicolons. + * After this identifier, there is a single space character, then a number + * giving the number of times the stack appeared. Then there is a line + * break. This is repeated for each unique stack trace. + * + * @return string + */ + public function formatCollapsed() { + } + + /** + * Produce an array with an element for every function which appears in + * the log. The key is a human-readable unique identifier for the function, + * method or closure. The value is an associative array with the following + * elements: + * + * - self: The number of events in which the function itself was running, + * no other userspace function was being called. This includes time + * spent in internal functions that this function called. + * - inclusive: The number of events in which this function appeared + * somewhere in the stack. + * + * And optionally the following elements, if they are relevant: + * + * - file: The filename in which the function appears + * - line: The exact line number at which the first relevant event + * occurred. + * - class: The class name in which the method is defined + * - function: The name of the function or method + * - closure_line: The line number at which the closure was defined + * + * The event counts in the "self" and "inclusive" fields are adjusted for + * overruns. They represent an estimate of the number of profiling periods + * in which those functions were present. + * + * @return array + */ + public function aggregateByFunction() { + } + + /** + * Get an array which can be JSON encoded for import into speedscope + * + * @return array + */ + public function getSpeedscopeData() { + } + + /** + * Get the total number of profiling periods represented by this log. + * + * @return int + */ + public function getEventCount() { + } + + /** + * Get the current ExcimerLogEntry object. Part of the Iterator interface. + * + * @return ExcimerLogEntry|null + */ + public function current() { + } + + /** + * Get the current integer key or null. Part of the Iterator interface. + * + * @return int|null + */ + public function key() { + } + + /** + * Advance to the next log entry. Part of the Iterator interface. + */ + public function next() { + } + + /** + * Rewind back to the first log entry. Part of the Iterator interface. + */ + public function rewind() { + } + + /** + * Check if the current position is valid. Part of the Iterator interface. + * + * @return bool + */ + public function valid() { + } + + /** + * Get the number of log entries contained in this log. This is always less + * than or equal to the number returned by getEventCount(), which includes + * overruns. + * + * @return int + */ + public function count() { + } + + /** + * Determine whether a log entry exists at the specified array offset. + * Part of the ArrayAccess interface. + * + * @param int $offset + * @return bool + */ + public function offsetExists($offset) { + } + + /** + * Get the ExcimerLogEntry object at the specified array offset. + * + * @param int $offset + * @return ExcimerLogEntry|null + */ + public function offsetGet($offset) { + } + + /** + * This function is included for compliance with the ArrayAccess interface. + * It raises a warning and does nothing. + * + * @param int $offset + * @param mixed $value + */ + public function offsetSet($offset, $value) { + } + + /** + * This function is included for compliance with the ArrayAccess interface. + * It raises a warning and does nothing. + * + * @param int $offset + */ + public function offsetUnset($offset) { + } +} diff --git a/build/stubs/ftp.php b/build/stubs/ftp.php index c2505d5a566..22e97f0f44f 100644 --- a/build/stubs/ftp.php +++ b/build/stubs/ftp.php @@ -16,59 +16,80 @@ namespace FTP { namespace { - function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|resource|false {} + function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false {} #ifdef HAVE_FTP_SSL - function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|resource|false {} + function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): FTP\Connection|false {} #endif - function ftp_login(FTP\Connection|resource $ftp, string $username, string $password): bool {} - function ftp_pwd(FTP\Connection|resource $ftp): string|false {} - function ftp_cdup(FTP\Connection|resource $ftp): bool {} - function ftp_chdir(FTP\Connection|resource $ftp, string $directory): bool {} - function ftp_exec(FTP\Connection|resource $ftp, string $command): bool {} - function ftp_raw(FTP\Connection|resource $ftp, string $command): ?array {} - function ftp_mkdir(FTP\Connection|resource $ftp, string $directory): string|false {} - function ftp_rmdir(FTP\Connection|resource $ftp, string $directory): bool {} - function ftp_chmod(FTP\Connection|resource $ftp, int $permissions, string $filename): int|false {} + function ftp_login(FTP\Connection $ftp, string $username, string $password): bool {} + function ftp_pwd(FTP\Connection $ftp): string|false {} + function ftp_cdup(FTP\Connection $ftp): bool {} + function ftp_chdir(FTP\Connection $ftp, string $directory): bool {} + function ftp_exec(FTP\Connection $ftp, string $command): bool {} + + /** + * @return array<int, string>|null + * @refcount 1 + */ + function ftp_raw(FTP\Connection $ftp, string $command): ?array {} + function ftp_mkdir(FTP\Connection $ftp, string $directory): string|false {} + function ftp_rmdir(FTP\Connection $ftp, string $directory): bool {} + function ftp_chmod(FTP\Connection $ftp, int $permissions, string $filename): int|false {} /** @param string $response */ - function ftp_alloc(FTP\Connection|resource $ftp, int $size, &$response = null): bool {} - function ftp_nlist(FTP\Connection|resource $ftp, string $directory): array|false {} - function ftp_rawlist(FTP\Connection|resource $ftp, string $directory, bool $recursive = false): array|false {} - function ftp_mlsd(FTP\Connection|resource $ftp, string $directory): array|false {} - function ftp_systype(FTP\Connection|resource $ftp): string|false {} + function ftp_alloc(FTP\Connection $ftp, int $size, &$response = null): bool {} + + /** + * @return array<int, string>|false + * @refcount 1 + */ + function ftp_nlist(FTP\Connection $ftp, string $directory): array|false {} + + /** + * @return array<int, string>|false + * @refcount 1 + */ + function ftp_rawlist(FTP\Connection $ftp, string $directory, bool $recursive = false): array|false {} + + /** + * @return array<int, array>|false + * @refcount 1 + */ + function ftp_mlsd(FTP\Connection $ftp, string $directory): array|false {} + + function ftp_systype(FTP\Connection $ftp): string|false {} /** @param resource $stream */ - function ftp_fget(FTP\Connection|resource $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {} + function ftp_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {} /** @param resource $stream */ - function ftp_nb_fget(FTP\Connection|resource $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {} - function ftp_pasv(FTP\Connection|resource $ftp, bool $enable): bool {} - function ftp_get(FTP\Connection|resource $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {} - function ftp_nb_get(FTP\Connection|resource $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {} - function ftp_nb_continue(FTP\Connection|resource $ftp): int {} + function ftp_nb_fget(FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {} + function ftp_pasv(FTP\Connection $ftp, bool $enable): bool {} + function ftp_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): bool {} + function ftp_nb_get(FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int|false {} + function ftp_nb_continue(FTP\Connection $ftp): int {} /** @param resource $stream */ - function ftp_fput(FTP\Connection|resource $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): bool {} + function ftp_fput(FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): bool {} /** @param resource $stream */ - function ftp_nb_fput(FTP\Connection|resource $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): int {} - function ftp_put(FTP\Connection|resource $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): bool {} - function ftp_append(FTP\Connection|resource $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool {} - function ftp_nb_put(FTP\Connection|resource $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int|false {} - function ftp_size(FTP\Connection|resource $ftp, string $filename): int {} - function ftp_mdtm(FTP\Connection|resource $ftp, string $filename): int {} - function ftp_rename(FTP\Connection|resource $ftp, string $from, string $to): bool {} - function ftp_delete(FTP\Connection|resource $ftp, string $filename): bool {} - function ftp_site(FTP\Connection|resource $ftp, string $command): bool {} - function ftp_close(FTP\Connection|resource $ftp): bool {} + function ftp_nb_fput(FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): int {} + function ftp_put(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): bool {} + function ftp_append(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool {} + function ftp_nb_put(FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int|false {} + function ftp_size(FTP\Connection $ftp, string $filename): int {} + function ftp_mdtm(FTP\Connection $ftp, string $filename): int {} + function ftp_rename(FTP\Connection $ftp, string $from, string $to): bool {} + function ftp_delete(FTP\Connection $ftp, string $filename): bool {} + function ftp_site(FTP\Connection $ftp, string $command): bool {} + function ftp_close(FTP\Connection $ftp): bool {} /** @alias ftp_close */ - function ftp_quit(FTP\Connection|resource $ftp): bool {} + function ftp_quit(FTP\Connection $ftp): bool {} /** @param int|bool $value */ - function ftp_set_option(FTP\Connection|resource $ftp, int $option, $value): bool {} - function ftp_get_option(FTP\Connection|resource $ftp, int $option): int|bool {} + function ftp_set_option(FTP\Connection $ftp, int $option, $value): bool {} + function ftp_get_option(FTP\Connection $ftp, int $option): int|bool {} } diff --git a/build/stubs/gd.php b/build/stubs/gd.php index c9784009ea8..5b48af23761 100644 --- a/build/stubs/gd.php +++ b/build/stubs/gd.php @@ -1,5 +1,7 @@ <?php +/** @generate-class-entries */ + /** * @strict-properties * @not-serializable @@ -7,3015 +9,326 @@ final class GdImage {} /** - * Retrieve information about the currently installed GD library - * @link https://php.net/manual/en/function.gd-info.php - * @return array an associative array. - * </p> - * <p> - * <table> - * Elements of array returned by <b>gd_info</b> - * <tr valign="top"> - * <td>Attribute</td> - * <td>Meaning</td> - * </tr> - * <tr valign="top"> - * <td>GD Version</td> - * <td>string value describing the installed - * libgd version.</td> - * </tr> - * <tr valign="top"> - * <td>FreeType Support</td> - * <td>boolean value. <b>TRUE</b> - * if FreeType Support is installed.</td> - * </tr> - * <tr valign="top"> - * <td>FreeType Linkage</td> - * <td>string value describing the way in which - * FreeType was linked. Expected values are: 'with freetype', - * 'with TTF library', and 'with unknown library'. This element will - * only be defined if FreeType Support evaluated to - * <b>TRUE</b>.</td> - * </tr> - * <tr valign="top"> - * <td>T1Lib Support</td> - * <td>boolean value. <b>TRUE</b> - * if T1Lib support is included.</td> - * </tr> - * <tr valign="top"> - * <td>GIF Read Support</td> - * <td>boolean value. <b>TRUE</b> - * if support for reading GIF - * images is included.</td> - * </tr> - * <tr valign="top"> - * <td>GIF Create Support</td> - * <td>boolean value. <b>TRUE</b> - * if support for creating GIF - * images is included.</td> - * </tr> - * <tr valign="top"> - * <td>JPEG Support</td> - * <td>boolean value. <b>TRUE</b> - * if JPEG support is included.</td> - * </tr> - * <tr valign="top"> - * <td>PNG Support</td> - * <td>boolean value. <b>TRUE</b> - * if PNG support is included.</td> - * </tr> - * <tr valign="top"> - * <td>WBMP Support</td> - * <td>boolean value. <b>TRUE</b> - * if WBMP support is included.</td> - * </tr> - * <tr valign="top"> - * <td>XBM Support</td> - * <td>boolean value. <b>TRUE</b> - * if XBM support is included.</td> - * </tr> - * <tr valign="top"> - * <td>WebP Support</td> - * <td>boolean value. <b>TRUE</b> - * if WebP support is included.</td> - * </tr> - * </table> - * </p> - * <p> - * Previous to PHP 5.3.0, the JPEG Support attribute was named - * JPG Support. - */ -function gd_info () {} - -/** - * Draws an arc - * @link https://php.net/manual/en/function.imagearc.php - * @param resource $image - * @param int $cx <p> - * x-coordinate of the center. - * </p> - * @param int $cy <p> - * y-coordinate of the center. - * </p> - * @param int $width <p> - * The arc width. - * </p> - * @param int $height <p> - * The arc height. - * </p> - * @param int $start <p> - * The arc start angle, in degrees. - * </p> - * @param int $end <p> - * The arc end angle, in degrees. - * 0° is located at the three-o'clock position, and the arc is drawn - * clockwise. - * </p> - * @param int $color <p> - * A color identifier created with - * <b>imagecolorallocate</b>. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ -function imagearc ($image, $cx, $cy, $width, $height, $start, $end, $color) {} - -/** - * Draw an ellipse - * @link https://php.net/manual/en/function.imageellipse.php - * @param resource $image - * @param int $cx <p> - * x-coordinate of the center. - * </p> - * @param int $cy <p> - * y-coordinate of the center. - * </p> - * @param int $width <p> - * The ellipse width. - * </p> - * @param int $height <p> - * The ellipse height. - * </p> - * @param int $color <p> - * The color of the ellipse. A color identifier created with - * <b>imagecolorallocate</b>. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ -function imageellipse ($image, $cx, $cy, $width, $height, $color) {} - -/** - * Draw a character horizontally - * @link https://php.net/manual/en/function.imagechar.php - * @param resource $image - * @param int $font - * @param int $x <p> - * x-coordinate of the start. - * </p> - * @param int $y <p> - * y-coordinate of the start. - * </p> - * @param string $c <p> - * The character to draw. - * </p> - * @param int $color <p> - * A color identifier created with - * <b>imagecolorallocate</b>. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ -function imagechar ($image, $font, $x, $y, $c, $color) {} - -/** - * Draw a character vertically - * @link https://php.net/manual/en/function.imagecharup.php - * @param resource $image - * @param int $font - * @param int $x <p> - * x-coordinate of the start. - * </p> - * @param int $y <p> - * y-coordinate of the start. - * </p> - * @param string $c <p> - * The character to draw. - * </p> - * @param int $color <p> - * A color identifier created with - * <b>imagecolorallocate</b>. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ -function imagecharup ($image, $font, $x, $y, $c, $color) {} - -/** - * Get the index of the color of a pixel - * @link https://php.net/manual/en/function.imagecolorat.php - * @param resource $image - * @param int $x <p> - * x-coordinate of the point. - * </p> - * @param int $y <p> - * y-coordinate of the point. - * </p> - * @return int|false the index of the color or <b>FALSE</b> on failure - */ -function imagecolorat ($image, $x, $y) {} - -/** - * Allocate a color for an image - * @link https://php.net/manual/en/function.imagecolorallocate.php - * @param resource $image - * @param int $red <p>Value of red component.</p> - * @param int $green <p>Value of green component.</p> - * @param int $blue <p>Value of blue component.</p> - * @return int|false A color identifier or <b>FALSE</b> if the allocation failed. - */ -function imagecolorallocate ($image, $red, $green, $blue) {} - -/** - * Copy the palette from one image to another - * @link https://php.net/manual/en/function.imagepalettecopy.php - * @param resource $destination <p> - * The destination image resource. - * </p> - * @param resource $source <p> - * The source image resource. - * </p> - * @return void No value is returned. - */ -function imagepalettecopy ($destination, $source) {} - -/** - * Create a new image from the image stream in the string - * @link https://php.net/manual/en/function.imagecreatefromstring.php - * @param string $image <p> - * A string containing the image data. - * </p> - * @return resource|false An image resource will be returned on success. <b>FALSE</b> is returned if - * the image type is unsupported, the data is not in a recognised format, - * or the image is corrupt and cannot be loaded. - */ -function imagecreatefromstring ($image) {} - -/** - * Get the index of the closest color to the specified color - * @link https://php.net/manual/en/function.imagecolorclosest.php - * @param resource $image - * @param int $red <p>Value of red component.</p> - * @param int $green <p>Value of green component.</p> - * @param int $blue <p>Value of blue component.</p> - * @return int|false the index of the closest color, in the palette of the image, to - * the specified one or <b>FALSE</b> on failure - */ -function imagecolorclosest ($image, $red, $green, $blue) {} - -/** - * Get the index of the color which has the hue, white and blackness - * @link https://php.net/manual/en/function.imagecolorclosesthwb.php - * @param resource $image - * @param int $red <p>Value of red component.</p> - * @param int $green <p>Value of green component.</p> - * @param int $blue <p>Value of blue component.</p> - * @return int|false an integer with the index of the color which has - * the hue, white and blackness nearest the given color or <b>FALSE</b> on failure - */ -function imagecolorclosesthwb ($image, $red, $green, $blue) {} - -/** - * De-allocate a color for an image - * @link https://php.net/manual/en/function.imagecolordeallocate.php - * @param resource $image - * @param int $color <p> - * The color identifier. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ -function imagecolordeallocate ($image, $color) {} - -/** - * Get the index of the specified color or its closest possible alternative - * @link https://php.net/manual/en/function.imagecolorresolve.php - * @param resource $image - * @param int $red <p>Value of red component.</p> - * @param int $green <p>Value of green component.</p> - * @param int $blue <p>Value of blue component.</p> - * @return int|false a color index or <b>FALSE</b> on failure - */ -function imagecolorresolve ($image, $red, $green, $blue) {} - -/** - * Get the index of the specified color - * @link https://php.net/manual/en/function.imagecolorexact.php - * @param resource $image - * @param int $red <p>Value of red component.</p> - * @param int $green <p>Value of green component.</p> - * @param int $blue <p>Value of blue component.</p> - * @return int|false the index of the specified color in the palette, -1 if the - * color does not exist, or <b>FALSE</b> on failure - */ -function imagecolorexact ($image, $red, $green, $blue) {} - -/** - * Set the color for the specified palette index - * @link https://php.net/manual/en/function.imagecolorset.php - * @param resource $image - * @param int $index <p> - * An index in the palette. - * </p> - * @param int $red <p>Value of red component.</p> - * @param int $green <p>Value of green component.</p> - * @param int $blue <p>Value of blue component.</p> - * @param int $alpha [optional] <p> - * Value of alpha component. - * </p> - * @return void No value is returned. - */ -function imagecolorset ($image, $index, $red, $green, $blue, $alpha = 0) {} - -/** - * Define a color as transparent - * @link https://php.net/manual/en/function.imagecolortransparent.php - * @param resource $image - * @param int $color [optional] <p> - * A color identifier created with - * <b>imagecolorallocate</b>. - * </p> - * @return int|false The identifier of the new (or current, if none is specified) - * transparent color is returned. If <i>color</i> - * is not specified, and the image has no transparent color, the - * returned identifier will be -1. If an error occurs, <b>FALSE</b> is returned. - */ -function imagecolortransparent ($image, $color = null) {} - -/** - * Find out the number of colors in an image's palette - * @link https://php.net/manual/en/function.imagecolorstotal.php - * @param resource $image <p> - * An image resource, returned by one of the image creation functions, such - * as <b>imagecreatefromgif</b>. - * </p> - * @return int|false the number of colors in the specified image's palette, 0 for - * truecolor images, or <b>FALSE</b> on failure - */ -function imagecolorstotal ($image) {} - -/** - * Get the colors for an index - * @link https://php.net/manual/en/function.imagecolorsforindex.php - * @param resource $image - * @param int $index <p> - * The color index. - * </p> - * @return array|false an associative array with red, green, blue and alpha keys that - * contain the appropriate values for the specified color index or <b>FALSE</b> on failure - */ -function imagecolorsforindex ($image, $index) {} - -/** - * Copy part of an image - * @link https://php.net/manual/en/function.imagecopy.php - * @param resource $dst_im <p> - * Destination image link resource. - * </p> - * @param resource $src_im <p> - * Source image link resource. - * </p> - * @param int $dst_x <p> - * x-coordinate of destination point. - * </p> - * @param int $dst_y <p> - * y-coordinate of destination point. - * </p> - * @param int $src_x <p> - * x-coordinate of source point. - * </p> - * @param int $src_y <p> - * y-coordinate of source point. - * </p> - * @param int $src_w <p> - * Source width. - * </p> - * @param int $src_h <p> - * Source height. - * </p> - * @return bool true on success or false on failure. - */ -function imagecopy ($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h) {} - -/** - * Copy and merge part of an image - * @link https://php.net/manual/en/function.imagecopymerge.php - * @param resource $dst_im <p> - * Destination image link resource. - * </p> - * @param resource $src_im <p> - * Source image link resource. - * </p> - * @param int $dst_x <p> - * x-coordinate of destination point. - * </p> - * @param int $dst_y <p> - * y-coordinate of destination point. - * </p> - * @param int $src_x <p> - * x-coordinate of source point. - * </p> - * @param int $src_y <p> - * y-coordinate of source point. - * </p> - * @param int $src_w <p> - * Source width. - * </p> - * @param int $src_h <p> - * Source height. - * </p> - * @param int $pct <p> - * The two images will be merged according to pct - * which can range from 0 to 100. When pct = 0, - * no action is taken, when 100 this function behaves identically - * to imagecopy for pallete images, while it - * implements alpha transparency for true colour images. - * </p> - * @return bool true on success or false on failure. - */ -function imagecopymerge ($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct) {} - -/** - * Copy and merge part of an image with gray scale - * @link https://php.net/manual/en/function.imagecopymergegray.php - * @param resource $dst_im <p> - * Destination image link resource. - * </p> - * @param resource $src_im <p> - * Source image link resource. - * </p> - * @param int $dst_x <p> - * x-coordinate of destination point. - * </p> - * @param int $dst_y <p> - * y-coordinate of destination point. - * </p> - * @param int $src_x <p> - * x-coordinate of source point. - * </p> - * @param int $src_y <p> - * y-coordinate of source point. - * </p> - * @param int $src_w <p> - * Source width. - * </p> - * @param int $src_h <p> - * Source height. - * </p> - * @param int $pct <p> - * The src_im will be changed to grayscale according - * to pct where 0 is fully grayscale and 100 is - * unchanged. When pct = 100 this function behaves - * identically to imagecopy for pallete images, while - * it implements alpha transparency for true colour images. - * </p> - * @return bool true on success or false on failure. - */ -function imagecopymergegray ($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct) {} - -/** - * Copy and resize part of an image - * @link https://php.net/manual/en/function.imagecopyresized.php - * @param resource $dst_image - * @param resource $src_image - * @param int $dst_x <p> - * x-coordinate of destination point. - * </p> - * @param int $dst_y <p> - * y-coordinate of destination point. - * </p> - * @param int $src_x <p> - * x-coordinate of source point. - * </p> - * @param int $src_y <p> - * y-coordinate of source point. - * </p> - * @param int $dst_w <p> - * Destination width. - * </p> - * @param int $dst_h <p> - * Destination height. - * </p> - * @param int $src_w <p> - * Source width. - * </p> - * @param int $src_h <p> - * Source height. - * </p> - * @return bool true on success or false on failure. - */ -function imagecopyresized ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) {} - -/** - * Create a new palette based image - * @link https://php.net/manual/en/function.imagecreate.php - * @param int $width <p> - * The image width. - * </p> - * @param int $height <p> - * The image height. - * </p> - * @return resource|false an image resource identifier on success, false on errors. - */ -function imagecreate ($width, $height) {} - -/** - * Create a new true color image - * @link https://php.net/manual/en/function.imagecreatetruecolor.php - * @param int $width <p> - * Image width. - * </p> - * @param int $height <p> - * Image height. - * </p> - * @return resource|false an image resource identifier on success, false on errors. - */ -function imagecreatetruecolor ($width, $height) {} - -/** - * Finds whether an image is a truecolor image - * @link https://php.net/manual/en/function.imageistruecolor.php - * @param resource $image - * @return bool true if the image is truecolor, false - * otherwise. - */ -function imageistruecolor ($image) {} - -/** - * Convert a true color image to a palette image - * @link https://php.net/manual/en/function.imagetruecolortopalette.php - * @param resource $image - * @param bool $dither <p> - * Indicates if the image should be dithered - if it is true then - * dithering will be used which will result in a more speckled image but - * with better color approximation. - * </p> - * @param int $ncolors <p> - * Sets the maximum number of colors that should be retained in the palette. - * </p> - * @return bool true on success or false on failure. - */ -function imagetruecolortopalette ($image, $dither, $ncolors) {} - -/** - * Set the thickness for line drawing - * @link https://php.net/manual/en/function.imagesetthickness.php - * @param resource $image - * @param int $thickness <p> - * Thickness, in pixels. - * </p> - * @return bool true on success or false on failure. - */ -function imagesetthickness ($image, $thickness) {} - -/** - * Draw a partial arc and fill it - * @link https://php.net/manual/en/function.imagefilledarc.php - * @param resource $image - * @param int $cx <p> - * x-coordinate of the center. - * </p> - * @param int $cy <p> - * y-coordinate of the center. - * </p> - * @param int $width <p> - * The arc width. - * </p> - * @param int $height <p> - * The arc height. - * </p> - * @param int $start <p> - * The arc start angle, in degrees. - * </p> - * @param int $end <p> - * The arc end angle, in degrees. - * 0° is located at the three-o'clock position, and the arc is drawn - * clockwise. - * </p> - * @param int $color <p> - * A color identifier created with - * imagecolorallocate. - * </p> - * @param int $style <p> - * A bitwise OR of the following possibilities: - * IMG_ARC_PIE - * @return bool true on success or false on failure. - */ -function imagefilledarc ($image, $cx, $cy, $width, $height, $start, $end, $color, $style) {} - -/** - * Draw a filled ellipse - * @link https://php.net/manual/en/function.imagefilledellipse.php - * @param resource $image - * @param int $cx <p> - * x-coordinate of the center. - * </p> - * @param int $cy <p> - * y-coordinate of the center. - * </p> - * @param int $width <p> - * The ellipse width. - * </p> - * @param int $height <p> - * The ellipse height. - * </p> - * @param int $color <p> - * The fill color. A color identifier created with - * imagecolorallocate. - * </p> - * @return bool true on success or false on failure. - */ -function imagefilledellipse ($image, $cx, $cy, $width, $height, $color) {} - -/** - * Set the blending mode for an image - * @link https://php.net/manual/en/function.imagealphablending.php - * @param resource $image - * @param bool $blendmode <p> - * Whether to enable the blending mode or not. On true color images - * the default value is true otherwise the default value is false - * </p> - * @return bool true on success or false on failure. - */ -function imagealphablending ($image, $blendmode) {} - -/** - * Set the flag to save full alpha channel information (as opposed to single-color transparency) when saving PNG images - * @link https://php.net/manual/en/function.imagesavealpha.php - * @param resource $image - * @param bool $saveflag <p> - * Whether to save the alpha channel or not. Default to false. - * </p> - * @return bool true on success or false on failure. - */ -function imagesavealpha ($image, $saveflag) {} - -/** - * Allocate a color for an image - * @link https://php.net/manual/en/function.imagecolorallocatealpha.php - * @param resource $image - * @param int $red <p> - * Value of red component. - * </p> - * @param int $green <p> - * Value of green component. - * </p> - * @param int $blue <p> - * Value of blue component. - * </p> - * @param int $alpha <p> - * A value between 0 and 127. - * 0 indicates completely opaque while - * 127 indicates completely transparent. - * </p> - * @return int|false A color identifier or false if the allocation failed. - */ -function imagecolorallocatealpha ($image, $red, $green, $blue, $alpha) {} - -/** - * Get the index of the specified color + alpha or its closest possible alternative - * @link https://php.net/manual/en/function.imagecolorresolvealpha.php - * @param resource $image - * @param int $red <p> - * Value of red component. - * </p> - * @param int $green <p> - * Value of green component. - * </p> - * @param int $blue <p> - * Value of blue component. - * </p> - * @param int $alpha <p> - * A value between 0 and 127. - * 0 indicates completely opaque while - * 127 indicates completely transparent. - * </p> - * @return int|false a color index or <b>FALSE</b> on failure - */ -function imagecolorresolvealpha ($image, $red, $green, $blue, $alpha) {} - -/** - * Get the index of the closest color to the specified color + alpha - * @link https://php.net/manual/en/function.imagecolorclosestalpha.php - * @param resource $image - * @param int $red <p> - * Value of red component. - * </p> - * @param int $green <p> - * Value of green component. - * </p> - * @param int $blue <p> - * Value of blue component. - * </p> - * @param int $alpha <p> - * A value between 0 and 127. - * 0 indicates completely opaque while - * 127 indicates completely transparent. - * </p> - * @return int|false the index of the closest color in the palette or - * <b>FALSE</b> on failure - */ -function imagecolorclosestalpha ($image, $red, $green, $blue, $alpha) {} - -/** - * Get the index of the specified color + alpha - * @link https://php.net/manual/en/function.imagecolorexactalpha.php - * @param resource $image - * @param int $red <p> - * Value of red component. - * </p> - * @param int $green <p> - * Value of green component. - * </p> - * @param int $blue <p> - * Value of blue component. - * </p> - * @param int $alpha <p> - * A value between 0 and 127. - * 0 indicates completely opaque while - * 127 indicates completely transparent. - * </p> - * @return int|false the index of the specified color+alpha in the palette of the - * image, -1 if the color does not exist in the image's palette, or <b>FALSE</b> - * on failure - */ -function imagecolorexactalpha ($image, $red, $green, $blue, $alpha) {} - -/** - * Copy and resize part of an image with resampling - * @link https://php.net/manual/en/function.imagecopyresampled.php - * @param resource $dst_image - * @param resource $src_image - * @param int $dst_x <p> - * x-coordinate of destination point. - * </p> - * @param int $dst_y <p> - * y-coordinate of destination point. - * </p> - * @param int $src_x <p> - * x-coordinate of source point. - * </p> - * @param int $src_y <p> - * y-coordinate of source point. - * </p> - * @param int $dst_w <p> - * Destination width. - * </p> - * @param int $dst_h <p> - * Destination height. - * </p> - * @param int $src_w <p> - * Source width. - * </p> - * @param int $src_h <p> - * Source height. - * </p> - * @return bool true on success or false on failure. - */ -function imagecopyresampled ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) {} - -/** - * Rotate an image with a given angle - * @link https://php.net/manual/en/function.imagerotate.php - * @param resource $image - * @param float $angle <p> - * Rotation angle, in degrees. - * </p> - * @param int $bgd_color <p> - * Specifies the color of the uncovered zone after the rotation - * </p> - * @param int $ignore_transparent [optional] <p> - * If set and non-zero, transparent colors are ignored (otherwise kept). - * </p> - * @return resource|false the rotated image or <b>FALSE</b> on failure - */ -function imagerotate ($image, $angle, $bgd_color, $ignore_transparent = null) {} - -/** - * Should antialias functions be used or not. <br/> - * Before 7.2.0 it's only available if PHP iscompiled with the bundled version of the GD library. - * @link https://php.net/manual/en/function.imageantialias.php - * @param resource $image - * @param bool $enabled <p> - * Whether to enable antialiasing or not. - * </p> - * @return bool true on success or false on failure. - */ -function imageantialias ($image, $enabled) {} - -/** - * Set the tile image for filling - * @link https://php.net/manual/en/function.imagesettile.php - * @param resource $image - * @param resource $tile <p> - * The image resource to be used as a tile. - * </p> - * @return bool true on success or false on failure. - */ -function imagesettile ($image, $tile) {} - -/** - * Set the brush image for line drawing - * @link https://php.net/manual/en/function.imagesetbrush.php - * @param resource $image - * @param resource $brush <p> - * An image resource. - * </p> - * @return bool true on success or false on failure. - */ -function imagesetbrush ($image, $brush) {} - -/** - * Set the style for line drawing - * @link https://php.net/manual/en/function.imagesetstyle.php - * @param resource $image - * @param array $style <p> - * An array of pixel colors. You can use the - * IMG_COLOR_TRANSPARENT constant to add a - * transparent pixel. - * </p> - * @return bool true on success or false on failure. - */ -function imagesetstyle ($image, array $style) {} - -/** - * Create a new image from file or URL - * @link https://php.net/manual/en/function.imagecreatefrompng.php - * @param string $filename <p> - * Path to the PNG image. - * </p> - * @return resource|false an image resource identifier on success, false on errors. - */ -function imagecreatefrompng ($filename) {} - -/** - * Create a new image from file or URL - * @link https://php.net/manual/en/function.imagecreatefromgif.php - * @param string $filename <p> - * Path to the GIF image. - * </p> - * @return resource|false an image resource identifier on success, false on errors. - */ -function imagecreatefromgif ($filename) {} - -/** - * Create a new image from file or URL - * @link https://php.net/manual/en/function.imagecreatefromjpeg.php - * @param string $filename <p> - * Path to the JPEG image. - * </p> - * @return resource|false an image resource identifier on success, false on errors. - */ -function imagecreatefromjpeg ($filename) {} - -/** - * Create a new image from file or URL - * @link https://php.net/manual/en/function.imagecreatefromwbmp.php - * @param string $filename <p> - * Path to the WBMP image. - * </p> - * @return resource|false an image resource identifier on success, false on errors. - */ -function imagecreatefromwbmp ($filename) {} - -/** - * Create a new image from file or URL - * @link https://php.net/manual/en/function.imagecreatefromwebp.php - * @param string $filename <p> - * Path to the WebP image. - * </p> - * @return resource|false an image resource identifier on success, false on errors. - * @since 5.4 - */ -function imagecreatefromwebp ($filename) {} - -/** - * Create a new image from file or URL - * @link https://php.net/manual/en/function.imagecreatefromxbm.php - * @param string $filename <p> - * Path to the XBM image. - * </p> - * @return resource|false an image resource identifier on success, false on errors. - */ -function imagecreatefromxbm ($filename) {} - -/** - * Create a new image from file or URL - * @link https://php.net/manual/en/function.imagecreatefromxpm.php - * @param string $filename <p> - * Path to the XPM image. - * </p> - * @return resource|false an image resource identifier on success, false on errors. - */ -function imagecreatefromxpm ($filename) {} - -/** - * Create a new image from GD file or URL - * @link https://php.net/manual/en/function.imagecreatefromgd.php - * @param string $filename <p> - * Path to the GD file. - * </p> - * @return resource|false an image resource identifier on success, false on errors. - */ -function imagecreatefromgd ($filename) {} - -/** - * Create a new image from GD2 file or URL - * @link https://php.net/manual/en/function.imagecreatefromgd2.php - * @param string $filename <p> - * Path to the GD2 image. - * </p> - * @return resource|false an image resource identifier on success, false on errors. - */ -function imagecreatefromgd2 ($filename) {} - -/** - * Create a new image from a given part of GD2 file or URL - * @link https://php.net/manual/en/function.imagecreatefromgd2part.php - * @param string $filename <p> - * Path to the GD2 image. - * </p> - * @param int $srcX <p> - * x-coordinate of source point. - * </p> - * @param int $srcY <p> - * y-coordinate of source point. - * </p> - * @param int $width <p> - * Source width. - * </p> - * @param int $height <p> - * Source height. - * </p> - * @return resource|false an image resource identifier on success, false on errors. - */ -function imagecreatefromgd2part ($filename, $srcX, $srcY, $width, $height) {} - -/** - * Output a PNG image to either the browser or a file - * @link https://php.net/manual/en/function.imagepng.php - * @param resource $image - * @param string $filename [optional] <p> - * The path to save the file to. If not set or &null;, the raw image stream - * will be outputted directly. - * </p> - * <p> - * &null; is invalid if the quality and - * filters arguments are not used. - * </p> - * @param int $quality [optional] <p> - * Compression level: from 0 (no compression) to 9. - * </p> - * @param int $filters [optional] <p> - * Allows reducing the PNG file size. It is a bitmask field which may be - * set to any combination of the PNG_FILTER_XXX - * constants. PNG_NO_FILTER or - * PNG_ALL_FILTERS may also be used to respectively - * disable or activate all filters. - * </p> - * @return bool true on success or false on failure. - */ -function imagepng ($image, $filename = null, $quality = null, $filters = null) {} - -/** - * Output a WebP image to browser or file - * @link https://php.net/manual/en/function.imagewebp.php - * @param resource $image - * @param string $to [optional] <p> - * The path to save the file to. If not set or &null;, the raw image stream - * will be outputted directly. - * </p> - * @param int $quality [optional] <p> - * quality ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). - * </p> - * @return bool true on success or false on failure. - * @since 5.4 - */ -function imagewebp ($image, $to = null, $quality = 80) {} - -/** - * Output image to browser or file - * @link https://php.net/manual/en/function.imagegif.php - * @param resource $image - * @param string $filename [optional] <p> - * The path to save the file to. If not set or &null;, the raw image stream - * will be outputted directly. - * </p> - * @return bool true on success or false on failure. - */ -function imagegif ($image, $filename = null) {} - -/** - * Output image to browser or file - * @link https://php.net/manual/en/function.imagejpeg.php - * @param resource $image - * @param string $filename [optional] <p> - * The path to save the file to. If not set or &null;, the raw image stream - * will be outputted directly. - * </p> - * <p> - * To skip this argument in order to provide the - * quality parameter, use &null;. - * </p> - * @param int $quality [optional] <p> - * quality is optional, and ranges from 0 (worst - * quality, smaller file) to 100 (best quality, biggest file). The - * default is the default IJG quality value (about 75). - * </p> - * @return bool true on success or false on failure. - */ -function imagejpeg ($image, $filename = null, $quality = null) {} - -/** - * Output image to browser or file - * @link https://php.net/manual/en/function.imagewbmp.php - * @param resource $image - * @param string $filename [optional] <p> - * The path to save the file to. If not set or &null;, the raw image stream - * will be outputted directly. - * </p> - * @param int $foreground [optional] <p> - * You can set the foreground color with this parameter by setting an - * identifier obtained from imagecolorallocate. - * The default foreground color is black. - * </p> - * @return bool true on success or false on failure. - */ -function imagewbmp ($image, $filename = null, $foreground = null) {} - -/** - * Output GD image to browser or file. <br/> - * Since 7.2.0 allows to output truecolor images. - * @link https://php.net/manual/en/function.imagegd.php - * @param resource $image - * @param string $filename [optional] <p> - * The path to save the file to. If not set or &null;, the raw image stream - * will be outputted directly. - * </p> - * @return bool true on success or false on failure. - */ -function imagegd ($image, $filename = null) {} - -/** - * Output GD2 image to browser or file - * @link https://php.net/manual/en/function.imagegd2.php - * @param resource $image - * @param string $filename [optional] <p> - * The path to save the file to. If not set or &null;, the raw image stream - * will be outputted directly. - * </p> - * @param int $chunk_size [optional] <p> - * Chunk size. - * </p> - * @param int $type [optional] <p> - * Either IMG_GD2_RAW or - * IMG_GD2_COMPRESSED. Default is - * IMG_GD2_RAW. - * </p> - * @return bool true on success or false on failure. - */ -function imagegd2 ($image, $filename = null, $chunk_size = null, $type = null) {} - -/** - * Destroy an image - * @link https://php.net/manual/en/function.imagedestroy.php - * @param resource $image - * @return bool true on success or false on failure. - */ -function imagedestroy ($image) {} - -/** - * Apply a gamma correction to a GD image - * @link https://php.net/manual/en/function.imagegammacorrect.php - * @param resource $image - * @param float $inputgamma <p> - * The input gamma. - * </p> - * @param float $outputgamma <p> - * The output gamma. - * </p> - * @return bool true on success or false on failure. - */ -function imagegammacorrect ($image, $inputgamma, $outputgamma) {} - -/** - * Flood fill - * @link https://php.net/manual/en/function.imagefill.php - * @param resource $image - * @param int $x <p> - * x-coordinate of start point. - * </p> - * @param int $y <p> - * y-coordinate of start point. - * </p> - * @param int $color <p> - * The fill color. A color identifier created with - * imagecolorallocate. - * </p> - * @return bool true on success or false on failure. - */ -function imagefill ($image, $x, $y, $color) {} - -/** - * Draw a filled polygon - * @link https://php.net/manual/en/function.imagefilledpolygon.php - * @param resource $image - * @param array $points <p> - * An array containing the x and y - * coordinates of the polygons vertices consecutively. - * </p> - * @param int $num_points [optional] <p> - * Total number of vertices, which must be at least 3. - * </p> - * @param int $color <p> - * A color identifier created with - * imagecolorallocate. - * </p> - * @return bool true on success or false on failure. - */ -function imagefilledpolygon ($image, array $points, $num_points, $color) {} - -/** - * Draw a filled rectangle - * @link https://php.net/manual/en/function.imagefilledrectangle.php - * @param resource $image - * @param int $x1 <p> - * x-coordinate for point 1. - * </p> - * @param int $y1 <p> - * y-coordinate for point 1. - * </p> - * @param int $x2 <p> - * x-coordinate for point 2. - * </p> - * @param int $y2 <p> - * y-coordinate for point 2. - * </p> - * @param int $color <p> - * The fill color. A color identifier created with - * imagecolorallocate. - * </p> - * @return bool true on success or false on failure. - */ -function imagefilledrectangle ($image, $x1, $y1, $x2, $y2, $color) {} - -/** - * Flood fill to specific color - * @link https://php.net/manual/en/function.imagefilltoborder.php - * @param resource $image - * @param int $x <p> - * x-coordinate of start. - * </p> - * @param int $y <p> - * y-coordinate of start. - * </p> - * @param int $border <p> - * The border color. A color identifier created with - * imagecolorallocate. - * </p> - * @param int $color <p> - * The fill color. A color identifier created with - * imagecolorallocate. - * </p> - * @return bool true on success or false on failure. - */ -function imagefilltoborder ($image, $x, $y, $border, $color) {} - -/** - * Get font width - * @link https://php.net/manual/en/function.imagefontwidth.php - * @param int $font - * @return int the width of the pixel - */ -function imagefontwidth ($font) {} - -/** - * Get font height - * @link https://php.net/manual/en/function.imagefontheight.php - * @param int $font - * @return int the height of the pixel. - */ -function imagefontheight ($font) {} - -/** - * Enable or disable interlace - * @link https://php.net/manual/en/function.imageinterlace.php - * @param resource $image - * @param int $interlace [optional] <p> - * If non-zero, the image will be interlaced, else the interlace bit is - * turned off. - * </p> - * @return int|false 1 if the interlace bit is set for the image, - * 0 if it is not, or <b>FALSE</b> on failure - */ -function imageinterlace ($image, $interlace = null) {} - -/** - * Draw a line - * @link https://php.net/manual/en/function.imageline.php - * @param resource $image - * @param int $x1 <p> - * x-coordinate for first point. - * </p> - * @param int $y1 <p> - * y-coordinate for first point. - * </p> - * @param int $x2 <p> - * x-coordinate for second point. - * </p> - * @param int $y2 <p> - * y-coordinate for second point. - * </p> - * @param int $color <p> - * The line color. A color identifier created with - * imagecolorallocate. - * </p> - * @return bool true on success or false on failure. - */ -function imageline ($image, $x1, $y1, $x2, $y2, $color) {} - -/** - * Load a new font - * @link https://php.net/manual/en/function.imageloadfont.php - * @param string $file <p> - * The font file format is currently binary and architecture - * dependent. This means you should generate the font files on the - * same type of CPU as the machine you are running PHP on. - * </p> - * <p> - * <table> - * Font file format - * <tr valign="top"> - * <td>byte position</td> - * <td>C data type</td> - * <td>description</td> - * </tr> - * <tr valign="top"> - * <td>byte 0-3</td> - * <td>int</td> - * <td>number of characters in the font</td> - * </tr> - * <tr valign="top"> - * <td>byte 4-7</td> - * <td>int</td> - * <td> - * value of first character in the font (often 32 for space) - * </td> - * </tr> - * <tr valign="top"> - * <td>byte 8-11</td> - * <td>int</td> - * <td>pixel width of each character</td> - * </tr> - * <tr valign="top"> - * <td>byte 12-15</td> - * <td>int</td> - * <td>pixel height of each character</td> - * </tr> - * <tr valign="top"> - * <td>byte 16-</td> - * <td>char</td> - * <td> - * array with character data, one byte per pixel in each - * character, for a total of (nchars*width*height) bytes. - * </td> - * </tr> - * </table> - * </p> - * @return int|false The font identifier which is always bigger than 5 to avoid conflicts with - * built-in fonts or false on errors. - */ -function imageloadfont ($file) {} - -/** - * Draws a polygon - * @link https://php.net/manual/en/function.imagepolygon.php - * @param resource $image - * @param array $points <p> - * An array containing the polygon's vertices, e.g.: - * <tr valign="top"> - * <td>points[0]</td> - * <td>= x0</td> - * </tr> - * <tr valign="top"> - * <td>points[1]</td> - * <td>= y0</td> - * </tr> - * <tr valign="top"> - * <td>points[2]</td> - * <td>= x1</td> - * </tr> - * <tr valign="top"> - * <td>points[3]</td> - * <td>= y1</td> - * </tr> - * </p> - * @param int $num_points [optional] <p> - * Total number of points (vertices). - * </p> - * @param int $color <p> - * A color identifier created with - * imagecolorallocate. - * </p> - * @return bool true on success or false on failure. - */ -function imagepolygon ($image, array $points, $num_points, $color) {} - -/** - * Draw a rectangle - * @link https://php.net/manual/en/function.imagerectangle.php - * @param resource $image - * @param int $x1 <p> - * Upper left x coordinate. - * </p> - * @param int $y1 <p> - * Upper left y coordinate - * 0, 0 is the top left corner of the image. - * </p> - * @param int $x2 <p> - * Bottom right x coordinate. - * </p> - * @param int $y2 <p> - * Bottom right y coordinate. - * </p> - * @param int $color <p> - * A color identifier created with - * imagecolorallocate. - * </p> - * @return bool true on success or false on failure. - */ -function imagerectangle ($image, $x1, $y1, $x2, $y2, $color) {} - -/** - * Set a single pixel - * @link https://php.net/manual/en/function.imagesetpixel.php - * @param resource $image - * @param int $x <p> - * x-coordinate. - * </p> - * @param int $y <p> - * y-coordinate. - * </p> - * @param int $color <p> - * A color identifier created with - * imagecolorallocate. - * </p> - * @return bool true on success or false on failure. - */ -function imagesetpixel ($image, $x, $y, $color) {} - -/** - * Draw a string horizontally - * @link https://php.net/manual/en/function.imagestring.php - * @param resource $image - * @param int $font - * @param int $x <p> - * x-coordinate of the upper left corner. - * </p> - * @param int $y <p> - * y-coordinate of the upper left corner. - * </p> - * @param string $string <p> - * The string to be written. - * </p> - * @param int $color <p> - * A color identifier created with - * imagecolorallocate. - * </p> - * @return bool true on success or false on failure. - */ -function imagestring ($image, $font, $x, $y, $string, $color) {} - -/** - * Draw a string vertically - * @link https://php.net/manual/en/function.imagestringup.php - * @param resource $image - * @param int $font - * @param int $x <p> - * x-coordinate of the upper left corner. - * </p> - * @param int $y <p> - * y-coordinate of the upper left corner. - * </p> - * @param string $string <p> - * The string to be written. - * </p> - * @param int $color <p> - * A color identifier created with - * imagecolorallocate. - * </p> - * @return bool true on success or false on failure. - */ -function imagestringup ($image, $font, $x, $y, $string, $color) {} - -/** - * Get image width - * @link https://php.net/manual/en/function.imagesx.php - * @param resource $image - * @return int|false Return the width of the image or false on - * errors. - */ -function imagesx ($image) {} - -/** - * Get image height - * @link https://php.net/manual/en/function.imagesy.php - * @param resource $image - * @return int|false Return the height of the image or false on - * errors. - */ -function imagesy ($image) {} - -/** - * Draw a dashed line - * @link https://php.net/manual/en/function.imagedashedline.php - * @param resource $image - * @param int $x1 <p> - * Upper left x coordinate. - * </p> - * @param int $y1 <p> - * Upper left y coordinate 0, 0 is the top left corner of the image. - * </p> - * @param int $x2 <p> - * Bottom right x coordinate. - * </p> - * @param int $y2 <p> - * Bottom right y coordinate. - * </p> - * @param int $color <p> - * The fill color. A color identifier created with - * imagecolorallocate. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * @deprecated Use combination of imagesetstyle() and imageline() instead - */ -function imagedashedline ($image, $x1, $y1, $x2, $y2, $color) {} - -/** - * Give the bounding box of a text using TrueType fonts - * @link https://php.net/manual/en/function.imagettfbbox.php - * @param float $size <p> - * The font size. Depending on your version of GD, this should be - * specified as the pixel size (GD1) or point size (GD2). - * </p> - * @param float $angle <p> - * Angle in degrees in which text will be measured. - * </p> - * @param string $fontfile <p> - * The name of the TrueType font file (can be a URL). Depending on - * which version of the GD library that PHP is using, it may attempt to - * search for files that do not begin with a leading '/' by appending - * '.ttf' to the filename and searching along a library-defined font path. - * </p> - * @param string $text <p> - * The string to be measured. - * </p> - * @return array|false imagettfbbox returns an array with 8 - * elements representing four points making the bounding box of the - * text on success and false on error. - * <tr valign="top"> - * <td>key</td> - * <td>contents</td> - * </tr> - * <tr valign="top"> - * <td>0</td> - * <td>lower left corner, X position</td> - * </tr> - * <tr valign="top"> - * <td>1</td> - * <td>lower left corner, Y position</td> - * </tr> - * <tr valign="top"> - * <td>2</td> - * <td>lower right corner, X position</td> - * </tr> - * <tr valign="top"> - * <td>3</td> - * <td>lower right corner, Y position</td> - * </tr> - * <tr valign="top"> - * <td>4</td> - * <td>upper right corner, X position</td> - * </tr> - * <tr valign="top"> - * <td>5</td> - * <td>upper right corner, Y position</td> - * </tr> - * <tr valign="top"> - * <td>6</td> - * <td>upper left corner, X position</td> - * </tr> - * <tr valign="top"> - * <td>7</td> - * <td>upper left corner, Y position</td> - * </tr> - * </p> - * <p> - * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand - * corner seeing the text horizontally. - */ -function imagettfbbox ($size, $angle, $fontfile, $text) {} - -/** - * Write text to the image using TrueType fonts - * @link https://php.net/manual/en/function.imagettftext.php - * @param resource $image - * @param float $size <p> - * The font size. Depending on your version of GD, this should be - * specified as the pixel size (GD1) or point size (GD2). - * </p> - * @param float $angle <p> - * The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a - * value of 90 would result in bottom-to-top reading text. - * </p> - * @param int $x <p> - * The coordinates given by x and - * y will define the basepoint of the first - * character (roughly the lower-left corner of the character). This - * is different from the imagestring, where - * x and y define the - * upper-left corner of the first character. For example, "top left" - * is 0, 0. - * </p> - * @param int $y <p> - * The y-ordinate. This sets the position of the fonts baseline, not the - * very bottom of the character. - * </p> - * @param int $color <p> - * The color index. Using the negative of a color index has the effect of - * turning off antialiasing. See imagecolorallocate. - * </p> - * @param string $fontfile <p> - * The path to the TrueType font you wish to use. - * </p> - * <p> - * Depending on which version of the GD library PHP is using, when - * fontfile does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * </p> - * <p> - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * </p> - * <p> - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * </p> - * <pre> - * <?php - * // Set the enviroment variable for GD - * putenv('GDFONTPATH=' . realpath('.')); - * - * // Name the font to be used (note the lack of the .ttf extension) - * $font = 'SomeFont'; - * ?> - * </pre> - * <p> - * <strong>Note:</strong> - * <code>open_basedir</code> does <em>not</em> apply to fontfile. - * </p> - * @param string $text <p> - * The text string in UTF-8 encoding. - * </p> - * <p> - * May include decimal numeric character references (of the form: - * &#8364;) to access characters in a font beyond position 127. - * The hexadecimal format (like &#xA9;) is supported. - * Strings in UTF-8 encoding can be passed directly. - * </p> - * <p> - * Named entities, such as &copy;, are not supported. Consider using - * html_entity_decode - * to decode these named entities into UTF-8 strings (html_entity_decode() - * supports this as of PHP 5.0.0). - * </p> - * <p> - * If a character is used in the string which is not supported by the - * font, a hollow rectangle will replace the character. - * </p> - * @return array|false an array with 8 elements representing four points making the - * bounding box of the text. The order of the points is lower left, lower - * right, upper right, upper left. The points are relative to the text - * regardless of the angle, so "upper left" means in the top left-hand - * corner when you see the text horizontally. - * Returns false on error. - */ -function imagettftext ($image, $size, $angle, $x, $y, $color, $fontfile, $text) {} - -/** - * Give the bounding box of a text using fonts via freetype2 - * @link https://php.net/manual/en/function.imageftbbox.php - * @param float $size <p> - * The font size. Depending on your version of GD, this should be - * specified as the pixel size (GD1) or point size (GD2). - * </p> - * @param float $angle <p> - * Angle in degrees in which text will be - * measured. - * </p> - * @param string $fontfile <p> - * The name of the TrueType font file (can be a URL). Depending on - * which version of the GD library that PHP is using, it may attempt to - * search for files that do not begin with a leading '/' by appending - * '.ttf' to the filename and searching along a library-defined font path. - * </p> - * @param string $text <p> - * The string to be measured. - * </p> - * @param array $extrainfo [optional] <p> - * <table> - * Possible array indexes for extrainfo - * <tr valign="top"> - * <td>Key</td> - * <td>Type</td> - * <td>Meaning</td> - * </tr> - * <tr valign="top"> - * <td>linespacing</td> - * <td>float</td> - * <td>Defines drawing linespacing</td> - * </tr> - * </table> - * </p> - * @return array|false imageftbbox returns an array with 8 - * elements representing four points making the bounding box of the - * text: - * <tr valign="top"> - * <td>0</td> - * <td>lower left corner, X position</td> - * </tr> - * <tr valign="top"> - * <td>1</td> - * <td>lower left corner, Y position</td> - * </tr> - * <tr valign="top"> - * <td>2</td> - * <td>lower right corner, X position</td> - * </tr> - * <tr valign="top"> - * <td>3</td> - * <td>lower right corner, Y position</td> - * </tr> - * <tr valign="top"> - * <td>4</td> - * <td>upper right corner, X position</td> - * </tr> - * <tr valign="top"> - * <td>5</td> - * <td>upper right corner, Y position</td> - * </tr> - * <tr valign="top"> - * <td>6</td> - * <td>upper left corner, X position</td> - * </tr> - * <tr valign="top"> - * <td>7</td> - * <td>upper left corner, Y position</td> - * </tr> - * </p> - * <p> - * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand - * corner seeing the text horizontally. - * Returns false on error. - */ -function imageftbbox ($size, $angle, $fontfile, $text, $extrainfo = null ) {} - -/** - * Write text to the image using fonts using FreeType 2 - * @link https://php.net/manual/en/function.imagefttext.php - * @param resource $image - * @param float $size <p> - * The font size to use in points. - * </p> - * @param float $angle <p> - * The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a - * value of 90 would result in bottom-to-top reading text. - * </p> - * @param int $x <p> - * The coordinates given by x and - * y will define the basepoint of the first - * character (roughly the lower-left corner of the character). This - * is different from the imagestring, where - * x and y define the - * upper-left corner of the first character. For example, "top left" - * is 0, 0. - * </p> - * @param int $y <p> - * The y-ordinate. This sets the position of the fonts baseline, not the - * very bottom of the character. - * </p> - * @param int $color <p> - * The index of the desired color for the text, see - * imagecolorexact. - * </p> - * @param string $fontfile <p> - * The path to the TrueType font you wish to use. - * </p> - * <p> - * Depending on which version of the GD library PHP is using, when - * fontfile does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * </p> - * <p> - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * </p> - * <p> - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * </p> - * <pre> - * <?php - * // Set the enviroment variable for GD - * putenv('GDFONTPATH=' . realpath('.')); - * - * // Name the font to be used (note the lack of the .ttf extension) - * $font = 'SomeFont'; - * ?> - * </pre> - * <p> - * <strong>Note:</strong> - * <code>open_basedir</code> does <em>not</em> apply to fontfile. - * </p> - * @param string $text <p> - * Text to be inserted into image. - * </p> - * @param array $extrainfo [optional] <p> - * <table> - * Possible array indexes for extrainfo - * <tr valign="top"> - * <td>Key</td> - * <td>Type</td> - * <td>Meaning</td> - * </tr> - * <tr valign="top"> - * <td>linespacing</td> - * <td>float</td> - * <td>Defines drawing linespacing</td> - * </tr> - * </table> - * </p> - * @return array|false This function returns an array defining the four points of the box, starting in the lower left and moving counter-clockwise: - * <tr valign="top"> - * <td>0</td> - * <td>lower left x-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>1</td> - * <td>lower left y-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>2</td> - * <td>lower right x-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>3</td> - * <td>lower right y-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>4</td> - * <td>upper right x-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>5</td> - * <td>upper right y-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>6</td> - * <td>upper left x-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>7</td> - * <td>upper left y-coordinate</td> - * </tr> - * Returns false on error. + * @strict-properties + * @not-serializable */ -function imagefttext ($image, $size, $angle, $x, $y, $color, $fontfile, $text, $extrainfo = null ) {} +final class GdFont {} /** - * Load a PostScript Type 1 font from file - * @link https://php.net/manual/en/function.imagepsloadfont.php - * @param string $filename <p> - * Path to the Postscript font file. - * </p> - * @return resource|false In the case everything went right, a valid font index will be returned and - * can be used for further purposes. Otherwise the function returns false. - * @removed 7.0 This function was REMOVED in PHP 7.0.0. + * @return array<string, string|bool> + * @refcount 1 */ -function imagepsloadfont ($filename) {} +function gd_info(): array {} -/** - * Free memory used by a PostScript Type 1 font - * @link https://php.net/manual/en/function.imagepsfreefont.php - * @param resource $font_index <p> - * A font resource, returned by imagepsloadfont. - * </p> - * @return bool true on success or false on failure. - * @removed 7.0 - */ -function imagepsfreefont ($font_index) {} +function imageloadfont(string $filename): GdFont|false {} -/** - * Change the character encoding vector of a font - * @link https://php.net/manual/en/function.imagepsencodefont.php - * @param resource $font_index <p> - * A font resource, returned by imagepsloadfont. - * </p> - * @param string $encodingfile <p> - * The exact format of this file is described in T1libs documentation. - * T1lib comes with two ready-to-use files, - * IsoLatin1.enc and - * IsoLatin2.enc. - * </p> - * @return bool true on success or false on failure. - * @removed 7.0 - */ -function imagepsencodefont ($font_index, $encodingfile) {} +function imagesetstyle(GdImage $image, array $style): bool {} -/** - * Extend or condense a font - * @link https://php.net/manual/en/function.imagepsextendfont.php - * @param resource $font_index <p> - * A font resource, returned by imagepsloadfont. - * </p> - * @param float $extend <p> - * Extension value, must be greater than 0. - * </p> - * @return bool true on success or false on failure. - * @removed 7.0 - */ -function imagepsextendfont ($font_index, $extend) {} +/** @refcount 1 */ +function imagecreatetruecolor(int $width, int $height): GdImage|false {} -/** - * Slant a font - * @link https://php.net/manual/en/function.imagepsslantfont.php - * @param resource $font_index <p> - * A font resource, returned by imagepsloadfont. - * </p> - * @param float $slant <p> - * Slant level. - * </p> - * @return bool true on success or false on failure. - * @removed 7.0 This function was REMOVED in PHP 7.0.0. - */ -function imagepsslantfont ($font_index, $slant) {} +function imageistruecolor(GdImage $image): bool {} -/** - * Draws a text over an image using PostScript Type1 fonts - * @link https://php.net/manual/en/function.imagepstext.php - * @param resource $image - * @param string $text <p> - * The text to be written. - * </p> - * @param resource $font_index <p> - * A font resource, returned by imagepsloadfont. - * </p> - * @param int $size <p> - * size is expressed in pixels. - * </p> - * @param int $foreground <p> - * The color in which the text will be painted. - * </p> - * @param int $background <p> - * The color to which the text will try to fade in with antialiasing. - * No pixels with the color background are - * actually painted, so the background image does not need to be of solid - * color. - * </p> - * @param int $x <p> - * x-coordinate for the lower-left corner of the first character. - * </p> - * @param int $y <p> - * y-coordinate for the lower-left corner of the first character. - * </p> - * @param int $space [optional] <p> - * Allows you to change the default value of a space in a font. This - * amount is added to the normal value and can also be negative. - * Expressed in character space units, where 1 unit is 1/1000th of an - * em-square. - * </p> - * @param int $tightness [optional] <p> - * tightness allows you to control the amount - * of white space between characters. This amount is added to the - * normal character width and can also be negative. - * Expressed in character space units, where 1 unit is 1/1000th of an - * em-square. - * </p> - * @param float $angle [optional] <p> - * angle is in degrees. - * </p> - * @param int $antialias_steps [optional] <p> - * Allows you to control the number of colours used for antialiasing - * text. Allowed values are 4 and 16. The higher value is recommended - * for text sizes lower than 20, where the effect in text quality is - * quite visible. With bigger sizes, use 4. It's less computationally - * intensive. - * </p> - * @return array|false This function returns an array containing the following elements: - * <tr valign="top"> - * <td>0</td> - * <td>lower left x-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>1</td> - * <td>lower left y-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>2</td> - * <td>upper right x-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>3</td> - * <td>upper right y-coordinate</td> - * </tr> - * Returns false on error. - * @removed 7.0 This function was REMOVED in PHP 7.0.0. - */ -function imagepstext ($image, $text, $font_index, $size, $foreground, $background, $x, $y, $space = null, $tightness = null, $angle = null, $antialias_steps = null) {} +function imagetruecolortopalette(GdImage $image, bool $dither, int $num_colors): bool {} -/** - * Give the bounding box of a text rectangle using PostScript Type1 fonts - * @link https://php.net/manual/en/function.imagepsbbox.php - * @param string $text <p> - * The text to be written. - * </p> - * @param resource $font - * @param int $size <p> - * size is expressed in pixels. - * </p> - * @return array|false an array containing the following elements: - * <tr valign="top"> - * <td>0</td> - * <td>left x-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>1</td> - * <td>upper y-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>2</td> - * <td>right x-coordinate</td> - * </tr> - * <tr valign="top"> - * <td>3</td> - * <td>lower y-coordinate</td> - * </tr> - * Returns false on error. - * @removed 7.0 - */ -function imagepsbbox ($text, $font, $size) {} +function imagepalettetotruecolor(GdImage $image): bool {} -/** - * Return the image types supported by this PHP build - * @link https://php.net/manual/en/function.imagetypes.php - * @return int a bit-field corresponding to the image formats supported by the - * version of GD linked into PHP. The following bits are returned, - * IMG_BMP | IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP | IMG_XPM | IMG_WEBP - */ -function imagetypes () {} +function imagecolormatch(GdImage $image1, GdImage $image2): bool {} -/** - * Convert JPEG image file to WBMP image file - * @link https://php.net/manual/en/function.jpeg2wbmp.php - * @param string $jpegname <p> - * Path to JPEG file. - * </p> - * @param string $wbmpname <p> - * Path to destination WBMP file. - * </p> - * @param int $dest_height <p> - * Destination image height. - * </p> - * @param int $dest_width <p> - * Destination image width. - * </p> - * @param int $threshold <p> - * Threshold value, between 0 and 8 (inclusive). - * </p> - * @return bool true on success or false on failure. - * @deprecated 7.2 Use imagecreatefromjpeg() and imagewbmp() instead - * @removed 8.0 - */ -function jpeg2wbmp ($jpegname, $wbmpname, $dest_height, $dest_width, $threshold) {} +function imagesetthickness(GdImage $image, int $thickness): bool {} -/** - * Convert PNG image file to WBMP image file - * @link https://php.net/manual/en/function.png2wbmp.php - * @param string $pngname <p> - * Path to PNG file. - * </p> - * @param string $wbmpname <p> - * Path to destination WBMP file. - * </p> - * @param int $dest_height <p> - * Destination image height. - * </p> - * @param int $dest_width <p> - * Destination image width. - * </p> - * @param int $threshold <p> - * Threshold value, between 0 and 8 (inclusive). - * </p> - * @return bool true on success or false on failure. - * @deprecated 7.2 Use imagecreatefrompng() and imagewbmp() instead - * @removed 8.0 - */ -function png2wbmp ($pngname, $wbmpname, $dest_height, $dest_width, $threshold) {} +function imagefilledellipse(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color): bool {} -/** - * Output image to browser or file - * @link https://php.net/manual/en/function.image2wbmp.php - * @param resource $image - * @param string $filename [optional] <p> - * Path to the saved file. If not given, the raw image stream will be - * outputted directly. - * </p> - * @param int $threshold [optional] <p> - * Threshold value, between 0 and 255 (inclusive). - * </p> - * @return bool true on success or false on failure. - * @deprecated 7.3 Use imagewbmp() instead - * @removed 8.0 - */ -function image2wbmp ($image, $filename = null, $threshold = null) {} +function imagefilledarc(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color, int $style): bool {} -/** - * Set the alpha blending flag to use the bundled libgd layering effects - * @link https://php.net/manual/en/function.imagelayereffect.php - * @param resource $image - * @param int $effect <p> - * One of the following constants: - * IMG_EFFECT_REPLACE - * Use pixel replacement (equivalent of passing true to - * imagealphablending) - * @return bool true on success or false on failure. - */ -function imagelayereffect ($image, $effect) {} +function imagealphablending(GdImage $image, bool $enable): bool {} -/** - * Makes the colors of the palette version of an image more closely match the true color version - * @link https://php.net/manual/en/function.imagecolormatch.php - * @param $image1 resource <p> - * A truecolor image link resource. - * </p> - * @param $image2 resource <p> - * A palette image link resource pointing to an image that has the same - * size as image1. - * </p> - * @return bool true on success or false on failure. - */ -function imagecolormatch ($image1, $image2) {} +function imagesavealpha(GdImage $image, bool $enable): bool {} -/** - * Output XBM image to browser or file - * @link https://php.net/manual/en/function.imagexbm.php - * @param resource $image - * @param string $filename <p> - * The path to save the file to. If not set or &null;, the raw image stream - * will be outputted directly. - * </p> - * @param int $foreground [optional] <p> - * You can set the foreground color with this parameter by setting an - * identifier obtained from imagecolorallocate. - * The default foreground color is black. - * </p> - * @return bool true on success or false on failure. - */ -function imagexbm ($image, $filename, $foreground = null) {} +function imagelayereffect(GdImage $image, int $effect): bool {} -/** - * Applies a filter to an image - * @link https://php.net/manual/en/function.imagefilter.php - * @param resource $image - * @param int $filtertype <p> - * filtertype can be one of the following: - * IMG_FILTER_NEGATE: Reverses all colors of - * the image. - * @param int $arg1 [optional] <p> - * IMG_FILTER_BRIGHTNESS: Brightness level. - * @param int $arg2 [optional] <p> - * IMG_FILTER_COLORIZE: Value of green component. - * @param int $arg3 [optional] <p> - * IMG_FILTER_COLORIZE: Value of blue component. - * @param int $arg4 [optional] <p> - * IMG_FILTER_COLORIZE: Alpha channel, A value - * between 0 and 127. 0 indicates completely opaque while 127 indicates - * completely transparent. - * @return bool true on success or false on failure. - */ -function imagefilter ($image, $filtertype, $arg1 = null, $arg2 = null, $arg3 = null, $arg4 = null) {} +function imagecolorallocatealpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int|false {} -/** - * Apply a 3x3 convolution matrix, using coefficient and offset - * @link https://php.net/manual/en/function.imageconvolution.php - * @param resource $image - * @param array $matrix <p> - * A 3x3 matrix: an array of three arrays of three floats. - * </p> - * @param float $div <p> - * The divisor of the result of the convolution, used for normalization. - * </p> - * @param float $offset <p> - * Color offset. - * </p> - * @return bool true on success or false on failure. - */ -function imageconvolution ($image, array $matrix, $div, $offset) {} +function imagecolorresolvealpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int {} -/** - * @param resource $im An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}. - * @param int $res_x [optional] The horizontal resolution in DPI. - * @param int $res_y [optional] The vertical resolution in DPI. - * @return array|bool When used as getter (that is without the optional parameters), it returns <b>TRUE</b> on success, or <b>FALSE</b> on failure. When used as setter (that is with one or both optional parameters given), it returns an indexed array of the horizontal and vertical resolution on success, or <b>FALSE</b> on failure. - * @link https://php.net/manual/en/function.imageresolution.php - * @since 7.2 - */ -function imageresolution ($im, $res_x = 96, $res_y = 96) {} +function imagecolorclosestalpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int {} +function imagecolorexactalpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int {} -/** - * <b>imagesetclip()</b> sets the current clipping rectangle, i.e. the area beyond which no pixels will be drawn. - * @param resource $im An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}. - * @param int $x1 The x-coordinate of the upper left corner. - * @param int $y1 The y-coordinate of the upper left corner. - * @param int $x2 The x-coordinate of the lower right corner. - * @param int $y2 The y-coordinate of the lower right corner. - * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. - * @link https://php.net/manual/en/function.imagesetclip.php - * @see imagegetclip() - * @since 7.2 - */ -function imagesetclip ($im, $x1, $y1, $x2, $y2) {} +function imagecopyresampled(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): bool {} -/** - * <b>imagegetclip()</b> retrieves the current clipping rectangle, i.e. the area beyond which no pixels will be drawn. - * @param resource $im An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()} - * @return array|false an indexed array with the coordinates of the clipping rectangle which has the following entries: - * <ul> - * <li>x-coordinate of the upper left corner</li> - * <li>y-coordinate of the upper left corner</li> - * <li>x-coordinate of the lower right corner</li> - * <li>y-coordinate of the lower right corner</li> - * </ul> - * Returns <b>FALSE</b> on error. - * @link https://php.net/manual/en/function.imagegetclip.php - * @see imagesetclip() - * @since 7.2 - */ -function imagegetclip ($im) {} +#ifdef PHP_WIN32 -/** - * <b>imageopenpolygon()</b> draws an open polygon on the given <b>image.</b> Contrary to {@see imagepolygon()}, no line is drawn between the last and the first point. - * @param resource $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}. - * @param array $points An array containing the polygon's vertices, e.g.: - * <pre> - * points[0] = x0 - * points[1] = y0 - * points[2] = x1 - * points[3] = y1 - * </pre> - * @param int $num_points [optional] Total number of points (vertices). - * @param int $color A color identifier created with {@see imagecolorallocate()}. - * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. - * @link https://php.net/manual/en/function.imageopenpolygon.php - * @since 7.2 - * @see imageplygon() - */ -function imageopenpolygon ($image , $points, $num_points, $color) {} +/** @refcount 1 */ +function imagegrabwindow(int $handle, bool $client_area = false): GdImage|false {} -/** - * <b>imagecreatefrombmp()</b> returns an image identifier representing the image obtained from the given filename. - * <b>TIP</b> A URL can be used as a filename with this function if the fopen wrappers have been enabled. See {@see fopen()} for more details on how to specify the filename. See the Supported Protocols and Wrappers for links to information about what abilities the various wrappers have, notes on their usage, and information on any predefined variables they may provide. - * @param string $filename Path to the BMP image. - * @return resource|false Returns an image resource identifier on success, <b>FALSE</b> on errors. - * @link https://php.net/manual/en/function.imagecreatefrombmp.php - * @since 7.2 - */ -function imagecreatefrombmp($filename){} +/** @refcount 1 */ +function imagegrabscreen(): GdImage|false {} -/** - * Outputs or saves a BMP version of the given <b>image</b>. - * @param resource $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}. - * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or <b>NULL</b>, the raw image stream will be outputted directly. - * <br /> - * <b>Note:</b> <b>NULL</b> is invalid if the <b>compressed</b> arguments is not used. - * @param bool $compressed Whether the BMP should be compressed with run-length encoding (RLE), or not. - * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. - * <br /> - * <b>Caution</b> However, if libgd fails to output the image, this function returns <b>TRUE</b>. - * @link https://php.net/manual/en/function.imagebmp.php - * @since 7.2 - */ -function imagebmp ($image, $to = null, $compressed = true) {} +#endif -/** - * @param string $filename - * @return resource|false - */ -function imagecreatefromtga($filename) {} +// TODO: $ignore_transparent is ignored??? +/** @refcount 1 */ +function imagerotate(GdImage $image, float $angle, int $background_color, bool $ignore_transparent = false): GdImage|false {} -/** - * Captures the whole screen - * - * https://www.php.net/manual/en/function.imagegrabscreen.php - * - * @return resource|false - */ -function imagegrabscreen() {} +function imagesettile(GdImage $image, GdImage $tile): bool {} -/** - * Captures a window - * - * @link https://www.php.net/manual/en/function.imagegrabwindow.php - * - * @param int $handle - * @param int|null $client_area - * @return resource|false - */ -function imagegrabwindow($handle, $client_area = null) {} +function imagesetbrush(GdImage $image, GdImage $brush): bool {} -/** - * Used as a return value by {@see imagetypes()} - * @link https://php.net/manual/en/image.constants.php#constant.img-gif - */ -define ('IMG_GIF', 1); +/** @refcount 1 */ +function imagecreate(int $width, int $height): GdImage|false {} -/** - * Used as a return value by {@see imagetypes()} - * @link https://php.net/manual/en/image.constants.php#constant.img-jpg - */ -define ('IMG_JPG', 2); +function imagetypes(): int {} -/** - * Used as a return value by {@see imagetypes()} - * <p> - * This constant has the same value as {@see IMG_JPG} - * </p> - * @link https://php.net/manual/en/image.constants.php#constant.img-jpeg - */ -define ('IMG_JPEG', 2); +/** @refcount 1 */ +function imagecreatefromstring(string $data): GdImage|false {} -/** - * Used as a return value by {@see imagetypes()} - * @link https://php.net/manual/en/image.constants.php#constant.img-png - */ -define ('IMG_PNG', 4); +#ifdef HAVE_GD_AVIF +/** @refcount 1 */ +function imagecreatefromavif(string $filename): GdImage|false {} +#endif -/** - * Used as a return value by {@see imagetypes()} - * @link https://php.net/manual/en/image.constants.php#constant.img-wbmp - */ -define ('IMG_WBMP', 8); +/** @refcount 1 */ +function imagecreatefromgif(string $filename): GdImage|false {} -/** - * Used as a return value by {@see imagetypes()} - * @link https://php.net/manual/en/image.constants.php#constant.img-xpm - */ -define ('IMG_XPM', 16); +#ifdef HAVE_GD_JPG +/** @refcount 1 */ +function imagecreatefromjpeg(string $filename): GdImage|false {} +#endif -/** - * Used as a return value by {@see imagetypes()} - * @since 5.6.25 - * @since 7.0.10 - * @link https://php.net/manual/en/image.constants.php#constant.img-webp - */ -define('IMG_WEBP', 32); +#ifdef HAVE_GD_PNG +/** @refcount 1 */ +function imagecreatefrompng(string $filename): GdImage|false {} +#endif -/** - * Used as a return value by {@see imagetypes()} - * @since 7.2 - * @link https://php.net/manual/en/image.constants.php#constant.img-bmp - */ -define('IMG_BMP', 64); +#ifdef HAVE_GD_WEBP +/** @refcount 1 */ +function imagecreatefromwebp(string $filename): GdImage|false {} +#endif -/** - * Special color option which can be used instead of color allocated with - * {@see imagecolorallocate()} or {@see imagecolorallocatealpha()} - * @link https://php.net/manual/en/image.constants.php#constant.img-color-tiled - */ -define ('IMG_COLOR_TILED', -5); +/** @refcount 1 */ +function imagecreatefromxbm(string $filename): GdImage|false {} -/** - * Special color option which can be used instead of color allocated with - * {@see imagecolorallocate()} or {@see imagecolorallocatealpha()} - * @link https://php.net/manual/en/image.constants.php#constant.img-color-styled - */ -define ('IMG_COLOR_STYLED', -2); +#ifdef HAVE_GD_XPM +/** @refcount 1 */ +function imagecreatefromxpm(string $filename): GdImage|false {} +#endif -/** - * Special color option which can be used instead of color allocated with - * {@see imagecolorallocate()} or {@see imagecolorallocatealpha()} - * @link https://php.net/manual/en/image.constants.php#constant.img-color-brushed - */ -define ('IMG_COLOR_BRUSHED', -3); +/** @refcount 1 */ +function imagecreatefromwbmp(string $filename): GdImage|false {} -/** - * Special color option which can be used instead of color allocated with - * {@see imagecolorallocate()} or {@see imagecolorallocatealpha()} - * @link https://php.net/manual/en/image.constants.php#constant.img-color-styledbrushed - */ -define ('IMG_COLOR_STYLEDBRUSHED', -4); +/** @refcount 1 */ +function imagecreatefromgd(string $filename): GdImage|false {} -/** - * Special color option which can be used instead of color allocated with - * {@see imagecolorallocate()} or {@see imagecolorallocatealpha()} - * @link https://php.net/manual/en/image.constants.php#constant.img-color-transparent - */ -define ('IMG_COLOR_TRANSPARENT', -6); +/** @refcount 1 */ +function imagecreatefromgd2(string $filename): GdImage|false {} -/** - * A style constant used by the {@see imagefilledarc()} function. - * <p> - * This constant has the same value as {@see IMG_ARC_PIE} - * </p> - * @link https://php.net/manual/en/image.constants.php#constant.img-arc-rounded - */ -define ('IMG_ARC_ROUNDED', 0); +/** @refcount 1 */ +function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, int $height): GdImage|false {} -/** - * A style constant used by the {@see imagefilledarc()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-arc-pie - */ -define ('IMG_ARC_PIE', 0); +#ifdef HAVE_GD_BMP +/** @refcount 1 */ +function imagecreatefrombmp(string $filename): GdImage|false {} +#endif -/** - * A style constant used by the {@see imagefilledarc()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-arc-chord - */ -define ('IMG_ARC_CHORD', 1); +#ifdef HAVE_GD_TGA +function imagecreatefromtga(string $filename): GdImage|false {} +#endif -/** - * A style constant used by the {@see imagefilledarc()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-arc-nofill - */ -define ('IMG_ARC_NOFILL', 2); +function imagexbm(GdImage $image, ?string $filename, ?int $foreground_color = null): bool {} -/** - * A style constant used by the {@see imagefilledarc()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-arc-edged - */ -define ('IMG_ARC_EDGED', 4); +#ifdef HAVE_GD_AVIF +/** @param resource|string|null $file */ +function imageavif(GdImage $image, $file = null, int $quality = -1, int $speed = -1): bool {} +#endif -/** - * A type constant used by the {@see imagegd2()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-gd2-raw - */ -define ('IMG_GD2_RAW', 1); +/** @param resource|string|null $file */ +function imagegif(GdImage $image, $file = null): bool {} -/** - * A type constant used by the {@see imagegd2()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-gd2-compressed - */ -define ('IMG_GD2_COMPRESSED', 2); +#ifdef HAVE_GD_PNG +/** @param resource|string|null $file */ +function imagepng(GdImage $image, $file = null, int $quality = -1, int $filters = -1): bool {} +#endif -/** - * Alpha blending effect used by the {@see imagelayereffect()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-effect-replace - */ -define ('IMG_EFFECT_REPLACE', 0); +#ifdef HAVE_GD_WEBP +/** @param resource|string|null $file */ +function imagewebp(GdImage $image, $file = null, int $quality = -1): bool {} +#endif -/** - * Alpha blending effect used by the {@see imagelayereffect()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-effect-alphablend - */ -define ('IMG_EFFECT_ALPHABLEND', 1); +#ifdef HAVE_GD_JPG +/** @param resource|string|null $file */ +function imagejpeg(GdImage $image, $file = null, int $quality = -1): bool {} +#endif -/** - * Alpha blending effect used by the {@see imagelayereffect()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-effect-normal - */ -define ('IMG_EFFECT_NORMAL', 2); +/** @param resource|string|null $file */ +function imagewbmp(GdImage $image, $file = null, ?int $foreground_color = null): bool {} -/** - * Alpha blending effect used by the {@see imagelayereffect()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-effect-overlay - */ -define ('IMG_EFFECT_OVERLAY', 3); +function imagegd(GdImage $image, ?string $file = null): bool {} -/** - * Alpha blending effect used by the {@see imagelayereffect()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-effect-multiply - * @since 7.2 - */ -define ('IMG_EFFECT_MULTIPLY', 4); +function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = UNKNOWN, int $mode = UNKNOWN): bool {} -/** - * When the bundled version of GD is used this is 1 otherwise - * it's set to 0. - * @link https://php.net/manual/en/image.constants.php - */ -define ('GD_BUNDLED', 1); +#ifdef HAVE_GD_BMP +/** @param resource|string|null $file */ +function imagebmp(GdImage $image, $file = null, bool $compressed = true): bool {} +#endif -/** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-negate - */ -define ('IMG_FILTER_NEGATE', 0); +function imagedestroy(GdImage $image): bool {} -/** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-grayscale - */ -define ('IMG_FILTER_GRAYSCALE', 1); +function imagecolorallocate(GdImage $image, int $red, int $green, int $blue): int|false {} -/** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-brightness - */ -define ('IMG_FILTER_BRIGHTNESS', 2); +function imagepalettecopy(GdImage $dst, GdImage $src): void {} -/** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-contrast - */ -define ('IMG_FILTER_CONTRAST', 3); +function imagecolorat(GdImage $image, int $x, int $y): int|false {} -/** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-colorize - */ -define ('IMG_FILTER_COLORIZE', 4); +function imagecolorclosest(GdImage $image, int $red, int $green, int $blue): int {} -/** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-edgedetect - */ -define ('IMG_FILTER_EDGEDETECT', 5); +function imagecolorclosesthwb(GdImage $image, int $red, int $green, int $blue): int {} -/** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-gaussian-blur - */ -define ('IMG_FILTER_GAUSSIAN_BLUR', 7); +function imagecolordeallocate(GdImage $image, int $color): bool {} -/** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-selective-blur - */ -define ('IMG_FILTER_SELECTIVE_BLUR', 8); +function imagecolorresolve(GdImage $image, int $red, int $green, int $blue): int {} -/** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-emboss - */ -define ('IMG_FILTER_EMBOSS', 6); +function imagecolorexact(GdImage $image, int $red, int $green, int $blue): int {} -/** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-mean-removal - */ -define ('IMG_FILTER_MEAN_REMOVAL', 9); +/** @return false|null */ +function imagecolorset(GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0): ?bool {} /** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-smooth + * @return array<string, int> + * @refcount 1 */ -define ('IMG_FILTER_SMOOTH', 10); +function imagecolorsforindex(GdImage $image, int $color): array {} -/** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-pixelate - */ -define ('IMG_FILTER_PIXELATE', 11); +function imagegammacorrect(GdImage $image, float $input_gamma, float $output_gamma): bool {} -/** - * Special GD filter used by the {@see imagefilter()} function. - * @link https://php.net/manual/en/image.constants.php#constant.img-filter-scatter - * @since 7.4 - */ -define ('IMG_FILTER_SCATTER', 12); +function imagesetpixel(GdImage $image, int $x, int $y, int $color): bool {} -/** - * The GD version PHP was compiled against. - * @since 5.2.4 - * @link https://php.net/manual/en/image.constants.php#constant.gd-version - */ -define ('GD_VERSION', "2.0.35"); +function imageline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {} -/** - * The GD major version PHP was compiled against. - * @since 5.2.4 - * @link https://php.net/manual/en/image.constants.php#constant.gd-major-version - */ -define ('GD_MAJOR_VERSION', 2); +function imagedashedline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {} -/** - * The GD minor version PHP was compiled against. - * @since 5.2.4 - * @link https://php.net/manual/en/image.constants.php#constant.gd-minor-version - */ -define ('GD_MINOR_VERSION', 0); +function imagerectangle(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {} -/** - * The GD release version PHP was compiled against. - * @since 5.2.4 - * @link https://php.net/manual/en/image.constants.php#constant.gd-release-version - */ -define ('GD_RELEASE_VERSION', 35); +function imagefilledrectangle(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {} -/** - * The GD "extra" version (beta/rc..) PHP was compiled against. - * @since 5.2.4 - * @link https://php.net/manual/en/image.constants.php#constant.gd-extra-version - */ -define ('GD_EXTRA_VERSION', ""); +function imagearc(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color): bool {} +function imageellipse(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color): bool {} -/** - * A special PNG filter, used by the {@see imagepng()} function. - * @link https://php.net/manual/en/image.constants.php#constant.png-no-filter - */ -define ('PNG_NO_FILTER', 0); +function imagefilltoborder(GdImage $image, int $x, int $y, int $border_color, int $color): bool {} -/** - * A special PNG filter, used by the {@see imagepng()} function. - * @link https://php.net/manual/en/image.constants.php#constant.png-filter-none - */ -define ('PNG_FILTER_NONE', 8); +function imagefill(GdImage $image, int $x, int $y, int $color): bool {} -/** - * A special PNG filter, used by the {@see imagepng()} function. - * @link https://php.net/manual/en/image.constants.php#constant.png-filter-sub - */ -define ('PNG_FILTER_SUB', 16); +function imagecolorstotal(GdImage $image): int {} -/** - * A special PNG filter, used by the {@see imagepng()} function. - * @link https://php.net/manual/en/image.constants.php#constant.png-filter-up - */ -define ('PNG_FILTER_UP', 32); +function imagecolortransparent(GdImage $image, ?int $color = null): int {} -/** - * A special PNG filter, used by the {@see imagepng()} function. - * @link https://php.net/manual/en/image.constants.php#constant.png-filter-avg - */ -define ('PNG_FILTER_AVG', 64); +function imageinterlace(GdImage $image, ?bool $enable = null): bool {} -/** - * A special PNG filter, used by the {@see imagepng()} function. - * @link https://php.net/manual/en/image.constants.php#constant.png-filter-paeth - */ -define ('PNG_FILTER_PAETH', 128); +function imagepolygon(GdImage $image, array $points, int $num_points_or_color, ?int $color = null): bool {} -/** - * A special PNG filter, used by the {@see imagepng()} function. - * @link https://php.net/manual/en/image.constants.php#constant.png-all-filters - */ -define ('PNG_ALL_FILTERS', 248); +function imageopenpolygon(GdImage $image, array $points, int $num_points_or_color, ?int $color = null): bool {} -/** - * An affine transformation type constant used by the {@see imageaffinematrixget()} function. - * @since 5.5 - * @link https://php.net/manual/en/image.constants.php#constant.img-affine-translate - */ -define('IMG_AFFINE_TRANSLATE', 0); +function imagefilledpolygon(GdImage $image, array $points, int $num_points_or_color, ?int $color = null): bool {} -/** - * An affine transformation type constant used by the {@see imageaffinematrixget()} function. - * @since 5.5 - * @link https://php.net/manual/en/image.constants.php#constant.img-affine-scale - */ -define('IMG_AFFINE_SCALE', 1); +function imagefontwidth(GdFont|int $font): int {} -/** - * An affine transformation type constant used by the {@see imageaffinematrixget()} function. - * @since 5.5 - * @link https://php.net/manual/en/image.constants.php#constant.img-affine-rotate - */ -define('IMG_AFFINE_ROTATE', 2); +function imagefontheight(GdFont|int $font): int {} -/** - * An affine transformation type constant used by the {@see imageaffinematrixget()} function. - * @since 5.5 - * @link https://php.net/manual/en/image.constants.php#constant.img-affine-shear-horizontal - */ -define('IMG_AFFINE_SHEAR_HORIZONTAL', 3); +function imagechar(GdImage $image, GdFont|int $font, int $x, int $y, string $char, int $color): bool {} -/** - * An affine transformation type constant used by the {@see imageaffinematrixget()} function. - * @since 5.5 - * @link https://php.net/manual/en/image.constants.php#constant.img-affine-shear-vertical - */ -define('IMG_AFFINE_SHEAR_VERTICAL', 4); +function imagecharup(GdImage $image, GdFont|int $font, int $x, int $y, string $char, int $color): bool {} -/** - * Same as {@see IMG_CROP_TRANSPARENT}. Before PHP 7.4.0, the bundled libgd fell back to - * {@see IMG_CROP_SIDES}, if the image had no transparent color. - * Used together with {@see imagecropauto()}. - * @since 5.5 - */ -define('IMG_CROP_DEFAULT', 0); +function imagestring(GdImage $image, GdFont|int $font, int $x, int $y, string $string, int $color): bool {} -/** - * Crops out a transparent background. - * Used together with {@see imagecropauto()}. - * @since 5.5 - */ -define('IMG_CROP_TRANSPARENT', 1); +function imagestringup(GdImage $image, GdFont|int $font, int $x, int $y, string $string, int $color): bool {} -/** - * Crops out a black background. - * Used together with {@see imagecropauto()}. - * @since 5.5 - */ -define('IMG_CROP_BLACK', 2); +function imagecopy(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height): bool {} -/** - * Crops out a white background. - * Used together with {@see imagecropauto()}. - * @since 5.5 - */ -define('IMG_CROP_WHITE', 3); +function imagecopymerge(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): bool {} -/** - * Uses the 4 corners of the image to attempt to detect the background to crop. - * Used together with {@see imagecropauto()}. - * @since 5.5 - */ -define('IMG_CROP_SIDES', 4); +function imagecopymergegray(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): bool {} -/** - * Crops an image using the given <b>threshold</b> and <b>color</b>. - * Used together with {@see imagecropauto()}. - * @since 5.5 - */ -define('IMG_CROP_THRESHOLD', 5); +function imagecopyresized(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): bool {} -/** - * Used together with {@see imageflip()} - * @since 5.5 - * @link https://php.net/manual/en/image.constants.php#constant.img-flip-both - */ -define('IMG_FLIP_BOTH', 3); +function imagesx(GdImage $image): int {} -/** - * Used together with {@see imageflip()} - * @since 5.5 - * @link https://php.net/manual/en/image.constants.php#constant.img-flip-horizontal - */ -define('IMG_FLIP_HORIZONTAL', 1); +function imagesy(GdImage $image): int {} -/** - * Used together with {@see imageflip()} - * @since 5.5 - * @link https://php.net/manual/en/image.constants.php#constant.img-flip-vertical - */ -define('IMG_FLIP_VERTICAL', 2); +function imagesetclip(GdImage $image, int $x1, int $y1, int $x2, int $y2): bool {} /** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-bell - * @since 5.5 + * @return array<int, int> + * @refcount 1 */ -define('IMG_BELL', 1); +function imagegetclip(GdImage $image): array {} +#ifdef HAVE_GD_FREETYPE /** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-bessel - * @since 5.5 + * @return array<int, int>|false + * @refcount 1 */ -define('IMG_BESSEL', 2); +function imageftbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array|false {} /** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-bicubic - * @since 5.5 + * @return array<int, int>|false + * @refcount 1 */ -define('IMG_BICUBIC', 4); +function imagefttext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array|false {} /** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-bicubic-fixed - * @since 5.5 + * @return array<int, int>|false + * @alias imageftbbox */ -define('IMG_BICUBIC_FIXED', 5); +function imagettfbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array|false {} /** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-bilinear-fixed - * @since 5.5 + * @return array<int, int>|false + * @alias imagefttext */ -define('IMG_BILINEAR_FIXED', 3); +function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array|false {} +#endif -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-blackman - * @since 5.5 - */ -define('IMG_BLACKMAN', 6); - -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-box - * @since 5.5 - */ -define('IMG_BOX', 7); - -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-bspline - * @since 5.5 - */ -define('IMG_BSPLINE', 8); +/** @param array|int|float|bool $args */ +function imagefilter(GdImage $image, int $filter, ...$args): bool {} -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-catmullrom - * @since 5.5 - */ -define('IMG_CATMULLROM', 9); - -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-gaussian - * @since 5.5 - */ -define('IMG_GAUSSIAN', 10); - -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-generalized-cubic - * @since 5.5 - */ -define('IMG_GENERALIZED_CUBIC', 11); +function imageconvolution(GdImage $image, array $matrix, float $divisor, float $offset): bool {} -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-hermite - * @since 5.5 - */ -define('IMG_HERMITE', 12); +function imageflip(GdImage $image, int $mode): bool {} -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-hamming - * @since 5.5 - */ -define('IMG_HAMMING', 13); +function imageantialias(GdImage $image, bool $enable): bool {} -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-hanning - * @since 5.5 - */ -define('IMG_HANNING', 14); +/** @refcount 1 */ +function imagecrop(GdImage $image, array $rectangle): GdImage|false {} -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-mitchell - * @since 5.5 - */ -define('IMG_MITCHELL', 15); +/** @refcount 1 */ +function imagecropauto(GdImage $image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1): GdImage|false {} -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-power - * @since 5.5 - */ -define('IMG_POWER', 17); +/** @refcount 1 */ +function imagescale(GdImage $image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED): GdImage|false {} -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-quadratic - * @since 5.5 - */ -define('IMG_QUADRATIC', 18); +/** @refcount 1 */ +function imageaffine(GdImage $image, array $affine, ?array $clip = null): GdImage|false {} /** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-sinc - * @since 5.5 + * @param array|float $options + * @refcount 1 + * @return array<int, float>|false */ -define('IMG_SINC', 19); +function imageaffinematrixget(int $type, $options): array|false {} /** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-nearest-neighbour - * @since 5.5 + * @return array<int, float>|false + * @refcount 1 */ -define('IMG_NEAREST_NEIGHBOUR', 16); +function imageaffinematrixconcat(array $matrix1, array $matrix2): array|false {} -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-weighted4 - * @since 5.5 - */ -define('IMG_WEIGHTED4', 21); - -/** - * Used together with {@see imagesetinterpolation()}. - * @link https://php.net/manual/en/image.constants.php#constant.img-triangle - * @since 5.5 - */ -define('IMG_TRIANGLE', 20); - -define('IMG_TGA', 128); - -/** - * Return an image containing the affine tramsformed src image, using an optional clipping area - * @link https://www.php.net/manual/en/function.imageaffine.php - * @param resource $image <p>An image resource, returned by one of the image creation functions, - * such as {@link https://www.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}.</p> - * @param array $affine <p>Array with keys 0 to 5.</p> - * @param array $clip [optional] <p>Array with keys "x", "y", "width" and "height".</p> - * @return resource|bool Return affined image resource on success or FALSE on failure. - */ -function imageaffine($image, $affine, $clip = null) {} - -/** - * Concat two matrices (as in doing many ops in one go) - * @link https://www.php.net/manual/en/function.imageaffinematrixconcat.php - * @param array $m1 <p>Array with keys 0 to 5.</p> - * @param array $m2 <p>Array with keys 0 to 5.</p> - * @return array|bool Array with keys 0 to 5 and float values or <b>FALSE</b> on failure. - * @since 5.5 - */ -function imageaffinematrixconcat(array $m1, array $m2) {} - -/** - * Return an image containing the affine tramsformed src image, using an optional clipping area - * @link https://www.php.net/manual/en/function.imageaffinematrixget.php - * @param int $type <p> One of <b>IMG_AFFINE_*</b> constants. - * @param mixed $options [optional] - * @return array|bool Array with keys 0 to 5 and float values or <b>FALSE</b> on failure. - * @since 5.5 - */ - -function imageaffinematrixget ($type, $options = null) {} - -/** - * Crop an image using the given coordinates and size, x, y, width and height - * @link https://www.php.net/manual/en/function.imagecrop.php - * @param resource $image <p> - * An image resource, returned by one of the image creation functions, such as {@link https://www.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. - * </p> - * @param array $rect <p>Array with keys "x", "y", "width" and "height".</p> - * @return resource|bool Return cropped image resource on success or FALSE on failure. - * @since 5.5 - */ -function imagecrop ($image, $rect) {} - -/** - * Crop an image automatically using one of the available modes - * @link https://www.php.net/manual/en/function.imagecropauto.php - * @param resource $image <p> - * An image resource, returned by one of the image creation functions, such as {@link https://www.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. - * </p> - * @param int $mode [optional] <p> - * One of <b>IMG_CROP_*</b> constants. - * </p> - * @param float $threshold [optional] <p> - * Used <b>IMG_CROP_THRESHOLD</b> mode. - * </p> - * @param int $color [optional] - * <p> - * Used in <b>IMG_CROP_THRESHOLD</b> mode. - * </p> - * @return resource|bool Return cropped image resource on success or <b>FALSE</b> on failure. - * @since 5.5 - */ -function imagecropauto ($image, $mode = IMG_CROP_DEFAULT, $threshold = .5, $color = -1) {} - -/** - * Flips an image using a given mode - * @link https://www.php.net/manual/en/function.imageflip.php - * @param resource $image <p> - * An image resource, returned by one of the image creation functions, such as {@link https://www.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. - * </p> - * @param int $mode <p> - * Flip mode, this can be one of the <b>IMG_FLIP_*</b> constants: - * </p> - * <table> - * <thead> - * <tr> - * <th>Constant</th> - * <th>Meaning</th> - * </tr> - * </thead> - * <tr> - * <td><b>IMG_FLIP_HORIZONTAL</b></td> - * <td> - * Flips the image horizontally. - * </td> - * </tr> - * <tr> - * <td><b>IMG_FLIP_VERTICAL</b></td> - * <td> - * Flips the image vertically. - * </td> - * </tr> - * <tr> - * <td><b>IMG_FLIP_BOTH</b></td> - * <td> - * Flips the image both horizontally and vertically. - * </td> - * </tr> - * </tbody> - * </table> - * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. - * @since 5.5 - */ -function imageflip ($image, $mode) {} - -/** - * Converts a palette based image to true color - * @link https://www.php.net/manual/en/function.imagepalettetotruecolor.php - * @param resource $image <p> - * An image resource, returnd by one of the image creation functions, such as {@link https://www.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. - * </p> - * @return bool Returns <b>TRUE</b> if the convertion was complete, or if the source image already is a true color image, otherwise <b>FALSE</b> is returned. - * @since 5.5 - */ -function imagepalettetotruecolor ($image) {} - -/** - * @since 5.5 - * Scale an image using the given new width and height - * @link https://www.php.net/manual/en/function.imagescale.php - * @param resource $image <p> - * An image resource, returnd by one of the image creation functions, such as {@link https://www.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. - * </p> - * @param int $new_width - * @param int $new_height [optional] - * @param int $mode [optional] One of <b>IMG_NEAREST_NEIGHBOUR</b>, <b>IMG_BILINEAR_FIXED</b>, <b>IMG_BICUBIC</b>, <b>IMG_BICUBIC_FIXED</b> or anything else (will use two pass). - * @return resource|bool Return scaled image resource on success or <b>FALSE</b> on failure. - */ +function imagegetinterpolation(GdImage $image): int {} -function imagescale ($image, $new_width, $new_height = -1, $mode = IMG_BILINEAR_FIXED) {} +function imagesetinterpolation(GdImage $image, int $method = IMG_BILINEAR_FIXED): bool {} /** - * Set the interpolation method - * @link https://www.php.net/manual/en/function.imagesetinterpolation.php - * @param resource $image <p> - * An image resource, returned by one of the image creation functions, such as {@link https://www.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. - * </p> - * @param int $method <p> - * The interpolation method, which can be one of the following: - * <ul> - * <li> - * IMG_BELL: Bell filter. - * </li> - * <li> - * IMG_BESSEL: Bessel filter. - * </li> - * <li> - * IMG_BICUBIC: Bicubic interpolation. - * </li> - * <li> - * IMG_BICUBIC_FIXED: Fixed point implementation of the bicubic interpolation. - * </li> - * <li> - * IMG_BILINEAR_FIXED: Fixed point implementation of the bilinear interpolation (<em>default (also on image creation)</em>). - * </li> - * <li> - * IMG_BLACKMAN: Blackman window function. - * </li> - * <li> - * IMG_BOX: Box blur filter. - * </li> - * <li> - * IMG_BSPLINE: Spline interpolation. - * </li> - * <li> - * IMG_CATMULLROM: Cubbic Hermite spline interpolation. - * </li> - * <li> - * IMG_GAUSSIAN: Gaussian function. - * </li> - * <li> - * IMG_GENERALIZED_CUBIC: Generalized cubic spline fractal interpolation. - * </li> - * <li> - * IMG_HERMITE: Hermite interpolation. - * </li> - * <li> - * IMG_HAMMING: Hamming filter. - * </li> - * <li> - * IMG_HANNING: Hanning filter. - * </li> - * <li> - * IMG_MITCHELL: Mitchell filter. - * </li> - * <li> - * IMG_POWER: Power interpolation. - * </li> - * <li> - * IMG_QUADRATIC: Inverse quadratic interpolation. - * </li> - * <li> - * IMG_SINC: Sinc function. - * </li> - * <li> - * IMG_NEAREST_NEIGHBOUR: Nearest neighbour interpolation. - * </li> - * <li> - * IMG_WEIGHTED4: Weighting filter. - * </li> - * <li> - * IMG_TRIANGLE: Triangle interpolation. - * </li> - * </ul> - * </p> - * @return bool Returns TRUE on success or FALSE on failure. - * @since 5.5 + * @return array<int, int>|true + * @refcount 1 */ -function imagesetinterpolation ($image, $method = IMG_BILINEAR_FIXED) {} +function imageresolution(GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null): array|bool {} diff --git a/build/stubs/imagick.php b/build/stubs/imagick.php index 147e8b34dbd..7fe3ed8246f 100644 --- a/build/stubs/imagick.php +++ b/build/stubs/imagick.php @@ -1,6744 +1,1386 @@ <?php -// Start of imagick v.3.4.3 +/** @generate-function-entries */ -class ImagickException extends Exception { -} +class Imagick +{ +#if MagickLibVersion > 0x628 + public function optimizeImageLayers(): bool {} -class ImagickDrawException extends Exception { -} + // METRIC_* + public function compareImageLayers(int $metric): Imagick {} -class ImagickPixelIteratorException extends Exception { -} + public function pingImageBlob(string $image): bool {} -class ImagickPixelException extends Exception { -} + public function pingImageFile(resource $filehandle, ?string $filename = null): bool {} -/** - * @method Imagick clone() (PECL imagick 2.0.0)<br/>Makes an exact copy of the Imagick object - * @link https://php.net/manual/en/class.imagick.php - */ -class Imagick implements Iterator, Countable { - const COLOR_BLACK = 11; - const COLOR_BLUE = 12; - const COLOR_CYAN = 13; - const COLOR_GREEN = 14; - const COLOR_RED = 15; - const COLOR_YELLOW = 16; - const COLOR_MAGENTA = 17; - const COLOR_OPACITY = 18; - const COLOR_ALPHA = 19; - const COLOR_FUZZ = 20; - const IMAGICK_EXTNUM = 30403; - const IMAGICK_EXTVER = "3.4.3"; - const QUANTUM_RANGE = 65535; - const USE_ZEND_MM = 0; - const COMPOSITE_DEFAULT = 40; - const COMPOSITE_UNDEFINED = 0; - const COMPOSITE_NO = 1; - const COMPOSITE_ADD = 2; - const COMPOSITE_ATOP = 3; - const COMPOSITE_BLEND = 4; - const COMPOSITE_BUMPMAP = 5; - const COMPOSITE_CLEAR = 7; - const COMPOSITE_COLORBURN = 8; - const COMPOSITE_COLORDODGE = 9; - const COMPOSITE_COLORIZE = 10; - const COMPOSITE_COPYBLACK = 11; - const COMPOSITE_COPYBLUE = 12; - const COMPOSITE_COPY = 13; - const COMPOSITE_COPYCYAN = 14; - const COMPOSITE_COPYGREEN = 15; - const COMPOSITE_COPYMAGENTA = 16; - const COMPOSITE_COPYOPACITY = 17; - const COMPOSITE_COPYRED = 18; - const COMPOSITE_COPYYELLOW = 19; - const COMPOSITE_DARKEN = 20; - const COMPOSITE_DSTATOP = 21; - const COMPOSITE_DST = 22; - const COMPOSITE_DSTIN = 23; - const COMPOSITE_DSTOUT = 24; - const COMPOSITE_DSTOVER = 25; - const COMPOSITE_DIFFERENCE = 26; - const COMPOSITE_DISPLACE = 27; - const COMPOSITE_DISSOLVE = 28; - const COMPOSITE_EXCLUSION = 29; - const COMPOSITE_HARDLIGHT = 30; - const COMPOSITE_HUE = 31; - const COMPOSITE_IN = 32; - const COMPOSITE_LIGHTEN = 33; - const COMPOSITE_LUMINIZE = 35; - const COMPOSITE_MINUS = 36; - const COMPOSITE_MODULATE = 37; - const COMPOSITE_MULTIPLY = 38; - const COMPOSITE_OUT = 39; - const COMPOSITE_OVER = 40; - const COMPOSITE_OVERLAY = 41; - const COMPOSITE_PLUS = 42; - const COMPOSITE_REPLACE = 43; - const COMPOSITE_SATURATE = 44; - const COMPOSITE_SCREEN = 45; - const COMPOSITE_SOFTLIGHT = 46; - const COMPOSITE_SRCATOP = 47; - const COMPOSITE_SRC = 48; - const COMPOSITE_SRCIN = 49; - const COMPOSITE_SRCOUT = 50; - const COMPOSITE_SRCOVER = 51; - const COMPOSITE_SUBTRACT = 52; - const COMPOSITE_THRESHOLD = 53; - const COMPOSITE_XOR = 54; - const COMPOSITE_CHANGEMASK = 6; - const COMPOSITE_LINEARLIGHT = 34; - const COMPOSITE_DIVIDE = 55; - const COMPOSITE_DISTORT = 56; - const COMPOSITE_BLUR = 57; - const COMPOSITE_PEGTOPLIGHT = 58; - const COMPOSITE_VIVIDLIGHT = 59; - const COMPOSITE_PINLIGHT = 60; - const COMPOSITE_LINEARDODGE = 61; - const COMPOSITE_LINEARBURN = 62; - const COMPOSITE_MATHEMATICS = 63; - const COMPOSITE_MODULUSADD = 2; - const COMPOSITE_MODULUSSUBTRACT = 52; - const COMPOSITE_MINUSDST = 36; - const COMPOSITE_DIVIDEDST = 55; - const COMPOSITE_DIVIDESRC = 64; - const COMPOSITE_MINUSSRC = 65; - const COMPOSITE_DARKENINTENSITY = 66; - const COMPOSITE_LIGHTENINTENSITY = 67; - const MONTAGEMODE_FRAME = 1; - const MONTAGEMODE_UNFRAME = 2; - const MONTAGEMODE_CONCATENATE = 3; - const STYLE_NORMAL = 1; - const STYLE_ITALIC = 2; - const STYLE_OBLIQUE = 3; - const STYLE_ANY = 4; - const FILTER_UNDEFINED = 0; - const FILTER_POINT = 1; - const FILTER_BOX = 2; - const FILTER_TRIANGLE = 3; - const FILTER_HERMITE = 4; - const FILTER_HANNING = 5; - const FILTER_HAMMING = 6; - const FILTER_BLACKMAN = 7; - const FILTER_GAUSSIAN = 8; - const FILTER_QUADRATIC = 9; - const FILTER_CUBIC = 10; - const FILTER_CATROM = 11; - const FILTER_MITCHELL = 12; - const FILTER_LANCZOS = 22; - const FILTER_BESSEL = 13; - const FILTER_SINC = 14; - const FILTER_KAISER = 16; - const FILTER_WELSH = 17; - const FILTER_PARZEN = 18; - const FILTER_LAGRANGE = 21; - const FILTER_SENTINEL = 31; - const FILTER_BOHMAN = 19; - const FILTER_BARTLETT = 20; - const FILTER_JINC = 13; - const FILTER_SINCFAST = 15; - const FILTER_ROBIDOUX = 26; - const FILTER_LANCZOSSHARP = 23; - const FILTER_LANCZOS2 = 24; - const FILTER_LANCZOS2SHARP = 25; - const FILTER_ROBIDOUXSHARP = 27; - const FILTER_COSINE = 28; - const FILTER_SPLINE = 29; - const FILTER_LANCZOSRADIUS = 30; - const IMGTYPE_UNDEFINED = 0; - const IMGTYPE_BILEVEL = 1; - const IMGTYPE_GRAYSCALE = 2; - const IMGTYPE_GRAYSCALEMATTE = 3; - const IMGTYPE_PALETTE = 4; - const IMGTYPE_PALETTEMATTE = 5; - const IMGTYPE_TRUECOLOR = 6; - const IMGTYPE_TRUECOLORMATTE = 7; - const IMGTYPE_COLORSEPARATION = 8; - const IMGTYPE_COLORSEPARATIONMATTE = 9; - const IMGTYPE_OPTIMIZE = 10; - const IMGTYPE_PALETTEBILEVELMATTE = 11; - const RESOLUTION_UNDEFINED = 0; - const RESOLUTION_PIXELSPERINCH = 1; - const RESOLUTION_PIXELSPERCENTIMETER = 2; - const COMPRESSION_UNDEFINED = 0; - const COMPRESSION_NO = 1; - const COMPRESSION_BZIP = 2; - const COMPRESSION_FAX = 6; - const COMPRESSION_GROUP4 = 7; - const COMPRESSION_JPEG = 8; - const COMPRESSION_JPEG2000 = 9; - const COMPRESSION_LOSSLESSJPEG = 10; - const COMPRESSION_LZW = 11; - const COMPRESSION_RLE = 12; - const COMPRESSION_ZIP = 13; - const COMPRESSION_DXT1 = 3; - const COMPRESSION_DXT3 = 4; - const COMPRESSION_DXT5 = 5; - const COMPRESSION_ZIPS = 14; - const COMPRESSION_PIZ = 15; - const COMPRESSION_PXR24 = 16; - const COMPRESSION_B44 = 17; - const COMPRESSION_B44A = 18; - const COMPRESSION_LZMA = 19; - const COMPRESSION_JBIG1 = 20; - const COMPRESSION_JBIG2 = 21; - const PAINT_POINT = 1; - const PAINT_REPLACE = 2; - const PAINT_FLOODFILL = 3; - const PAINT_FILLTOBORDER = 4; - const PAINT_RESET = 5; - const GRAVITY_NORTHWEST = 1; - const GRAVITY_NORTH = 2; - const GRAVITY_NORTHEAST = 3; - const GRAVITY_WEST = 4; - const GRAVITY_CENTER = 5; - const GRAVITY_EAST = 6; - const GRAVITY_SOUTHWEST = 7; - const GRAVITY_SOUTH = 8; - const GRAVITY_SOUTHEAST = 9; - const GRAVITY_FORGET = 0; - const GRAVITY_STATIC = 10; - const STRETCH_NORMAL = 1; - const STRETCH_ULTRACONDENSED = 2; - const STRETCH_EXTRACONDENSED = 3; - const STRETCH_CONDENSED = 4; - const STRETCH_SEMICONDENSED = 5; - const STRETCH_SEMIEXPANDED = 6; - const STRETCH_EXPANDED = 7; - const STRETCH_EXTRAEXPANDED = 8; - const STRETCH_ULTRAEXPANDED = 9; - const STRETCH_ANY = 10; - const ALIGN_UNDEFINED = 0; - const ALIGN_LEFT = 1; - const ALIGN_CENTER = 2; - const ALIGN_RIGHT = 3; - const DECORATION_NO = 1; - const DECORATION_UNDERLINE = 2; - const DECORATION_OVERLINE = 3; - const DECORATION_LINETROUGH = 4; - const DECORATION_LINETHROUGH = 4; - const NOISE_UNIFORM = 1; - const NOISE_GAUSSIAN = 2; - const NOISE_MULTIPLICATIVEGAUSSIAN = 3; - const NOISE_IMPULSE = 4; - const NOISE_LAPLACIAN = 5; - const NOISE_POISSON = 6; - const NOISE_RANDOM = 7; - const CHANNEL_UNDEFINED = 0; - const CHANNEL_RED = 1; - const CHANNEL_GRAY = 1; - const CHANNEL_CYAN = 1; - const CHANNEL_GREEN = 2; - const CHANNEL_MAGENTA = 2; - const CHANNEL_BLUE = 4; - const CHANNEL_YELLOW = 4; - const CHANNEL_ALPHA = 8; - const CHANNEL_OPACITY = 8; - const CHANNEL_MATTE = 8; - const CHANNEL_BLACK = 32; - const CHANNEL_INDEX = 32; - const CHANNEL_ALL = 134217727; - const CHANNEL_DEFAULT = 134217719; - const CHANNEL_RGBA = 15; - const CHANNEL_TRUEALPHA = 64; - const CHANNEL_RGBS = 128; - const CHANNEL_GRAY_CHANNELS = 128; - const CHANNEL_SYNC = 256; - const CHANNEL_COMPOSITES = 47; - const METRIC_UNDEFINED = 0; - const METRIC_ABSOLUTEERRORMETRIC = 1; - const METRIC_MEANABSOLUTEERROR = 2; - const METRIC_MEANERRORPERPIXELMETRIC = 3; - const METRIC_MEANSQUAREERROR = 4; - const METRIC_PEAKABSOLUTEERROR = 5; - const METRIC_PEAKSIGNALTONOISERATIO = 6; - const METRIC_ROOTMEANSQUAREDERROR = 7; - const METRIC_NORMALIZEDCROSSCORRELATIONERRORMETRIC = 8; - const METRIC_FUZZERROR = 9; - const PIXEL_CHAR = 1; - const PIXEL_DOUBLE = 2; - const PIXEL_FLOAT = 3; - const PIXEL_INTEGER = 4; - const PIXEL_LONG = 5; - const PIXEL_QUANTUM = 6; - const PIXEL_SHORT = 7; - const EVALUATE_UNDEFINED = 0; - const EVALUATE_ADD = 1; - const EVALUATE_AND = 2; - const EVALUATE_DIVIDE = 3; - const EVALUATE_LEFTSHIFT = 4; - const EVALUATE_MAX = 5; - const EVALUATE_MIN = 6; - const EVALUATE_MULTIPLY = 7; - const EVALUATE_OR = 8; - const EVALUATE_RIGHTSHIFT = 9; - const EVALUATE_SET = 10; - const EVALUATE_SUBTRACT = 11; - const EVALUATE_XOR = 12; - const EVALUATE_POW = 13; - const EVALUATE_LOG = 14; - const EVALUATE_THRESHOLD = 15; - const EVALUATE_THRESHOLDBLACK = 16; - const EVALUATE_THRESHOLDWHITE = 17; - const EVALUATE_GAUSSIANNOISE = 18; - const EVALUATE_IMPULSENOISE = 19; - const EVALUATE_LAPLACIANNOISE = 20; - const EVALUATE_MULTIPLICATIVENOISE = 21; - const EVALUATE_POISSONNOISE = 22; - const EVALUATE_UNIFORMNOISE = 23; - const EVALUATE_COSINE = 24; - const EVALUATE_SINE = 25; - const EVALUATE_ADDMODULUS = 26; - const EVALUATE_MEAN = 27; - const EVALUATE_ABS = 28; - const EVALUATE_EXPONENTIAL = 29; - const EVALUATE_MEDIAN = 30; - const EVALUATE_SUM = 31; - const COLORSPACE_UNDEFINED = 0; - const COLORSPACE_RGB = 1; - const COLORSPACE_GRAY = 2; - const COLORSPACE_TRANSPARENT = 3; - const COLORSPACE_OHTA = 4; - const COLORSPACE_LAB = 5; - const COLORSPACE_XYZ = 6; - const COLORSPACE_YCBCR = 7; - const COLORSPACE_YCC = 8; - const COLORSPACE_YIQ = 9; - const COLORSPACE_YPBPR = 10; - const COLORSPACE_YUV = 11; - const COLORSPACE_CMYK = 12; - const COLORSPACE_SRGB = 13; - const COLORSPACE_HSB = 14; - const COLORSPACE_HSL = 15; - const COLORSPACE_HWB = 16; - const COLORSPACE_REC601LUMA = 17; - const COLORSPACE_REC709LUMA = 19; - const COLORSPACE_LOG = 21; - const COLORSPACE_CMY = 22; - const COLORSPACE_LUV = 23; - const COLORSPACE_HCL = 24; - const COLORSPACE_LCH = 25; - const COLORSPACE_LMS = 26; - const COLORSPACE_LCHAB = 27; - const COLORSPACE_LCHUV = 28; - const COLORSPACE_SCRGB = 29; - const COLORSPACE_HSI = 30; - const COLORSPACE_HSV = 31; - const COLORSPACE_HCLP = 32; - const COLORSPACE_YDBDR = 33; - const COLORSPACE_REC601YCBCR = 18; - const COLORSPACE_REC709YCBCR = 20; - const VIRTUALPIXELMETHOD_UNDEFINED = 0; - const VIRTUALPIXELMETHOD_BACKGROUND = 1; - const VIRTUALPIXELMETHOD_CONSTANT = 2; - const VIRTUALPIXELMETHOD_EDGE = 4; - const VIRTUALPIXELMETHOD_MIRROR = 5; - const VIRTUALPIXELMETHOD_TILE = 7; - const VIRTUALPIXELMETHOD_TRANSPARENT = 8; - const VIRTUALPIXELMETHOD_MASK = 9; - const VIRTUALPIXELMETHOD_BLACK = 10; - const VIRTUALPIXELMETHOD_GRAY = 11; - const VIRTUALPIXELMETHOD_WHITE = 12; - const VIRTUALPIXELMETHOD_HORIZONTALTILE = 13; - const VIRTUALPIXELMETHOD_VERTICALTILE = 14; - const VIRTUALPIXELMETHOD_HORIZONTALTILEEDGE = 15; - const VIRTUALPIXELMETHOD_VERTICALTILEEDGE = 16; - const VIRTUALPIXELMETHOD_CHECKERTILE = 17; - const PREVIEW_UNDEFINED = 0; - const PREVIEW_ROTATE = 1; - const PREVIEW_SHEAR = 2; - const PREVIEW_ROLL = 3; - const PREVIEW_HUE = 4; - const PREVIEW_SATURATION = 5; - const PREVIEW_BRIGHTNESS = 6; - const PREVIEW_GAMMA = 7; - const PREVIEW_SPIFF = 8; - const PREVIEW_DULL = 9; - const PREVIEW_GRAYSCALE = 10; - const PREVIEW_QUANTIZE = 11; - const PREVIEW_DESPECKLE = 12; - const PREVIEW_REDUCENOISE = 13; - const PREVIEW_ADDNOISE = 14; - const PREVIEW_SHARPEN = 15; - const PREVIEW_BLUR = 16; - const PREVIEW_THRESHOLD = 17; - const PREVIEW_EDGEDETECT = 18; - const PREVIEW_SPREAD = 19; - const PREVIEW_SOLARIZE = 20; - const PREVIEW_SHADE = 21; - const PREVIEW_RAISE = 22; - const PREVIEW_SEGMENT = 23; - const PREVIEW_SWIRL = 24; - const PREVIEW_IMPLODE = 25; - const PREVIEW_WAVE = 26; - const PREVIEW_OILPAINT = 27; - const PREVIEW_CHARCOALDRAWING = 28; - const PREVIEW_JPEG = 29; - const RENDERINGINTENT_UNDEFINED = 0; - const RENDERINGINTENT_SATURATION = 1; - const RENDERINGINTENT_PERCEPTUAL = 2; - const RENDERINGINTENT_ABSOLUTE = 3; - const RENDERINGINTENT_RELATIVE = 4; - const INTERLACE_UNDEFINED = 0; - const INTERLACE_NO = 1; - const INTERLACE_LINE = 2; - const INTERLACE_PLANE = 3; - const INTERLACE_PARTITION = 4; - const INTERLACE_GIF = 5; - const INTERLACE_JPEG = 6; - const INTERLACE_PNG = 7; - const FILLRULE_UNDEFINED = 0; - const FILLRULE_EVENODD = 1; - const FILLRULE_NONZERO = 2; - const PATHUNITS_UNDEFINED = 0; - const PATHUNITS_USERSPACE = 1; - const PATHUNITS_USERSPACEONUSE = 2; - const PATHUNITS_OBJECTBOUNDINGBOX = 3; - const LINECAP_UNDEFINED = 0; - const LINECAP_BUTT = 1; - const LINECAP_ROUND = 2; - const LINECAP_SQUARE = 3; - const LINEJOIN_UNDEFINED = 0; - const LINEJOIN_MITER = 1; - const LINEJOIN_ROUND = 2; - const LINEJOIN_BEVEL = 3; - const RESOURCETYPE_UNDEFINED = 0; - const RESOURCETYPE_AREA = 1; - const RESOURCETYPE_DISK = 2; - const RESOURCETYPE_FILE = 3; - const RESOURCETYPE_MAP = 4; - const RESOURCETYPE_MEMORY = 5; - const RESOURCETYPE_TIME = 7; - const RESOURCETYPE_THROTTLE = 8; - const RESOURCETYPE_THREAD = 6; - const DISPOSE_UNRECOGNIZED = 0; - const DISPOSE_UNDEFINED = 0; - const DISPOSE_NONE = 1; - const DISPOSE_BACKGROUND = 2; - const DISPOSE_PREVIOUS = 3; - const INTERPOLATE_UNDEFINED = 0; - const INTERPOLATE_AVERAGE = 1; - const INTERPOLATE_BICUBIC = 2; - const INTERPOLATE_BILINEAR = 3; - const INTERPOLATE_FILTER = 4; - const INTERPOLATE_INTEGER = 5; - const INTERPOLATE_MESH = 6; - const INTERPOLATE_NEARESTNEIGHBOR = 7; - const INTERPOLATE_SPLINE = 8; - const LAYERMETHOD_UNDEFINED = 0; - const LAYERMETHOD_COALESCE = 1; - const LAYERMETHOD_COMPAREANY = 2; - const LAYERMETHOD_COMPARECLEAR = 3; - const LAYERMETHOD_COMPAREOVERLAY = 4; - const LAYERMETHOD_DISPOSE = 5; - const LAYERMETHOD_OPTIMIZE = 6; - const LAYERMETHOD_OPTIMIZEPLUS = 8; - const LAYERMETHOD_OPTIMIZETRANS = 9; - const LAYERMETHOD_COMPOSITE = 12; - const LAYERMETHOD_OPTIMIZEIMAGE = 7; - const LAYERMETHOD_REMOVEDUPS = 10; - const LAYERMETHOD_REMOVEZERO = 11; - const LAYERMETHOD_TRIMBOUNDS = 16; - const ORIENTATION_UNDEFINED = 0; - const ORIENTATION_TOPLEFT = 1; - const ORIENTATION_TOPRIGHT = 2; - const ORIENTATION_BOTTOMRIGHT = 3; - const ORIENTATION_BOTTOMLEFT = 4; - const ORIENTATION_LEFTTOP = 5; - const ORIENTATION_RIGHTTOP = 6; - const ORIENTATION_RIGHTBOTTOM = 7; - const ORIENTATION_LEFTBOTTOM = 8; - const DISTORTION_UNDEFINED = 0; - const DISTORTION_AFFINE = 1; - const DISTORTION_AFFINEPROJECTION = 2; - const DISTORTION_ARC = 9; - const DISTORTION_BILINEAR = 6; - const DISTORTION_PERSPECTIVE = 4; - const DISTORTION_PERSPECTIVEPROJECTION = 5; - const DISTORTION_SCALEROTATETRANSLATE = 3; - const DISTORTION_POLYNOMIAL = 8; - const DISTORTION_POLAR = 10; - const DISTORTION_DEPOLAR = 11; - const DISTORTION_BARREL = 14; - const DISTORTION_SHEPARDS = 16; - const DISTORTION_SENTINEL = 18; - const DISTORTION_BARRELINVERSE = 15; - const DISTORTION_BILINEARFORWARD = 6; - const DISTORTION_BILINEARREVERSE = 7; - const DISTORTION_RESIZE = 17; - const DISTORTION_CYLINDER2PLANE = 12; - const DISTORTION_PLANE2CYLINDER = 13; - const LAYERMETHOD_MERGE = 13; - const LAYERMETHOD_FLATTEN = 14; - const LAYERMETHOD_MOSAIC = 15; - const ALPHACHANNEL_ACTIVATE = 1; - const ALPHACHANNEL_RESET = 7; - const ALPHACHANNEL_SET = 8; - const ALPHACHANNEL_UNDEFINED = 0; - const ALPHACHANNEL_COPY = 3; - const ALPHACHANNEL_DEACTIVATE = 4; - const ALPHACHANNEL_EXTRACT = 5; - const ALPHACHANNEL_OPAQUE = 6; - const ALPHACHANNEL_SHAPE = 9; - const ALPHACHANNEL_TRANSPARENT = 10; - const SPARSECOLORMETHOD_UNDEFINED = 0; - const SPARSECOLORMETHOD_BARYCENTRIC = 1; - const SPARSECOLORMETHOD_BILINEAR = 7; - const SPARSECOLORMETHOD_POLYNOMIAL = 8; - const SPARSECOLORMETHOD_SPEPARDS = 16; - const SPARSECOLORMETHOD_VORONOI = 18; - const SPARSECOLORMETHOD_INVERSE = 19; - const DITHERMETHOD_UNDEFINED = 0; - const DITHERMETHOD_NO = 1; - const DITHERMETHOD_RIEMERSMA = 2; - const DITHERMETHOD_FLOYDSTEINBERG = 3; - const FUNCTION_UNDEFINED = 0; - const FUNCTION_POLYNOMIAL = 1; - const FUNCTION_SINUSOID = 2; - const ALPHACHANNEL_BACKGROUND = 2; - const FUNCTION_ARCSIN = 3; - const FUNCTION_ARCTAN = 4; - const ALPHACHANNEL_FLATTEN = 11; - const ALPHACHANNEL_REMOVE = 12; - const STATISTIC_GRADIENT = 1; - const STATISTIC_MAXIMUM = 2; - const STATISTIC_MEAN = 3; - const STATISTIC_MEDIAN = 4; - const STATISTIC_MINIMUM = 5; - const STATISTIC_MODE = 6; - const STATISTIC_NONPEAK = 7; - const STATISTIC_STANDARD_DEVIATION = 8; - const MORPHOLOGY_CONVOLVE = 1; - const MORPHOLOGY_CORRELATE = 2; - const MORPHOLOGY_ERODE = 3; - const MORPHOLOGY_DILATE = 4; - const MORPHOLOGY_ERODE_INTENSITY = 5; - const MORPHOLOGY_DILATE_INTENSITY = 6; - const MORPHOLOGY_DISTANCE = 7; - const MORPHOLOGY_OPEN = 8; - const MORPHOLOGY_CLOSE = 9; - const MORPHOLOGY_OPEN_INTENSITY = 10; - const MORPHOLOGY_CLOSE_INTENSITY = 11; - const MORPHOLOGY_SMOOTH = 12; - const MORPHOLOGY_EDGE_IN = 13; - const MORPHOLOGY_EDGE_OUT = 14; - const MORPHOLOGY_EDGE = 15; - const MORPHOLOGY_TOP_HAT = 16; - const MORPHOLOGY_BOTTOM_HAT = 17; - const MORPHOLOGY_HIT_AND_MISS = 18; - const MORPHOLOGY_THINNING = 19; - const MORPHOLOGY_THICKEN = 20; - const MORPHOLOGY_VORONOI = 21; - const MORPHOLOGY_ITERATIVE = 22; - const KERNEL_UNITY = 1; - const KERNEL_GAUSSIAN = 2; - const KERNEL_DIFFERENCE_OF_GAUSSIANS = 3; - const KERNEL_LAPLACIAN_OF_GAUSSIANS = 4; - const KERNEL_BLUR = 5; - const KERNEL_COMET = 6; - const KERNEL_LAPLACIAN = 7; - const KERNEL_SOBEL = 8; - const KERNEL_FREI_CHEN = 9; - const KERNEL_ROBERTS = 10; - const KERNEL_PREWITT = 11; - const KERNEL_COMPASS = 12; - const KERNEL_KIRSCH = 13; - const KERNEL_DIAMOND = 14; - const KERNEL_SQUARE = 15; - const KERNEL_RECTANGLE = 16; - const KERNEL_OCTAGON = 17; - const KERNEL_DISK = 18; - const KERNEL_PLUS = 19; - const KERNEL_CROSS = 20; - const KERNEL_RING = 21; - const KERNEL_PEAKS = 22; - const KERNEL_EDGES = 23; - const KERNEL_CORNERS = 24; - const KERNEL_DIAGONALS = 25; - const KERNEL_LINE_ENDS = 26; - const KERNEL_LINE_JUNCTIONS = 27; - const KERNEL_RIDGES = 28; - const KERNEL_CONVEX_HULL = 29; - const KERNEL_THIN_SE = 30; - const KERNEL_SKELETON = 31; - const KERNEL_CHEBYSHEV = 32; - const KERNEL_MANHATTAN = 33; - const KERNEL_OCTAGONAL = 34; - const KERNEL_EUCLIDEAN = 35; - const KERNEL_USER_DEFINED = 36; - const KERNEL_BINOMIAL = 37; - const DIRECTION_LEFT_TO_RIGHT = 2; - const DIRECTION_RIGHT_TO_LEFT = 1; - const NORMALIZE_KERNEL_NONE = 0; - const NORMALIZE_KERNEL_VALUE = 8192; - const NORMALIZE_KERNEL_CORRELATE = 65536; - const NORMALIZE_KERNEL_PERCENT = 4096; - - /** - * (PECL imagick 2.0.0)<br/> - * Removes repeated portions of images to optimize - * @link https://php.net/manual/en/imagick.optimizeimagelayers.php - * @return bool <b>TRUE</b> on success. - */ - public function optimizeImageLayers () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the maximum bounding region between images - * @link https://php.net/manual/en/imagick.compareimagelayers.php - * @param int $method <p> - * One of the layer method constants. - * </p> - * @return Imagick <b>TRUE</b> on success. - */ - public function compareImageLayers ($method) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Quickly fetch attributes - * @link https://php.net/manual/en/imagick.pingimageblob.php - * @param string $image <p> - * A string containing the image. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function pingImageBlob ($image) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Get basic image attributes in a lightweight manner - * @link https://php.net/manual/en/imagick.pingimagefile.php - * @param resource $filehandle <p> - * An open filehandle to the image. - * </p> - * @param string $fileName [optional] <p> - * Optional filename for this image. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function pingImageFile ($filehandle, $fileName = null) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Creates a vertical mirror image - * @link https://php.net/manual/en/imagick.transposeimage.php - * @return bool <b>TRUE</b> on success. - */ - public function transposeImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Creates a horizontal mirror image - * @link https://php.net/manual/en/imagick.transverseimage.php - * @return bool <b>TRUE</b> on success. - */ - public function transverseImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Remove edges from the image - * @link https://php.net/manual/en/imagick.trimimage.php - * @param float $fuzz <p> - * By default target must match a particular pixel color exactly. - * However, in many cases two colors may differ by a small amount. - * The fuzz member of image defines how much tolerance is acceptable - * to consider two colors as the same. This parameter represents the variation - * on the quantum range. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function trimImage ($fuzz) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Applies wave filter to the image - * @link https://php.net/manual/en/imagick.waveimage.php - * @param float $amplitude <p> - * The amplitude of the wave. - * </p> - * @param float $length <p> - * The length of the wave. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function waveImage ($amplitude, $length) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adds vignette filter to the image - * @link https://php.net/manual/en/imagick.vignetteimage.php - * @param float $blackPoint <p> - * The black point. - * </p> - * @param float $whitePoint <p> - * The white point - * </p> - * @param int $x <p> - * X offset of the ellipse - * </p> - * @param int $y <p> - * Y offset of the ellipse - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function vignetteImage ($blackPoint, $whitePoint, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Discards all but one of any pixel color - * @link https://php.net/manual/en/imagick.uniqueimagecolors.php - * @return bool <b>TRUE</b> on success. - */ - public function uniqueImageColors () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Return if the image has a matte channel - * @link https://php.net/manual/en/imagick.getimagematte.php - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function getImageMatte () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image matte channel - * @link https://php.net/manual/en/imagick.setimagematte.php - * @param bool $matte <p> - * True activates the matte channel and false disables it. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageMatte ($matte) {} - - /** - * Adaptively resize image with data dependent triangulation - * - * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.<br> - * If false, the calculations should produce the same results as ImageMagick CLI does.<br> - * <br> - * <b>Note:</b> The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. - * In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. - * @link https://php.net/manual/en/imagick.adaptiveresizeimage.php - * @param int $columns The number of columns in the scaled image. - * @param int $rows The number of rows in the scaled image. - * @param bool $bestfit [optional] Whether to fit the image inside a bounding box.<br> - * The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. - * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE - * @return bool TRUE on success - * @throws ImagickException Throws ImagickException on error - * @since 2.0.0 - */ - public function adaptiveResizeImage ($columns, $rows, $bestfit = false, $legacy = false) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Simulates a pencil sketch - * @link https://php.net/manual/en/imagick.sketchimage.php - * @param float $radius <p> - * The radius of the Gaussian, in pixels, not counting the center pixel - * </p> - * @param float $sigma <p> - * The standard deviation of the Gaussian, in pixels. - * </p> - * @param float $angle <p> - * Apply the effect along this angle. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function sketchImage ($radius, $sigma, $angle) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Creates a 3D effect - * @link https://php.net/manual/en/imagick.shadeimage.php - * @param bool $gray <p> - * A value other than zero shades the intensity of each pixel. - * </p> - * @param float $azimuth <p> - * Defines the light source direction. - * </p> - * @param float $elevation <p> - * Defines the light source direction. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function shadeImage ($gray, $azimuth, $elevation) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the size offset - * @link https://php.net/manual/en/imagick.getsizeoffset.php - * @return int the size offset associated with the Imagick object. - */ - public function getSizeOffset () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the size and offset of the Imagick object - * @link https://php.net/manual/en/imagick.setsizeoffset.php - * @param int $columns <p> - * The width in pixels. - * </p> - * @param int $rows <p> - * The height in pixels. - * </p> - * @param int $offset <p> - * The image offset. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setSizeOffset ($columns, $rows, $offset) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adds adaptive blur filter to image - * @link https://php.net/manual/en/imagick.adaptiveblurimage.php - * @param float $radius <p> - * The radius of the Gaussian, in pixels, not counting the center pixel. - * Provide a value of 0 and the radius will be chosen automagically. - * </p> - * @param float $sigma <p> - * The standard deviation of the Gaussian, in pixels. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function adaptiveBlurImage ($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Enhances the contrast of a color image - * @link https://php.net/manual/en/imagick.contraststretchimage.php - * @param float $black_point <p> - * The black point. - * </p> - * @param float $white_point <p> - * The white point. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. <b>Imagick::CHANNEL_ALL</b>. Refer to this - * list of channel constants. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function contrastStretchImage ($black_point, $white_point, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adaptively sharpen the image - * @link https://php.net/manual/en/imagick.adaptivesharpenimage.php - * @param float $radius <p> - * The radius of the Gaussian, in pixels, not counting the center pixel. Use 0 for auto-select. - * </p> - * @param float $sigma <p> - * The standard deviation of the Gaussian, in pixels. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function adaptiveSharpenImage ($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Creates a high-contrast, two-color image - * @link https://php.net/manual/en/imagick.randomthresholdimage.php - * @param float $low <p> - * The low point - * </p> - * @param float $high <p> - * The high point - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function randomThresholdImage ($low, $high, $channel = Imagick::CHANNEL_ALL) {} - - /** - * @param $xRounding - * @param $yRounding - * @param $strokeWidth [optional] - * @param $displace [optional] - * @param $sizeCorrection [optional] - */ - public function roundCornersImage ($xRounding, $yRounding, $strokeWidth, $displace, $sizeCorrection) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Rounds image corners - * @link https://php.net/manual/en/imagick.roundcorners.php - * @param float $x_rounding <p> - * x rounding - * </p> - * @param float $y_rounding <p> - * y rounding - * </p> - * @param float $stroke_width [optional] <p> - * stroke width - * </p> - * @param float $displace [optional] <p> - * image displace - * </p> - * @param float $size_correction [optional] <p> - * size correction - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function roundCorners ($x_rounding, $y_rounding, $stroke_width = 10.0, $displace = 5.0, $size_correction = -6.0) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Set the iterator position - * @link https://php.net/manual/en/imagick.setiteratorindex.php - * @param int $index <p> - * The position to set the iterator to - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setIteratorIndex ($index) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the index of the current active image - * @link https://php.net/manual/en/imagick.getiteratorindex.php - * @return int an integer containing the index of the image in the stack. - */ - public function getIteratorIndex () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Convenience method for setting crop size and the image geometry - * @link https://php.net/manual/en/imagick.transformimage.php - * @param string $crop <p> - * A crop geometry string. This geometry defines a subregion of the image to crop. - * </p> - * @param string $geometry <p> - * An image geometry string. This geometry defines the final size of the image. - * </p> - * @return Imagick <b>TRUE</b> on success. - */ - public function transformImage ($crop, $geometry) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image opacity level - * @link https://php.net/manual/en/imagick.setimageopacity.php - * @param float $opacity <p> - * The level of transparency: 1.0 is fully opaque and 0.0 is fully - * transparent. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageOpacity ($opacity) {} - - /** - * (PECL imagick 2.2.2)<br/> - * Performs an ordered dither - * @link https://php.net/manual/en/imagick.orderedposterizeimage.php - * @param string $threshold_map <p> - * A string containing the name of the threshold dither map to use - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function orderedPosterizeImage ($threshold_map, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Simulates a Polaroid picture - * @link https://php.net/manual/en/imagick.polaroidimage.php - * @param ImagickDraw $properties <p> - * The polaroid properties - * </p> - * @param float $angle <p> - * The polaroid angle - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function polaroidImage (ImagickDraw $properties, $angle) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the named image property - * @link https://php.net/manual/en/imagick.getimageproperty.php - * @param string $name <p> - * name of the property (for example Exif:DateTime) - * </p> - * @return string|false a string containing the image property, false if a - * property with the given name does not exist. - */ - public function getImageProperty ($name) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets an image property - * @link https://php.net/manual/en/imagick.setimageproperty.php - * @param string $name - * @param string $value - * @return bool <b>TRUE</b> on success. - */ - public function setImageProperty ($name, $value) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image interpolate pixel method - * @link https://php.net/manual/en/imagick.setimageinterpolatemethod.php - * @param int $method <p> - * The method is one of the <b>Imagick::INTERPOLATE_*</b> constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageInterpolateMethod ($method) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the interpolation method - * @link https://php.net/manual/en/imagick.getimageinterpolatemethod.php - * @return int the interpolate method on success. - */ - public function getImageInterpolateMethod () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Stretches with saturation the image intensity - * @link https://php.net/manual/en/imagick.linearstretchimage.php - * @param float $blackPoint <p> - * The image black point - * </p> - * @param float $whitePoint <p> - * The image white point - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function linearStretchImage ($blackPoint, $whitePoint) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the image length in bytes - * @link https://php.net/manual/en/imagick.getimagelength.php - * @return int an int containing the current image size. - */ - public function getImageLength () {} - - /** - * (No version information available, might only be in SVN)<br/> - * Set image size - * @link https://php.net/manual/en/imagick.extentimage.php - * @param int $width <p> - * The new width - * </p> - * @param int $height <p> - * The new height - * </p> - * @param int $x <p> - * X position for the new size - * </p> - * @param int $y <p> - * Y position for the new size - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function extentImage ($width, $height, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image orientation - * @link https://php.net/manual/en/imagick.getimageorientation.php - * @return int an int on success. - */ - public function getImageOrientation () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image orientation - * @link https://php.net/manual/en/imagick.setimageorientation.php - * @param int $orientation <p> - * One of the orientation constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageOrientation ($orientation) {} - - /** - * (PECL imagick 2.1.0)<br/> - * Changes the color value of any pixel that matches target - * @link https://php.net/manual/en/imagick.paintfloodfillimage.php - * @param mixed $fill <p> - * ImagickPixel object or a string containing the fill color - * </p> - * @param float $fuzz <p> - * The amount of fuzz. For example, set fuzz to 10 and the color red at - * intensities of 100 and 102 respectively are now interpreted as the - * same color for the purposes of the floodfill. - * </p> - * @param mixed $bordercolor <p> - * ImagickPixel object or a string containing the border color - * </p> - * @param int $x <p> - * X start position of the floodfill - * </p> - * @param int $y <p> - * Y start position of the floodfill - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function paintFloodfillImage ($fill, $fuzz, $bordercolor, $x, $y, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Replaces colors in the image from a color lookup table. Optional second parameter to replace colors in a specific channel. This method is available if Imagick has been compiled against ImageMagick version 6.3.6 or newer. - * @link https://php.net/manual/en/imagick.clutimage.php - * @param Imagick $lookup_table <p> - * Imagick object containing the color lookup table - * </p> - * @param int $channel [optional] <p> - * The Channeltype - * constant. When not supplied, default channels are replaced. - * </p> - * @return bool <b>TRUE</b> on success. - * @since 2.0.0 - */ - public function clutImage (Imagick $lookup_table, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the image properties - * @link https://php.net/manual/en/imagick.getimageproperties.php - * @param string $pattern [optional] <p> - * The pattern for property names. - * </p> - * @param bool $only_names [optional] <p> - * Whether to return only property names. If <b>FALSE</b> then also the values are returned - * </p> - * @return array an array containing the image properties or property names. - */ - public function getImageProperties ($pattern = "*", $only_names = true) {} - - /** - * (PECL imagick 2.2.0)<br/> - * Returns the image profiles - * @link https://php.net/manual/en/imagick.getimageprofiles.php - * @param string $pattern [optional] <p> - * The pattern for profile names. - * </p> - * @param bool $include_values [optional] <p> - * Whether to return only profile names. If <b>FALSE</b> then only profile names will be returned. - * </p> - * @return array an array containing the image profiles or profile names. - */ - public function getImageProfiles ($pattern = "*", $include_values = true) {} - - /** - * (PECL imagick 2.0.1)<br/> - * Distorts an image using various distortion methods - * @link https://php.net/manual/en/imagick.distortimage.php - * @param int $method <p> - * The method of image distortion. See distortion constants - * </p> - * @param array $arguments <p> - * The arguments for this distortion method - * </p> - * @param bool $bestfit <p> - * Attempt to resize destination to fit distorted source - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function distortImage ($method, array $arguments, $bestfit) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Writes an image to a filehandle - * @link https://php.net/manual/en/imagick.writeimagefile.php - * @param resource $filehandle <p> - * Filehandle where to write the image - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function writeImageFile ($filehandle) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Writes frames to a filehandle - * @link https://php.net/manual/en/imagick.writeimagesfile.php - * @param resource $filehandle <p> - * Filehandle where to write the images - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function writeImagesFile ($filehandle) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Reset image page - * @link https://php.net/manual/en/imagick.resetimagepage.php - * @param string $page <p> - * The page definition. For example 7168x5147+0+0 - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function resetImagePage ($page) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Sets image clip mask - * @link https://php.net/manual/en/imagick.setimageclipmask.php - * @param Imagick $clip_mask <p> - * The Imagick object containing the clip mask - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageClipMask (Imagick $clip_mask) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Gets image clip mask - * @link https://php.net/manual/en/imagick.getimageclipmask.php - * @return Imagick an Imagick object containing the clip mask. - */ - public function getImageClipMask () {} - - /** - * (No version information available, might only be in SVN)<br/> - * Animates an image or images - * @link https://php.net/manual/en/imagick.animateimages.php - * @param string $x_server <p> - * X server address - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function animateImages ($x_server) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Recolors image - * @link https://php.net/manual/en/imagick.recolorimage.php - * @param array $matrix <p> - * The matrix containing the color values - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function recolorImage (array $matrix) {} - - /** - * (PECL imagick 2.1.0)<br/> - * Sets font - * @link https://php.net/manual/en/imagick.setfont.php - * @param string $font <p> - * Font name or a filename - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setFont ($font) {} - - /** - * (PECL imagick 2.1.0)<br/> - * Gets font - * @link https://php.net/manual/en/imagick.getfont.php - * @return string|false the string containing the font name or <b>FALSE</b> if not font is set. - */ - public function getFont () {} - - /** - * (PECL imagick 2.1.0)<br/> - * Sets point size - * @link https://php.net/manual/en/imagick.setpointsize.php - * @param float $point_size <p> - * Point size - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setPointSize ($point_size) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Gets point size - * @link https://php.net/manual/en/imagick.getpointsize.php - * @return float a float containing the point size. - */ - public function getPointSize () {} - - /** - * (PECL imagick 2.1.0)<br/> - * Merges image layers - * @link https://php.net/manual/en/imagick.mergeimagelayers.php - * @param int $layer_method <p> - * One of the <b>Imagick::LAYERMETHOD_*</b> constants - * </p> - * @return Imagick Returns an Imagick object containing the merged image. - * @throws ImagickException - */ - public function mergeImageLayers ($layer_method) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Sets image alpha channel - * @link https://php.net/manual/en/imagick.setimagealphachannel.php - * @param int $mode <p> - * One of the <b>Imagick::ALPHACHANNEL_*</b> constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageAlphaChannel ($mode) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Changes the color value of any pixel that matches target - * @link https://php.net/manual/en/imagick.floodfillpaintimage.php - * @param mixed $fill <p> - * ImagickPixel object or a string containing the fill color - * </p> - * @param float $fuzz <p> - * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color. - * </p> - * @param mixed $target <p> - * ImagickPixel object or a string containing the target color to paint - * </p> - * @param int $x <p> - * X start position of the floodfill - * </p> - * @param int $y <p> - * Y start position of the floodfill - * </p> - * @param bool $invert <p> - * If <b>TRUE</b> paints any pixel that does not match the target color. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function floodFillPaintImage ($fill, $fuzz, $target, $x, $y, $invert, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Changes the color value of any pixel that matches target - * @link https://php.net/manual/en/imagick.opaquepaintimage.php - * @param mixed $target <p> - * ImagickPixel object or a string containing the color to change - * </p> - * @param mixed $fill <p> - * The replacement color - * </p> - * @param float $fuzz <p> - * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color. - * </p> - * @param bool $invert <p> - * If <b>TRUE</b> paints any pixel that does not match the target color. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function opaquePaintImage ($target, $fill, $fuzz, $invert, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Paints pixels transparent - * @link https://php.net/manual/en/imagick.transparentpaintimage.php - * @param mixed $target <p> - * The target color to paint - * </p> - * @param float $alpha <p> - * The level of transparency: 1.0 is fully opaque and 0.0 is fully transparent. - * </p> - * @param float $fuzz <p> - * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color. - * </p> - * @param bool $invert <p> - * If <b>TRUE</b> paints any pixel that does not match the target color. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function transparentPaintImage ($target, $alpha, $fuzz, $invert) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Animates an image or images - * @link https://php.net/manual/en/imagick.liquidrescaleimage.php - * @param int $width <p> - * The width of the target size - * </p> - * @param int $height <p> - * The height of the target size - * </p> - * @param float $delta_x <p> - * How much the seam can traverse on x-axis. - * Passing 0 causes the seams to be straight. - * </p> - * @param float $rigidity <p> - * Introduces a bias for non-straight seams. This parameter is - * typically 0. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function liquidRescaleImage ($width, $height, $delta_x, $rigidity) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Enciphers an image - * @link https://php.net/manual/en/imagick.encipherimage.php - * @param string $passphrase <p> - * The passphrase - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function encipherImage ($passphrase) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Deciphers an image - * @link https://php.net/manual/en/imagick.decipherimage.php - * @param string $passphrase <p> - * The passphrase - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function decipherImage ($passphrase) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Sets the gravity - * @link https://php.net/manual/en/imagick.setgravity.php - * @param int $gravity <p> - * The gravity property. Refer to the list of - * gravity constants. - * </p> - * @return bool No value is returned. - */ - public function setGravity ($gravity) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Gets the gravity - * @link https://php.net/manual/en/imagick.getgravity.php - * @return int the gravity property. Refer to the list of - * gravity constants. - */ - public function getGravity () {} - - /** - * (PECL imagick 2.2.1)<br/> - * Gets channel range - * @link https://php.net/manual/en/imagick.getimagechannelrange.php - * @param int $channel <p> - * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants - * </p> - * @return array an array containing minima and maxima values of the channel(s). - */ - public function getImageChannelRange ($channel) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Gets the image alpha channel - * @link https://php.net/manual/en/imagick.getimagealphachannel.php - * @return int a constant defining the current alpha channel value. Refer to this - * list of alpha channel constants. - */ - public function getImageAlphaChannel () {} - - /** - * (No version information available, might only be in SVN)<br/> - * Gets channel distortions - * @link https://php.net/manual/en/imagick.getimagechanneldistortions.php - * @param Imagick $reference <p> - * Imagick object containing the reference image - * </p> - * @param int $metric <p> - * Refer to this list of metric type constants. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants - * </p> - * @return float a double describing the channel distortion. - */ - public function getImageChannelDistortions (Imagick $reference, $metric, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Sets the image gravity - * @link https://php.net/manual/en/imagick.setimagegravity.php - * @param int $gravity <p> - * The gravity property. Refer to the list of - * gravity constants. - * </p> - * @return bool No value is returned. - */ - public function setImageGravity ($gravity) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Gets the image gravity - * @link https://php.net/manual/en/imagick.getimagegravity.php - * @return int the images gravity property. Refer to the list of - * gravity constants. - */ - public function getImageGravity () {} - - /** - * (No version information available, might only be in SVN)<br/> - * Imports image pixels - * @link https://php.net/manual/en/imagick.importimagepixels.php - * @param int $x <p> - * The image x position - * </p> - * @param int $y <p> - * The image y position - * </p> - * @param int $width <p> - * The image width - * </p> - * @param int $height <p> - * The image height - * </p> - * @param string $map <p> - * Map of pixel ordering as a string. This can be for example RGB. - * The value can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent), - * O = opacity (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad. - * </p> - * @param int $storage <p> - * The pixel storage method. - * Refer to this list of pixel constants. - * </p> - * @param array $pixels <p> - * The array of pixels - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function importImagePixels ($x, $y, $width, $height, $map, $storage, array $pixels) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Removes skew from the image - * @link https://php.net/manual/en/imagick.deskewimage.php - * @param float $threshold <p> - * Deskew threshold - * </p> - * @return bool - */ - public function deskewImage ($threshold) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Segments an image - * @link https://php.net/manual/en/imagick.segmentimage.php - * @param int $COLORSPACE <p> - * One of the COLORSPACE constants. - * </p> - * @param float $cluster_threshold <p> - * A percentage describing minimum number of pixels - * contained in hexedra before it is considered valid. - * </p> - * @param float $smooth_threshold <p> - * Eliminates noise from the histogram. - * </p> - * @param bool $verbose [optional] <p> - * Whether to output detailed information about recognised classes. - * </p> - * @return bool - */ - public function segmentImage ($COLORSPACE, $cluster_threshold, $smooth_threshold, $verbose = false) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Interpolates colors - * @link https://php.net/manual/en/imagick.sparsecolorimage.php - * @param int $SPARSE_METHOD <p> - * Refer to this list of sparse method constants - * </p> - * @param array $arguments <p> - * An array containing the coordinates. - * The array is in format array(1,1, 2,45) - * </p> - * @param int $channel [optional] - * @return bool <b>TRUE</b> on success. - */ - public function sparseColorImage ($SPARSE_METHOD, array $arguments, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Remaps image colors - * @link https://php.net/manual/en/imagick.remapimage.php - * @param Imagick $replacement <p> - * An Imagick object containing the replacement colors - * </p> - * @param int $DITHER <p> - * Refer to this list of dither method constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function remapImage (Imagick $replacement, $DITHER) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Exports raw image pixels - * @link https://php.net/manual/en/imagick.exportimagepixels.php - * @param int $x <p> - * X-coordinate of the exported area - * </p> - * @param int $y <p> - * Y-coordinate of the exported area - * </p> - * @param int $width <p> - * Width of the exported aread - * </p> - * @param int $height <p> - * Height of the exported area - * </p> - * @param string $map <p> - * Ordering of the exported pixels. For example "RGB". - * Valid characters for the map are R, G, B, A, O, C, Y, M, K, I and P. - * </p> - * @param int $STORAGE <p> - * Refer to this list of pixel type constants - * </p> - * @return array an array containing the pixels values. - */ - public function exportImagePixels ($x, $y, $width, $height, $map, $STORAGE) {} - - /** - * (No version information available, might only be in SVN)<br/> - * The getImageChannelKurtosis purpose - * @link https://php.net/manual/en/imagick.getimagechannelkurtosis.php - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants - * </p> - * @return array an array with kurtosis and skewness - * members. - */ - public function getImageChannelKurtosis ($channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Applies a function on the image - * @link https://php.net/manual/en/imagick.functionimage.php - * @param int $function <p> - * Refer to this list of function constants - * </p> - * @param array $arguments <p> - * Array of arguments to pass to this function. - * </p> - * @param int $channel [optional] - * @return bool <b>TRUE</b> on success. - */ - public function functionImage ($function, array $arguments, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * @param $COLORSPACE - */ - public function transformImageColorspace ($COLORSPACE) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Replaces colors in the image - * @link https://php.net/manual/en/imagick.haldclutimage.php - * @param Imagick $clut <p> - * Imagick object containing the Hald lookup image. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function haldClutImage (Imagick $clut, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * @param $CHANNEL [optional] - */ - public function autoLevelImage ($CHANNEL) {} - - /** - * @param $factor [optional] - */ - public function blueShiftImage ($factor) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Get image artifact - * @link https://php.net/manual/en/imagick.getimageartifact.php - * @param string $artifact <p> - * The name of the artifact - * </p> - * @return string the artifact value on success. - */ - public function getImageArtifact ($artifact) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Set image artifact - * @link https://php.net/manual/en/imagick.setimageartifact.php - * @param string $artifact <p> - * The name of the artifact - * </p> - * @param string $value <p> - * The value of the artifact - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageArtifact ($artifact, $value) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Delete image artifact - * @link https://php.net/manual/en/imagick.deleteimageartifact.php - * @param string $artifact <p> - * The name of the artifact to delete - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function deleteImageArtifact ($artifact) {} - - /** - * (PECL imagick 0.9.10-0.9.9)<br/> - * Gets the colorspace - * @link https://php.net/manual/en/imagick.getcolorspace.php - * @return int an integer which can be compared against COLORSPACE constants. - */ - public function getColorspace () {} - - /** - * (No version information available, might only be in SVN)<br/> - * Set colorspace - * @link https://php.net/manual/en/imagick.setcolorspace.php - * @param int $COLORSPACE <p> - * One of the COLORSPACE constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setColorspace ($COLORSPACE) {} - - /** - * @param $CHANNEL [optional] - */ - public function clampImage ($CHANNEL) {} - - /** - * @param $stack - * @param $offset - */ - public function smushImages ($stack, $offset) {} - - /** - * (PECL imagick 2.0.0)<br/> - * The Imagick constructor - * @link https://php.net/manual/en/imagick.construct.php - * @param mixed $files <p> - * The path to an image to load or an array of paths. Paths can include - * wildcards for file names, or can be URLs. - * </p> - * @throws ImagickException Throws ImagickException on error. - */ - public function __construct ($files = null) {} - - /** - * @return string - */ - public function __toString () {} - - public function count () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns a MagickPixelIterator - * @link https://php.net/manual/en/imagick.getpixeliterator.php - * @return ImagickPixelIterator an ImagickPixelIterator on success. - */ - public function getPixelIterator () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Get an ImagickPixelIterator for an image section - * @link https://php.net/manual/en/imagick.getpixelregioniterator.php - * @param int $x <p> - * The x-coordinate of the region. - * </p> - * @param int $y <p> - * The y-coordinate of the region. - * </p> - * @param int $columns <p> - * The width of the region. - * </p> - * @param int $rows <p> - * The height of the region. - * </p> - * @return ImagickPixelIterator an ImagickPixelIterator for an image section. - */ - public function getPixelRegionIterator ($x, $y, $columns, $rows) {} - - /** - * (PECL imagick 0.9.0-0.9.9)<br/> - * Reads image from filename - * @link https://php.net/manual/en/imagick.readimage.php - * @param string $filename - * @return bool <b>TRUE</b> on success. - * @throws ImagickException Throws ImagickException on error. - */ - public function readImage ($filename) {} - - /** - * @param $filenames - * @throws ImagickException Throws ImagickException on error. - */ - public function readImages ($filenames) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Reads image from a binary string - * @link https://php.net/manual/en/imagick.readimageblob.php - * @param string $image - * @param string $filename [optional] - * @return bool <b>TRUE</b> on success. - * @throws ImagickException Throws ImagickException on error. - */ - public function readImageBlob ($image, $filename = null) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the format of a particular image - * @link https://php.net/manual/en/imagick.setimageformat.php - * @param string $format <p> - * String presentation of the image format. Format support - * depends on the ImageMagick installation. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageFormat ($format) {} - - /** - * Scales the size of an image to the given dimensions. Passing zero as either of the arguments will preserve dimension while scaling.<br> - * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.<br> - * If false, the calculations should produce the same results as ImageMagick CLI does. - * @link https://php.net/manual/en/imagick.scaleimage.php - * @param int $cols - * @param int $rows - * @param bool $bestfit [optional] The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. - * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE - * @return bool <b>TRUE</b> on success. - * @throws ImagickException Throws ImagickException on error - * @since 2.0.0 - */ - public function scaleImage ($cols, $rows, $bestfit = false, $legacy = false) {} - - /** - * (PECL imagick 0.9.0-0.9.9)<br/> - * Writes an image to the specified filename - * @link https://php.net/manual/en/imagick.writeimage.php - * @param string $filename [optional] <p> - * Filename where to write the image. The extension of the filename - * defines the type of the file. - * Format can be forced regardless of file extension using format: prefix, - * for example "jpg:test.png". - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function writeImage ($filename = null) {} - - /** - * (PECL imagick 0.9.0-0.9.9)<br/> - * Writes an image or image sequence - * @link https://php.net/manual/en/imagick.writeimages.php - * @param string $filename - * @param bool $adjoin - * @return bool <b>TRUE</b> on success. - */ - public function writeImages ($filename, $adjoin) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adds blur filter to image - * @link https://php.net/manual/en/imagick.blurimage.php - * @param float $radius <p> - * Blur radius - * </p> - * @param float $sigma <p> - * Standard deviation - * </p> - * @param int $channel [optional] <p> - * The Channeltype - * constant. When not supplied, all channels are blurred. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function blurImage ($radius, $sigma, $channel = null) {} - - /** - * Changes the size of an image to the given dimensions and removes any associated profiles.<br> - * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.<br> - * If false, the calculations should produce the same results as ImageMagick CLI does.<br> - * <br> - * <b>Note:</b> The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. - * @link https://php.net/manual/en/imagick.thumbnailimage.php - * @param int $columns <p> - * Image width - * </p> - * @param int $rows <p> - * Image height - * </p> - * @param bool $bestfit [optional] <p> - * Whether to force maximum values - * </p> - * The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. - * @param bool $fill [optional] - * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE - * @return bool <b>TRUE</b> on success. - * @since 2.0.0 - */ - public function thumbnailImage ($columns, $rows, $bestfit = false, $fill = false, $legacy = false) {} - - /** - * Creates a cropped thumbnail at the requested size. - * If legacy is true, uses the incorrect behaviour that was present until Imagick 3.4.0. - * If false it uses the correct behaviour. - * @link https://php.net/manual/en/imagick.cropthumbnailimage.php - * @param int $width The width of the thumbnail - * @param int $height The Height of the thumbnail - * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE - * @return bool TRUE on succes - * @throws ImagickException Throws ImagickException on error - * @since 2.0.0 - */ - public function cropThumbnailImage ($width, $height, $legacy = false) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the filename of a particular image in a sequence - * @link https://php.net/manual/en/imagick.getimagefilename.php - * @return string a string with the filename of the image. - */ - public function getImageFilename () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the filename of a particular image - * @link https://php.net/manual/en/imagick.setimagefilename.php - * @param string $filename - * @return bool <b>TRUE</b> on success. - */ - public function setImageFilename ($filename) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the format of a particular image in a sequence - * @link https://php.net/manual/en/imagick.getimageformat.php - * @return string a string containing the image format on success. - */ - public function getImageFormat () {} - - /** - * @link https://www.php.net/manual/en/imagick.getimagemimetype.php - * @return string Returns the image mime-type. - */ - public function getImageMimeType () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Removes an image from the image list - * @link https://php.net/manual/en/imagick.removeimage.php - * @return bool <b>TRUE</b> on success. - */ - public function removeImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Destroys the Imagick object - * @link https://php.net/manual/en/imagick.destroy.php - * @return bool <b>TRUE</b> on success. - */ - public function destroy () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Clears all resources associated to Imagick object - * @link https://php.net/manual/en/imagick.clear.php - * @return bool <b>TRUE</b> on success. - */ - public function clear () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the image length in bytes - * @link https://php.net/manual/en/imagick.getimagesize.php - * @return int an int containing the current image size. - * @deprecated use {@see Imagick::getImageLength()} instead - */ - public function getImageSize () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the image sequence as a blob - * @link https://php.net/manual/en/imagick.getimageblob.php - * @return string a string containing the image. - */ - public function getImageBlob () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns all image sequences as a blob - * @link https://php.net/manual/en/imagick.getimagesblob.php - * @return string a string containing the images. On failure, throws ImagickException on failure - * @throws ImagickException on failure - */ - public function getImagesBlob () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the Imagick iterator to the first image - * @link https://php.net/manual/en/imagick.setfirstiterator.php - * @return bool <b>TRUE</b> on success. - */ - public function setFirstIterator () {} - - /** - * (PECL imagick 2.0.1)<br/> - * Sets the Imagick iterator to the last image - * @link https://php.net/manual/en/imagick.setlastiterator.php - * @return bool <b>TRUE</b> on success. - */ - public function setLastIterator () {} - - public function resetIterator () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Move to the previous image in the object - * @link https://php.net/manual/en/imagick.previousimage.php - * @return bool <b>TRUE</b> on success. - */ - public function previousImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Moves to the next image - * @link https://php.net/manual/en/imagick.nextimage.php - * @return bool <b>TRUE</b> on success. - */ - public function nextImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Checks if the object has a previous image - * @link https://php.net/manual/en/imagick.haspreviousimage.php - * @return bool <b>TRUE</b> if the object has more images when traversing the list in the - * reverse direction, returns <b>FALSE</b> if there are none. - */ - public function hasPreviousImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Checks if the object has more images - * @link https://php.net/manual/en/imagick.hasnextimage.php - * @return bool <b>TRUE</b> if the object has more images when traversing the list in the - * forward direction, returns <b>FALSE</b> if there are none. - */ - public function hasNextImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Set the iterator position - * @link https://php.net/manual/en/imagick.setimageindex.php - * @param int $index <p> - * The position to set the iterator to - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageIndex ($index) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the index of the current active image - * @link https://php.net/manual/en/imagick.getimageindex.php - * @return int an integer containing the index of the image in the stack. - */ - public function getImageIndex () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adds a comment to your image - * @link https://php.net/manual/en/imagick.commentimage.php - * @param string $comment <p> - * The comment to add - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function commentImage ($comment) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Extracts a region of the image - * @link https://php.net/manual/en/imagick.cropimage.php - * @param int $width <p> - * The width of the crop - * </p> - * @param int $height <p> - * The height of the crop - * </p> - * @param int $x <p> - * The X coordinate of the cropped region's top left corner - * </p> - * @param int $y <p> - * The Y coordinate of the cropped region's top left corner - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function cropImage ($width, $height, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adds a label to an image - * @link https://php.net/manual/en/imagick.labelimage.php - * @param string $label <p> - * The label to add - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function labelImage ($label) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the width and height as an associative array - * @link https://php.net/manual/en/imagick.getimagegeometry.php - * @return array an array with the width/height of the image. - */ - public function getImageGeometry () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Renders the ImagickDraw object on the current image - * @link https://php.net/manual/en/imagick.drawimage.php - * @param ImagickDraw $draw <p> - * The drawing operations to render on the image. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function drawImage (ImagickDraw $draw) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Sets the image compression quality - * @link https://php.net/manual/en/imagick.setimagecompressionquality.php - * @param int $quality <p> - * The image compression quality as an integer - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageCompressionQuality ($quality) {} - - /** - * (PECL imagick 2.2.2)<br/> - * Gets the current image's compression quality - * @link https://php.net/manual/en/imagick.getimagecompressionquality.php - * @return int integer describing the images compression quality - */ - public function getImageCompressionQuality () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Annotates an image with text - * @link https://php.net/manual/en/imagick.annotateimage.php - * @param ImagickDraw $draw_settings <p> - * The ImagickDraw object that contains settings for drawing the text - * </p> - * @param float $x <p> - * Horizontal offset in pixels to the left of text - * </p> - * @param float $y <p> - * Vertical offset in pixels to the baseline of text - * </p> - * @param float $angle <p> - * The angle at which to write the text - * </p> - * @param string $text <p> - * The string to draw - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function annotateImage (ImagickDraw $draw_settings, $x, $y, $angle, $text) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Composite one image onto another - * @link https://php.net/manual/en/imagick.compositeimage.php - * @param Imagick $composite_object <p> - * Imagick object which holds the composite image - * </p> - * @param int $composite Composite operator - * @param int $x <p> - * The column offset of the composited image - * </p> - * @param int $y <p> - * The row offset of the composited image - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this list of channel constants. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function compositeImage (Imagick $composite_object, $composite, $x, $y, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Control the brightness, saturation, and hue - * @link https://php.net/manual/en/imagick.modulateimage.php - * @param float $brightness - * @param float $saturation - * @param float $hue - * @return bool <b>TRUE</b> on success. - */ - public function modulateImage ($brightness, $saturation, $hue) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the number of unique colors in the image - * @link https://php.net/manual/en/imagick.getimagecolors.php - * @return int <b>TRUE</b> on success. - */ - public function getImageColors () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Creates a composite image - * @link https://php.net/manual/en/imagick.montageimage.php - * @param ImagickDraw $draw <p> - * The font name, size, and color are obtained from this object. - * </p> - * @param string $tile_geometry <p> - * The number of tiles per row and page (e.g. 6x4+0+0). - * </p> - * @param string $thumbnail_geometry <p> - * Preferred image size and border size of each thumbnail - * (e.g. 120x120+4+3>). - * </p> - * @param int $mode <p> - * Thumbnail framing mode, see Montage Mode constants. - * </p> - * @param string $frame <p> - * Surround the image with an ornamental border (e.g. 15x15+3+3). The - * frame color is that of the thumbnail's matte color. - * </p> - * @return Imagick <b>TRUE</b> on success. - */ - public function montageImage (ImagickDraw $draw, $tile_geometry, $thumbnail_geometry, $mode, $frame) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Identifies an image and fetches attributes - * @link https://php.net/manual/en/imagick.identifyimage.php - * @param bool $appendRawOutput [optional] - * @return array Identifies an image and returns the attributes. Attributes include - * the image width, height, size, and others. - */ - public function identifyImage ($appendRawOutput = false) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Changes the value of individual pixels based on a threshold - * @link https://php.net/manual/en/imagick.thresholdimage.php - * @param float $threshold - * @param int $channel [optional] - * @return bool <b>TRUE</b> on success. - */ - public function thresholdImage ($threshold, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Selects a threshold for each pixel based on a range of intensity - * @link https://php.net/manual/en/imagick.adaptivethresholdimage.php - * @param int $width <p> - * Width of the local neighborhood. - * </p> - * @param int $height <p> - * Height of the local neighborhood. - * </p> - * @param int $offset <p> - * The mean offset - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function adaptiveThresholdImage ($width, $height, $offset) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Forces all pixels below the threshold into black - * @link https://php.net/manual/en/imagick.blackthresholdimage.php - * @param mixed $threshold <p> - * The threshold below which everything turns black - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function blackThresholdImage ($threshold) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Force all pixels above the threshold into white - * @link https://php.net/manual/en/imagick.whitethresholdimage.php - * @param mixed $threshold - * @return bool <b>TRUE</b> on success. - */ - public function whiteThresholdImage ($threshold) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Append a set of images - * @link https://php.net/manual/en/imagick.appendimages.php - * @param bool $stack [optional] <p> - * Whether to stack the images vertically. - * By default (or if <b>FALSE</b> is specified) images are stacked left-to-right. - * If <i>stack</i> is <b>TRUE</b>, images are stacked top-to-bottom. - * </p> - * @return Imagick Imagick instance on success. - */ - public function appendImages ($stack = false) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Simulates a charcoal drawing - * @link https://php.net/manual/en/imagick.charcoalimage.php - * @param float $radius <p> - * The radius of the Gaussian, in pixels, not counting the center pixel - * </p> - * @param float $sigma <p> - * The standard deviation of the Gaussian, in pixels - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function charcoalImage ($radius, $sigma) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Enhances the contrast of a color image - * @link https://php.net/manual/en/imagick.normalizeimage.php - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function normalizeImage ($channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Simulates an oil painting - * @link https://php.net/manual/en/imagick.oilpaintimage.php - * @param float $radius <p> - * The radius of the circular neighborhood. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function oilPaintImage ($radius) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Reduces the image to a limited number of color level - * @link https://php.net/manual/en/imagick.posterizeimage.php - * @param int $levels - * @param bool $dither - * @return bool <b>TRUE</b> on success. - */ - public function posterizeImage ($levels, $dither) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Radial blurs an image - * @link https://php.net/manual/en/imagick.radialblurimage.php - * @param float $angle - * @param int $channel [optional] - * @return bool <b>TRUE</b> on success. - */ - public function radialBlurImage ($angle, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Creates a simulated 3d button-like effect - * @link https://php.net/manual/en/imagick.raiseimage.php - * @param int $width - * @param int $height - * @param int $x - * @param int $y - * @param bool $raise - * @return bool <b>TRUE</b> on success. - */ - public function raiseImage ($width, $height, $x, $y, $raise) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Resample image to desired resolution - * @link https://php.net/manual/en/imagick.resampleimage.php - * @param float $x_resolution - * @param float $y_resolution - * @param int $filter - * @param float $blur - * @return bool <b>TRUE</b> on success. - */ - public function resampleImage ($x_resolution, $y_resolution, $filter, $blur) {} - - /** - * Scales an image to the desired dimensions with one of these filters:<br> - * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.<br> - * If false, the calculations should produce the same results as ImageMagick CLI does.<br> - * <br> - * <b>Note:</b> The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched.<br> - * In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. - * @link https://php.net/manual/en/imagick.resizeimage.php - * @param int $columns Width of the image - * @param int $rows Height of the image - * @param int $filter Refer to the list of filter constants. - * @param float $blur The blur factor where > 1 is blurry, < 1 is sharp. - * @param bool $bestfit [optional] Added since 2.1.0. Added optional fit parameter. This method now supports proportional scaling. Pass zero as either parameter for proportional scaling - * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE - * @return bool TRUE on success - * @since 2.0.0 - */ - public function resizeImage ($columns, $rows, $filter, $blur, $bestfit = false, $legacy = false) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Offsets an image - * @link https://php.net/manual/en/imagick.rollimage.php - * @param int $x <p> - * The X offset. - * </p> - * @param int $y <p> - * The Y offset. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function rollImage ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Rotates an image - * @link https://php.net/manual/en/imagick.rotateimage.php - * @param mixed $background <p> - * The background color - * </p> - * @param float $degrees <p> - * The number of degrees to rotate the image - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function rotateImage ($background, $degrees) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Scales an image with pixel sampling - * @link https://php.net/manual/en/imagick.sampleimage.php - * @param int $columns - * @param int $rows - * @return bool <b>TRUE</b> on success. - */ - public function sampleImage ($columns, $rows) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Applies a solarizing effect to the image - * @link https://php.net/manual/en/imagick.solarizeimage.php - * @param int $threshold - * @return bool <b>TRUE</b> on success. - */ - public function solarizeImage ($threshold) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Simulates an image shadow - * @link https://php.net/manual/en/imagick.shadowimage.php - * @param float $opacity - * @param float $sigma - * @param int $x - * @param int $y - * @return bool <b>TRUE</b> on success. - */ - public function shadowImage ($opacity, $sigma, $x, $y) {} - - /** - * @param $key - * @param $value - */ - public function setImageAttribute ($key, $value) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image background color - * @link https://php.net/manual/en/imagick.setimagebackgroundcolor.php - * @param mixed $background - * @return bool <b>TRUE</b> on success. - */ - public function setImageBackgroundColor ($background) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image composite operator - * @link https://php.net/manual/en/imagick.setimagecompose.php - * @param int $compose - * @return bool <b>TRUE</b> on success. - */ - public function setImageCompose ($compose) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image compression - * @link https://php.net/manual/en/imagick.setimagecompression.php - * @param int $compression <p> - * One of the <b>COMPRESSION</b> constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageCompression ($compression) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image delay - * @link https://php.net/manual/en/imagick.setimagedelay.php - * @param int $delay <p> - * The amount of time expressed in 'ticks' that the image should be - * displayed for. For animated GIFs there are 100 ticks per second, so a - * value of 20 would be 20/100 of a second aka 1/5th of a second. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageDelay ($delay) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image depth - * @link https://php.net/manual/en/imagick.setimagedepth.php - * @param int $depth - * @return bool <b>TRUE</b> on success. - */ - public function setImageDepth ($depth) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image gamma - * @link https://php.net/manual/en/imagick.setimagegamma.php - * @param float $gamma - * @return bool <b>TRUE</b> on success. - */ - public function setImageGamma ($gamma) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image iterations - * @link https://php.net/manual/en/imagick.setimageiterations.php - * @param int $iterations <p> - * The number of iterations the image should loop over. Set to '0' to loop - * continuously. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageIterations ($iterations) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image matte color - * @link https://php.net/manual/en/imagick.setimagemattecolor.php - * @param mixed $matte - * @return bool <b>TRUE</b> on success. - */ - public function setImageMatteColor ($matte) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the page geometry of the image - * @link https://php.net/manual/en/imagick.setimagepage.php - * @param int $width - * @param int $height - * @param int $x - * @param int $y - * @return bool <b>TRUE</b> on success. - */ - public function setImagePage ($width, $height, $x, $y) {} - - /** - * @param $filename - */ - public function setImageProgressMonitor ($filename) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image resolution - * @link https://php.net/manual/en/imagick.setimageresolution.php - * @param float $x_resolution - * @param float $y_resolution - * @return bool <b>TRUE</b> on success. - */ - public function setImageResolution ($x_resolution, $y_resolution) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image scene - * @link https://php.net/manual/en/imagick.setimagescene.php - * @param int $scene - * @return bool <b>TRUE</b> on success. - */ - public function setImageScene ($scene) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image ticks-per-second - * @link https://php.net/manual/en/imagick.setimagetickspersecond.php - * @param int $ticks_per_second <p> - * The duration for which an image should be displayed expressed in ticks - * per second. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageTicksPerSecond ($ticks_per_second) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image type - * @link https://php.net/manual/en/imagick.setimagetype.php - * @param int $image_type - * @return bool <b>TRUE</b> on success. - */ - public function setImageType ($image_type) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image units of resolution - * @link https://php.net/manual/en/imagick.setimageunits.php - * @param int $units - * @return bool <b>TRUE</b> on success. - */ - public function setImageUnits ($units) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sharpens an image - * @link https://php.net/manual/en/imagick.sharpenimage.php - * @param float $radius - * @param float $sigma - * @param int $channel [optional] - * @return bool <b>TRUE</b> on success. - */ - public function sharpenImage ($radius, $sigma, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Shaves pixels from the image edges - * @link https://php.net/manual/en/imagick.shaveimage.php - * @param int $columns - * @param int $rows - * @return bool <b>TRUE</b> on success. - */ - public function shaveImage ($columns, $rows) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Creating a parallelogram - * @link https://php.net/manual/en/imagick.shearimage.php - * @param mixed $background <p> - * The background color - * </p> - * @param float $x_shear <p> - * The number of degrees to shear on the x axis - * </p> - * @param float $y_shear <p> - * The number of degrees to shear on the y axis - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function shearImage ($background, $x_shear, $y_shear) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Splices a solid color into the image - * @link https://php.net/manual/en/imagick.spliceimage.php - * @param int $width - * @param int $height - * @param int $x - * @param int $y - * @return bool <b>TRUE</b> on success. - */ - public function spliceImage ($width, $height, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Fetch basic attributes about the image - * @link https://php.net/manual/en/imagick.pingimage.php - * @param string $filename <p> - * The filename to read the information from. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function pingImage ($filename) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Reads image from open filehandle - * @link https://php.net/manual/en/imagick.readimagefile.php - * @param resource $filehandle - * @param string $fileName [optional] - * @return bool <b>TRUE</b> on success. - */ - public function readImageFile ($filehandle, $fileName = null) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Displays an image - * @link https://php.net/manual/en/imagick.displayimage.php - * @param string $servername <p> - * The X server name - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function displayImage ($servername) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Displays an image or image sequence - * @link https://php.net/manual/en/imagick.displayimages.php - * @param string $servername <p> - * The X server name - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function displayImages ($servername) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Randomly displaces each pixel in a block - * @link https://php.net/manual/en/imagick.spreadimage.php - * @param float $radius - * @return bool <b>TRUE</b> on success. - */ - public function spreadImage ($radius) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Swirls the pixels about the center of the image - * @link https://php.net/manual/en/imagick.swirlimage.php - * @param float $degrees - * @return bool <b>TRUE</b> on success. - */ - public function swirlImage ($degrees) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Strips an image of all profiles and comments - * @link https://php.net/manual/en/imagick.stripimage.php - * @return bool <b>TRUE</b> on success. - */ - public function stripImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns formats supported by Imagick - * @link https://php.net/manual/en/imagick.queryformats.php - * @param string $pattern [optional] - * @return array an array containing the formats supported by Imagick. - */ - public static function queryFormats ($pattern = "*") {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the configured fonts - * @link https://php.net/manual/en/imagick.queryfonts.php - * @param string $pattern [optional] <p> - * The query pattern - * </p> - * @return array an array containing the configured fonts. - */ - public static function queryFonts ($pattern = "*") {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns an array representing the font metrics - * @link https://php.net/manual/en/imagick.queryfontmetrics.php - * @param ImagickDraw $properties <p> - * ImagickDraw object containing font properties - * </p> - * @param string $text <p> - * The text - * </p> - * @param bool $multiline [optional] <p> - * Multiline parameter. If left empty it is autodetected - * </p> - * @return array a multi-dimensional array representing the font metrics. - */ - public function queryFontMetrics (ImagickDraw $properties, $text, $multiline = null) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Hides a digital watermark within the image - * @link https://php.net/manual/en/imagick.steganoimage.php - * @param Imagick $watermark_wand - * @param int $offset - * @return Imagick <b>TRUE</b> on success. - */ - public function steganoImage (Imagick $watermark_wand, $offset) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adds random noise to the image - * @link https://php.net/manual/en/imagick.addnoiseimage.php - * @param int $noise_type <p> - * The type of the noise. Refer to this list of - * noise constants. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function addNoiseImage ($noise_type, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Simulates motion blur - * @link https://php.net/manual/en/imagick.motionblurimage.php - * @param float $radius <p> - * The radius of the Gaussian, in pixels, not counting the center pixel. - * </p> - * @param float $sigma <p> - * The standard deviation of the Gaussian, in pixels. - * </p> - * @param float $angle <p> - * Apply the effect along this angle. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * The channel argument affects only if Imagick is compiled against ImageMagick version - * 6.4.4 or greater. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function motionBlurImage ($radius, $sigma, $angle, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Forms a mosaic from images - * @link https://php.net/manual/en/imagick.mosaicimages.php - * @return Imagick <b>TRUE</b> on success. - */ - public function mosaicImages () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Method morphs a set of images - * @link https://php.net/manual/en/imagick.morphimages.php - * @param int $number_frames <p> - * The number of in-between images to generate. - * </p> - * @return Imagick This method returns a new Imagick object on success. - * Throw an <b>ImagickException</b> on error. - * @throws ImagickException on error - */ - public function morphImages ($number_frames) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Scales an image proportionally to half its size - * @link https://php.net/manual/en/imagick.minifyimage.php - * @return bool <b>TRUE</b> on success. - */ - public function minifyImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Transforms an image - * @link https://php.net/manual/en/imagick.affinetransformimage.php - * @param ImagickDraw $matrix <p> - * The affine matrix - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function affineTransformImage (ImagickDraw $matrix) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Average a set of images - * @link https://php.net/manual/en/imagick.averageimages.php - * @return Imagick a new Imagick object on success. - */ - public function averageImages () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Surrounds the image with a border - * @link https://php.net/manual/en/imagick.borderimage.php - * @param mixed $bordercolor <p> - * ImagickPixel object or a string containing the border color - * </p> - * @param int $width <p> - * Border width - * </p> - * @param int $height <p> - * Border height - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function borderImage ($bordercolor, $width, $height) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Removes a region of an image and trims - * @link https://php.net/manual/en/imagick.chopimage.php - * @param int $width <p> - * Width of the chopped area - * </p> - * @param int $height <p> - * Height of the chopped area - * </p> - * @param int $x <p> - * X origo of the chopped area - * </p> - * @param int $y <p> - * Y origo of the chopped area - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function chopImage ($width, $height, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Clips along the first path from the 8BIM profile - * @link https://php.net/manual/en/imagick.clipimage.php - * @return bool <b>TRUE</b> on success. - */ - public function clipImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Clips along the named paths from the 8BIM profile - * @link https://php.net/manual/en/imagick.clippathimage.php - * @param string $pathname <p> - * The name of the path - * </p> - * @param bool $inside <p> - * If <b>TRUE</b> later operations take effect inside clipping path. - * Otherwise later operations take effect outside clipping path. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function clipPathImage ($pathname, $inside) {} - - /** - * @param $pathname - * @param $inside - */ - public function clipImagePath ($pathname, $inside) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Composites a set of images - * @link https://php.net/manual/en/imagick.coalesceimages.php - * @return Imagick a new Imagick object on success. - */ - public function coalesceImages () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Changes the color value of any pixel that matches target - * @link https://php.net/manual/en/imagick.colorfloodfillimage.php - * @param mixed $fill <p> - * ImagickPixel object containing the fill color - * </p> - * @param float $fuzz <p> - * The amount of fuzz. For example, set fuzz to 10 and the color red at - * intensities of 100 and 102 respectively are now interpreted as the - * same color for the purposes of the floodfill. - * </p> - * @param mixed $bordercolor <p> - * ImagickPixel object containing the border color - * </p> - * @param int $x <p> - * X start position of the floodfill - * </p> - * @param int $y <p> - * Y start position of the floodfill - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function colorFloodfillImage ($fill, $fuzz, $bordercolor, $x, $y) {} - - /** - * Blends the fill color with each pixel in the image. The 'opacity' color is a per channel strength factor for how strongly the color should be applied.<br> - * If legacy is true, the behaviour of this function is incorrect, but consistent with how it behaved before Imagick version 3.4.0 - * @link https://php.net/manual/en/imagick.colorizeimage.php - * @param mixed $colorize <p> - * ImagickPixel object or a string containing the colorize color - * </p> - * @param mixed $opacity <p> - * ImagickPixel object or an float containing the opacity value. - * 1.0 is fully opaque and 0.0 is fully transparent. - * </p> - * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE - * @return bool <b>TRUE</b> on success. - * @throws ImagickException Throws ImagickException on error - * @since 2.0.0 - */ - public function colorizeImage ($colorize, $opacity, $legacy = false) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the difference in one or more images - * @link https://php.net/manual/en/imagick.compareimagechannels.php - * @param Imagick $image <p> - * Imagick object containing the image to compare. - * </p> - * @param int $channelType <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @param int $metricType <p> - * One of the metric type constants. - * </p> - * @return array Array consisting of new_wand and - * distortion. - */ - public function compareImageChannels (Imagick $image, $channelType, $metricType) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Compares an image to a reconstructed image - * @link https://php.net/manual/en/imagick.compareimages.php - * @param Imagick $compare <p> - * An image to compare to. - * </p> - * @param int $metric <p> - * Provide a valid metric type constant. Refer to this - * list of metric constants. - * </p> - * @return array Array consisting of an Imagick object of the - * reconstructed image and a double representing the difference. - * @throws ImagickException Throws ImagickException on error. - */ - public function compareImages (Imagick $compare, $metric) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Change the contrast of the image - * @link https://php.net/manual/en/imagick.contrastimage.php - * @param bool $sharpen <p> - * The sharpen value - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function contrastImage ($sharpen) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Combines one or more images into a single image - * @link https://php.net/manual/en/imagick.combineimages.php - * @param int $channelType <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return Imagick <b>TRUE</b> on success. - */ - public function combineImages ($channelType) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Applies a custom convolution kernel to the image - * @link https://php.net/manual/en/imagick.convolveimage.php - * @param array $kernel <p> - * The convolution kernel - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function convolveImage (array $kernel, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Displaces an image's colormap - * @link https://php.net/manual/en/imagick.cyclecolormapimage.php - * @param int $displace <p> - * The amount to displace the colormap. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function cycleColormapImage ($displace) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns certain pixel differences between images - * @link https://php.net/manual/en/imagick.deconstructimages.php - * @return Imagick a new Imagick object on success. - */ - public function deconstructImages () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Reduces the speckle noise in an image - * @link https://php.net/manual/en/imagick.despeckleimage.php - * @return bool <b>TRUE</b> on success. - */ - public function despeckleImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Enhance edges within the image - * @link https://php.net/manual/en/imagick.edgeimage.php - * @param float $radius <p> - * The radius of the operation. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function edgeImage ($radius) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns a grayscale image with a three-dimensional effect - * @link https://php.net/manual/en/imagick.embossimage.php - * @param float $radius <p> - * The radius of the effect - * </p> - * @param float $sigma <p> - * The sigma of the effect - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function embossImage ($radius, $sigma) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Improves the quality of a noisy image - * @link https://php.net/manual/en/imagick.enhanceimage.php - * @return bool <b>TRUE</b> on success. - */ - public function enhanceImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Equalizes the image histogram - * @link https://php.net/manual/en/imagick.equalizeimage.php - * @return bool <b>TRUE</b> on success. - */ - public function equalizeImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Applies an expression to an image - * @link https://php.net/manual/en/imagick.evaluateimage.php - * @param int $op <p> - * The evaluation operator - * </p> - * @param float $constant <p> - * The value of the operator - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function evaluateImage ($op, $constant, $channel = Imagick::CHANNEL_ALL) {} - - /** - * Merges a sequence of images. This is useful for combining Photoshop layers into a single image. - * This is replaced by: - * <pre> - * $im = $im->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN) - * </pre> - * @link https://php.net/manual/en/imagick.flattenimages.php - * @return Imagick Returns an Imagick object containing the merged image. - * @throws ImagickException Throws ImagickException on error. - * @since 2.0.0 - */ - public function flattenImages () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Creates a vertical mirror image - * @link https://php.net/manual/en/imagick.flipimage.php - * @return bool <b>TRUE</b> on success. - */ - public function flipImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Creates a horizontal mirror image - * @link https://php.net/manual/en/imagick.flopimage.php - * @return bool <b>TRUE</b> on success. - */ - public function flopImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adds a simulated three-dimensional border - * @link https://php.net/manual/en/imagick.frameimage.php - * @param mixed $matte_color <p> - * ImagickPixel object or a string representing the matte color - * </p> - * @param int $width <p> - * The width of the border - * </p> - * @param int $height <p> - * The height of the border - * </p> - * @param int $inner_bevel <p> - * The inner bevel width - * </p> - * @param int $outer_bevel <p> - * The outer bevel width - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function frameImage ($matte_color, $width, $height, $inner_bevel, $outer_bevel) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Evaluate expression for each pixel in the image - * @link https://php.net/manual/en/imagick.fximage.php - * @param string $expression <p> - * The expression. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return Imagick <b>TRUE</b> on success. - */ - public function fxImage ($expression, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gamma-corrects an image - * @link https://php.net/manual/en/imagick.gammaimage.php - * @param float $gamma <p> - * The amount of gamma-correction. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function gammaImage ($gamma, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Blurs an image - * @link https://php.net/manual/en/imagick.gaussianblurimage.php - * @param float $radius <p> - * The radius of the Gaussian, in pixels, not counting the center pixel. - * </p> - * @param float $sigma <p> - * The standard deviation of the Gaussian, in pixels. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function gaussianBlurImage ($radius, $sigma, $channel = Imagick::CHANNEL_ALL) {} - - /** - * @param $key - */ - public function getImageAttribute ($key) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the image background color - * @link https://php.net/manual/en/imagick.getimagebackgroundcolor.php - * @return ImagickPixel an ImagickPixel set to the background color of the image. - */ - public function getImageBackgroundColor () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the chromaticy blue primary point - * @link https://php.net/manual/en/imagick.getimageblueprimary.php - * @return array Array consisting of "x" and "y" coordinates of point. - */ - public function getImageBluePrimary () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the image border color - * @link https://php.net/manual/en/imagick.getimagebordercolor.php - * @return ImagickPixel <b>TRUE</b> on success. - */ - public function getImageBorderColor () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the depth for a particular image channel - * @link https://php.net/manual/en/imagick.getimagechanneldepth.php - * @param int $channel <p> - * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to <b>Imagick::CHANNEL_DEFAULT</b>. Refer to this list of channel constants - * </p> - * @return int <b>TRUE</b> on success. - */ - public function getImageChannelDepth ($channel) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Compares image channels of an image to a reconstructed image - * @link https://php.net/manual/en/imagick.getimagechanneldistortion.php - * @param Imagick $reference <p> - * Imagick object to compare to. - * </p> - * @param int $channel <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @param int $metric <p> - * One of the metric type constants. - * </p> - * @return float <b>TRUE</b> on success. - */ - public function getImageChannelDistortion (Imagick $reference, $channel, $metric) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the extrema for one or more image channels - * @link https://php.net/manual/en/imagick.getimagechannelextrema.php - * @param int $channel <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return array <b>TRUE</b> on success. - */ - public function getImageChannelExtrema ($channel) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the mean and standard deviation - * @link https://php.net/manual/en/imagick.getimagechannelmean.php - * @param int $channel <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return array <b>TRUE</b> on success. - */ - public function getImageChannelMean ($channel) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns statistics for each channel in the image - * @link https://php.net/manual/en/imagick.getimagechannelstatistics.php - * @return array <b>TRUE</b> on success. - */ - public function getImageChannelStatistics () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the color of the specified colormap index - * @link https://php.net/manual/en/imagick.getimagecolormapcolor.php - * @param int $index <p> - * The offset into the image colormap. - * </p> - * @return ImagickPixel <b>TRUE</b> on success. - */ - public function getImageColormapColor ($index) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image colorspace - * @link https://php.net/manual/en/imagick.getimagecolorspace.php - * @return int <b>TRUE</b> on success. - */ - public function getImageColorspace () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the composite operator associated with the image - * @link https://php.net/manual/en/imagick.getimagecompose.php - * @return int <b>TRUE</b> on success. - */ - public function getImageCompose () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image delay - * @link https://php.net/manual/en/imagick.getimagedelay.php - * @return int the image delay. - */ - public function getImageDelay () {} - - /** - * (PECL imagick 0.9.1-0.9.9)<br/> - * Gets the image depth - * @link https://php.net/manual/en/imagick.getimagedepth.php - * @return int The image depth. - */ - public function getImageDepth () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Compares an image to a reconstructed image - * @link https://php.net/manual/en/imagick.getimagedistortion.php - * @param Imagick $reference <p> - * Imagick object to compare to. - * </p> - * @param int $metric <p> - * One of the metric type constants. - * </p> - * @return float the distortion metric used on the image (or the best guess - * thereof). - */ - public function getImageDistortion (Imagick $reference, $metric) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the extrema for the image - * @link https://php.net/manual/en/imagick.getimageextrema.php - * @return array an associative array with the keys "min" and "max". - */ - public function getImageExtrema () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image disposal method - * @link https://php.net/manual/en/imagick.getimagedispose.php - * @return int the dispose method on success. - */ - public function getImageDispose () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image gamma - * @link https://php.net/manual/en/imagick.getimagegamma.php - * @return float the image gamma on success. - */ - public function getImageGamma () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the chromaticy green primary point - * @link https://php.net/manual/en/imagick.getimagegreenprimary.php - * @return array an array with the keys "x" and "y" on success, throws an ImagickException on failure. - * @throws ImagickException on failure - */ - public function getImageGreenPrimary () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the image height - * @link https://php.net/manual/en/imagick.getimageheight.php - * @return int the image height in pixels. - */ - public function getImageHeight () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image histogram - * @link https://php.net/manual/en/imagick.getimagehistogram.php - * @return array the image histogram as an array of ImagickPixel objects. - */ - public function getImageHistogram () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image interlace scheme - * @link https://php.net/manual/en/imagick.getimageinterlacescheme.php - * @return int the interlace scheme as an integer on success. - * Trhow an <b>ImagickException</b> on error. - * @throws ImagickException on error - */ - public function getImageInterlaceScheme () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image iterations - * @link https://php.net/manual/en/imagick.getimageiterations.php - * @return int the image iterations as an integer. - */ - public function getImageIterations () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the image matte color - * @link https://php.net/manual/en/imagick.getimagemattecolor.php - * @return ImagickPixel ImagickPixel object on success. - */ - public function getImageMatteColor () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the page geometry - * @link https://php.net/manual/en/imagick.getimagepage.php - * @return array the page geometry associated with the image in an array with the - * keys "width", "height", "x", and "y". - */ - public function getImagePage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the color of the specified pixel - * @link https://php.net/manual/en/imagick.getimagepixelcolor.php - * @param int $x <p> - * The x-coordinate of the pixel - * </p> - * @param int $y <p> - * The y-coordinate of the pixel - * </p> - * @return ImagickPixel an ImagickPixel instance for the color at the coordinates given. - */ - public function getImagePixelColor ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the named image profile - * @link https://php.net/manual/en/imagick.getimageprofile.php - * @param string $name <p> - * The name of the profile to return. - * </p> - * @return string a string containing the image profile. - */ - public function getImageProfile ($name) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the chromaticity red primary point - * @link https://php.net/manual/en/imagick.getimageredprimary.php - * @return array the chromaticity red primary point as an array with the keys "x" - * and "y". - * Throw an <b>ImagickException</b> on error. - * @throws ImagickException on error - */ - public function getImageRedPrimary () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image rendering intent - * @link https://php.net/manual/en/imagick.getimagerenderingintent.php - * @return int the image rendering intent. - */ - public function getImageRenderingIntent () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image X and Y resolution - * @link https://php.net/manual/en/imagick.getimageresolution.php - * @return array the resolution as an array. - */ - public function getImageResolution () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image scene - * @link https://php.net/manual/en/imagick.getimagescene.php - * @return int the image scene. - */ - public function getImageScene () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Generates an SHA-256 message digest - * @link https://php.net/manual/en/imagick.getimagesignature.php - * @return string a string containing the SHA-256 hash of the file. - */ - public function getImageSignature () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image ticks-per-second - * @link https://php.net/manual/en/imagick.getimagetickspersecond.php - * @return int the image ticks-per-second. - */ - public function getImageTicksPerSecond () {} - - /** - * (PECL imagick 0.9.10-0.9.9)<br/> - * Gets the potential image type - * @link https://php.net/manual/en/imagick.getimagetype.php - * @return int the potential image type. - * <b>imagick::IMGTYPE_UNDEFINED</b> - * <b>imagick::IMGTYPE_BILEVEL</b> - * <b>imagick::IMGTYPE_GRAYSCALE</b> - * <b>imagick::IMGTYPE_GRAYSCALEMATTE</b> - * <b>imagick::IMGTYPE_PALETTE</b> - * <b>imagick::IMGTYPE_PALETTEMATTE</b> - * <b>imagick::IMGTYPE_TRUECOLOR</b> - * <b>imagick::IMGTYPE_TRUECOLORMATTE</b> - * <b>imagick::IMGTYPE_COLORSEPARATION</b> - * <b>imagick::IMGTYPE_COLORSEPARATIONMATTE</b> - * <b>imagick::IMGTYPE_OPTIMIZE</b> - */ - public function getImageType () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image units of resolution - * @link https://php.net/manual/en/imagick.getimageunits.php - * @return int the image units of resolution. - */ - public function getImageUnits () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the virtual pixel method - * @link https://php.net/manual/en/imagick.getimagevirtualpixelmethod.php - * @return int the virtual pixel method on success. - */ - public function getImageVirtualPixelMethod () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the chromaticity white point - * @link https://php.net/manual/en/imagick.getimagewhitepoint.php - * @return array the chromaticity white point as an associative array with the keys - * "x" and "y". - */ - public function getImageWhitePoint () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the image width - * @link https://php.net/manual/en/imagick.getimagewidth.php - * @return int the image width. - */ - public function getImageWidth () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the number of images in the object - * @link https://php.net/manual/en/imagick.getnumberimages.php - * @return int the number of images associated with Imagick object. - */ - public function getNumberImages () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the image total ink density - * @link https://php.net/manual/en/imagick.getimagetotalinkdensity.php - * @return float the image total ink density of the image. - * Throw an <b>ImagickException</b> on error. - * @throws ImagickException on error - */ - public function getImageTotalInkDensity () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Extracts a region of the image - * @link https://php.net/manual/en/imagick.getimageregion.php - * @param int $width <p> - * The width of the extracted region. - * </p> - * @param int $height <p> - * The height of the extracted region. - * </p> - * @param int $x <p> - * X-coordinate of the top-left corner of the extracted region. - * </p> - * @param int $y <p> - * Y-coordinate of the top-left corner of the extracted region. - * </p> - * @return Imagick Extracts a region of the image and returns it as a new wand. - */ - public function getImageRegion ($width, $height, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Creates a new image as a copy - * @link https://php.net/manual/en/imagick.implodeimage.php - * @param float $radius <p> - * The radius of the implode - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function implodeImage ($radius) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adjusts the levels of an image - * @link https://php.net/manual/en/imagick.levelimage.php - * @param float $blackPoint <p> - * The image black point - * </p> - * @param float $gamma <p> - * The gamma value - * </p> - * @param float $whitePoint <p> - * The image white point - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function levelImage ($blackPoint, $gamma, $whitePoint, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Scales an image proportionally 2x - * @link https://php.net/manual/en/imagick.magnifyimage.php - * @return bool <b>TRUE</b> on success. - */ - public function magnifyImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Replaces the colors of an image with the closest color from a reference image. - * @link https://php.net/manual/en/imagick.mapimage.php - * @param Imagick $map - * @param bool $dither - * @return bool <b>TRUE</b> on success. - */ - public function mapImage (Imagick $map, $dither) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Changes the transparency value of a color - * @link https://php.net/manual/en/imagick.mattefloodfillimage.php - * @param float $alpha <p> - * The level of transparency: 1.0 is fully opaque and 0.0 is fully - * transparent. - * </p> - * @param float $fuzz <p> - * The fuzz member of image defines how much tolerance is acceptable to - * consider two colors as the same. - * </p> - * @param mixed $bordercolor <p> - * An <b>ImagickPixel</b> object or string representing the border color. - * </p> - * @param int $x <p> - * The starting x coordinate of the operation. - * </p> - * @param int $y <p> - * The starting y coordinate of the operation. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function matteFloodfillImage ($alpha, $fuzz, $bordercolor, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Applies a digital filter - * @link https://php.net/manual/en/imagick.medianfilterimage.php - * @param float $radius <p> - * The radius of the pixel neighborhood. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function medianFilterImage ($radius) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Negates the colors in the reference image - * @link https://php.net/manual/en/imagick.negateimage.php - * @param bool $gray <p> - * Whether to only negate grayscale pixels within the image. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function negateImage ($gray, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Change any pixel that matches color - * @link https://php.net/manual/en/imagick.paintopaqueimage.php - * @param mixed $target <p> - * Change this target color to the fill color within the image. An - * ImagickPixel object or a string representing the target color. - * </p> - * @param mixed $fill <p> - * An ImagickPixel object or a string representing the fill color. - * </p> - * @param float $fuzz <p> - * The fuzz member of image defines how much tolerance is acceptable to - * consider two colors as the same. - * </p> - * @param int $channel [optional] <p> - * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function paintOpaqueImage ($target, $fill, $fuzz, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Changes any pixel that matches color with the color defined by fill - * @link https://php.net/manual/en/imagick.painttransparentimage.php - * @param mixed $target <p> - * Change this target color to specified opacity value within the image. - * </p> - * @param float $alpha <p> - * The level of transparency: 1.0 is fully opaque and 0.0 is fully - * transparent. - * </p> - * @param float $fuzz <p> - * The fuzz member of image defines how much tolerance is acceptable to - * consider two colors as the same. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function paintTransparentImage ($target, $alpha, $fuzz) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Quickly pin-point appropriate parameters for image processing - * @link https://php.net/manual/en/imagick.previewimages.php - * @param int $preview <p> - * Preview type. See Preview type constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function previewImages ($preview) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adds or removes a profile from an image - * @link https://php.net/manual/en/imagick.profileimage.php - * @param string $name - * @param string $profile - * @return bool <b>TRUE</b> on success. - */ - public function profileImage ($name, $profile) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Analyzes the colors within a reference image - * @link https://php.net/manual/en/imagick.quantizeimage.php - * @param int $numberColors - * @param int $colorspace - * @param int $treedepth - * @param bool $dither - * @param bool $measureError - * @return bool <b>TRUE</b> on success. - */ - public function quantizeImage ($numberColors, $colorspace, $treedepth, $dither, $measureError) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Analyzes the colors within a sequence of images - * @link https://php.net/manual/en/imagick.quantizeimages.php - * @param int $numberColors - * @param int $colorspace - * @param int $treedepth - * @param bool $dither - * @param bool $measureError - * @return bool <b>TRUE</b> on success. - */ - public function quantizeImages ($numberColors, $colorspace, $treedepth, $dither, $measureError) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Smooths the contours of an image - * @link https://php.net/manual/en/imagick.reducenoiseimage.php - * @param float $radius - * @return bool <b>TRUE</b> on success. - */ - public function reduceNoiseImage ($radius) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Removes the named image profile and returns it - * @link https://php.net/manual/en/imagick.removeimageprofile.php - * @param string $name - * @return string a string containing the profile of the image. - */ - public function removeImageProfile ($name) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Separates a channel from the image - * @link https://php.net/manual/en/imagick.separateimagechannel.php - * @param int $channel - * @return bool <b>TRUE</b> on success. - */ - public function separateImageChannel ($channel) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sepia tones an image - * @link https://php.net/manual/en/imagick.sepiatoneimage.php - * @param float $threshold - * @return bool <b>TRUE</b> on success. - */ - public function sepiaToneImage ($threshold) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image bias for any method that convolves an image - * @link https://php.net/manual/en/imagick.setimagebias.php - * @param float $bias - * @return bool <b>TRUE</b> on success. - */ - public function setImageBias ($bias) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image chromaticity blue primary point - * @link https://php.net/manual/en/imagick.setimageblueprimary.php - * @param float $x - * @param float $y - * @return bool <b>TRUE</b> on success. - */ - public function setImageBluePrimary ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image border color - * @link https://php.net/manual/en/imagick.setimagebordercolor.php - * @param mixed $border <p> - * The border color - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageBorderColor ($border) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the depth of a particular image channel - * @link https://php.net/manual/en/imagick.setimagechanneldepth.php - * @param int $channel - * @param int $depth - * @return bool <b>TRUE</b> on success. - */ - public function setImageChannelDepth ($channel, $depth) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the color of the specified colormap index - * @link https://php.net/manual/en/imagick.setimagecolormapcolor.php - * @param int $index - * @param ImagickPixel $color - * @return bool <b>TRUE</b> on success. - */ - public function setImageColormapColor ($index, ImagickPixel $color) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image colorspace - * @link https://php.net/manual/en/imagick.setimagecolorspace.php - * @param int $colorspace <p> - * One of the COLORSPACE constants - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImageColorspace ($colorspace) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image disposal method - * @link https://php.net/manual/en/imagick.setimagedispose.php - * @param int $dispose - * @return bool <b>TRUE</b> on success. - */ - public function setImageDispose ($dispose) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image size - * @link https://php.net/manual/en/imagick.setimageextent.php - * @param int $columns - * @param int $rows - * @return bool <b>TRUE</b> on success. - */ - public function setImageExtent ($columns, $rows) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image chromaticity green primary point - * @link https://php.net/manual/en/imagick.setimagegreenprimary.php - * @param float $x - * @param float $y - * @return bool <b>TRUE</b> on success. - */ - public function setImageGreenPrimary ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image compression - * @link https://php.net/manual/en/imagick.setimageinterlacescheme.php - * @param int $interlace_scheme - * @return bool <b>TRUE</b> on success. - */ - public function setImageInterlaceScheme ($interlace_scheme) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adds a named profile to the Imagick object - * @link https://php.net/manual/en/imagick.setimageprofile.php - * @param string $name - * @param string $profile - * @return bool <b>TRUE</b> on success. - */ - public function setImageProfile ($name, $profile) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image chromaticity red primary point - * @link https://php.net/manual/en/imagick.setimageredprimary.php - * @param float $x - * @param float $y - * @return bool <b>TRUE</b> on success. - */ - public function setImageRedPrimary ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image rendering intent - * @link https://php.net/manual/en/imagick.setimagerenderingintent.php - * @param int $rendering_intent - * @return bool <b>TRUE</b> on success. - */ - public function setImageRenderingIntent ($rendering_intent) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image virtual pixel method - * @link https://php.net/manual/en/imagick.setimagevirtualpixelmethod.php - * @param int $method - * @return bool <b>TRUE</b> on success. - */ - public function setImageVirtualPixelMethod ($method) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image chromaticity white point - * @link https://php.net/manual/en/imagick.setimagewhitepoint.php - * @param float $x - * @param float $y - * @return bool <b>TRUE</b> on success. - */ - public function setImageWhitePoint ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adjusts the contrast of an image - * @link https://php.net/manual/en/imagick.sigmoidalcontrastimage.php - * @param bool $sharpen - * @param float $alpha - * @param float $beta - * @param int $channel [optional] - * @return bool <b>TRUE</b> on success. - */ - public function sigmoidalContrastImage ($sharpen, $alpha, $beta, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Composites two images - * @link https://php.net/manual/en/imagick.stereoimage.php - * @param Imagick $offset_wand - * @return bool <b>TRUE</b> on success. - */ - public function stereoImage (Imagick $offset_wand) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Repeatedly tiles the texture image - * @link https://php.net/manual/en/imagick.textureimage.php - * @param Imagick $texture_wand - * @return bool <b>TRUE</b> on success. - */ - public function textureImage (Imagick $texture_wand) {} - - /** - * pplies a color vector to each pixel in the image. The 'opacity' color is a per channel strength factor for how strongly the color should be applied. - * If legacy is true, the behaviour of this function is incorrect, but consistent with how it behaved before Imagick version 3.4.0 - * @link https://php.net/manual/en/imagick.tintimage.php - * @param mixed $tint - * @param mixed $opacity - * @param bool $legacy [optional] - * @return bool <b>TRUE</b> on success. - * @throws ImagickException Throws ImagickException on error - * @since 2.0.0 - */ - public function tintImage ($tint, $opacity, $legacy = false) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sharpens an image - * @link https://php.net/manual/en/imagick.unsharpmaskimage.php - * @param float $radius - * @param float $sigma - * @param float $amount - * @param float $threshold - * @param int $channel [optional] - * @return bool <b>TRUE</b> on success. - */ - public function unsharpMaskImage ($radius, $sigma, $amount, $threshold, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns a new Imagick object - * @link https://php.net/manual/en/imagick.getimage.php - * @return Imagick a new Imagick object with the current image sequence. - */ - public function getImage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adds new image to Imagick object image list - * @link https://php.net/manual/en/imagick.addimage.php - * @param Imagick $source <p> - * The source Imagick object - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function addImage (Imagick $source) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Replaces image in the object - * @link https://php.net/manual/en/imagick.setimage.php - * @param Imagick $replace <p> - * The replace Imagick object - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setImage (Imagick $replace) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Creates a new image - * @link https://php.net/manual/en/imagick.newimage.php - * @param int $cols <p> - * Columns in the new image - * </p> - * @param int $rows <p> - * Rows in the new image - * </p> - * @param mixed $background <p> - * The background color used for this image - * </p> - * @param string $format [optional] <p> - * Image format. This parameter was added in Imagick version 2.0.1. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function newImage ($cols, $rows, $background, $format = null) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Creates a new image - * @link https://php.net/manual/en/imagick.newpseudoimage.php - * @param int $columns <p> - * columns in the new image - * </p> - * @param int $rows <p> - * rows in the new image - * </p> - * @param string $pseudoString <p> - * string containing pseudo image definition. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function newPseudoImage ($columns, $rows, $pseudoString) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the object compression type - * @link https://php.net/manual/en/imagick.getcompression.php - * @return int the compression constant - */ - public function getCompression () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the object compression quality - * @link https://php.net/manual/en/imagick.getcompressionquality.php - * @return int integer describing the compression quality - */ - public function getCompressionQuality () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the ImageMagick API copyright as a string - * @link https://php.net/manual/en/imagick.getcopyright.php - * @return string a string containing the copyright notice of Imagemagick and - * Magickwand C API. - */ - public static function getCopyright () {} - - /** - * (PECL imagick 2.0.0)<br/> - * The filename associated with an image sequence - * @link https://php.net/manual/en/imagick.getfilename.php - * @return string a string on success. - */ - public function getFilename () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the format of the Imagick object - * @link https://php.net/manual/en/imagick.getformat.php - * @return string the format of the image. - */ - public function getFormat () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the ImageMagick home URL - * @link https://php.net/manual/en/imagick.gethomeurl.php - * @return string a link to the imagemagick homepage. - */ - public static function getHomeURL () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the object interlace scheme - * @link https://php.net/manual/en/imagick.getinterlacescheme.php - * @return int Gets the wand interlace - * scheme. - */ - public function getInterlaceScheme () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns a value associated with the specified key - * @link https://php.net/manual/en/imagick.getoption.php - * @param string $key <p> - * The name of the option - * </p> - * @return string a value associated with a wand and the specified key. - */ - public function getOption ($key) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the ImageMagick package name - * @link https://php.net/manual/en/imagick.getpackagename.php - * @return string the ImageMagick package name as a string. - */ - public static function getPackageName () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the page geometry - * @link https://php.net/manual/en/imagick.getpage.php - * @return array the page geometry associated with the Imagick object in - * an associative array with the keys "width", "height", "x", and "y", - * throwing ImagickException on error. - * @throws ImagickException on error - */ - public function getPage () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the quantum depth - * @link https://php.net/manual/en/imagick.getquantumdepth.php - * @return array the Imagick quantum depth as a string. - */ - public static function getQuantumDepth () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the Imagick quantum range - * @link https://php.net/manual/en/imagick.getquantumrange.php - * @return array the Imagick quantum range as a string. - */ - public static function getQuantumRange () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the ImageMagick release date - * @link https://php.net/manual/en/imagick.getreleasedate.php - * @return string the ImageMagick release date as a string. - */ - public static function getReleaseDate () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the specified resource's memory usage - * @link https://php.net/manual/en/imagick.getresource.php - * @param int $type <p> - * Refer to the list of resourcetype constants. - * </p> - * @return int the specified resource's memory usage in megabytes. - */ - public static function getResource ($type) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the specified resource limit - * @link https://php.net/manual/en/imagick.getresourcelimit.php - * @param int $type <p> - * Refer to the list of resourcetype constants. - * </p> - * @return int the specified resource limit in megabytes. - */ - public static function getResourceLimit ($type) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the horizontal and vertical sampling factor - * @link https://php.net/manual/en/imagick.getsamplingfactors.php - * @return array an associative array with the horizontal and vertical sampling - * factors of the image. - */ - public function getSamplingFactors () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the size associated with the Imagick object - * @link https://php.net/manual/en/imagick.getsize.php - * @return array the size associated with the Imagick object as an array with the - * keys "columns" and "rows". - */ - public function getSize () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the ImageMagick API version - * @link https://php.net/manual/en/imagick.getversion.php - * @return array the ImageMagick API version as a string and as a number. - */ - public static function getVersion () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the object's default background color - * @link https://php.net/manual/en/imagick.setbackgroundcolor.php - * @param mixed $background - * @return bool <b>TRUE</b> on success. - */ - public function setBackgroundColor ($background) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the object's default compression type - * @link https://php.net/manual/en/imagick.setcompression.php - * @param int $compression - * @return bool <b>TRUE</b> on success. - */ - public function setCompression ($compression) {} - - /** - * (PECL imagick 0.9.10-0.9.9)<br/> - * Sets the object's default compression quality - * @link https://php.net/manual/en/imagick.setcompressionquality.php - * @param int $quality - * @return bool <b>TRUE</b> on success. - */ - public function setCompressionQuality ($quality) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the filename before you read or write the image - * @link https://php.net/manual/en/imagick.setfilename.php - * @param string $filename - * @return bool <b>TRUE</b> on success. - */ - public function setFilename ($filename) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the format of the Imagick object - * @link https://php.net/manual/en/imagick.setformat.php - * @param string $format - * @return bool <b>TRUE</b> on success. - */ - public function setFormat ($format) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image compression - * @link https://php.net/manual/en/imagick.setinterlacescheme.php - * @param int $interlace_scheme - * @return bool <b>TRUE</b> on success. - */ - public function setInterlaceScheme ($interlace_scheme) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Set an option - * @link https://php.net/manual/en/imagick.setoption.php - * @param string $key - * @param string $value - * @return bool <b>TRUE</b> on success. - */ - public function setOption ($key, $value) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the page geometry of the Imagick object - * @link https://php.net/manual/en/imagick.setpage.php - * @param int $width - * @param int $height - * @param int $x - * @param int $y - * @return bool <b>TRUE</b> on success. - */ - public function setPage ($width, $height, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the limit for a particular resource in megabytes - * @link https://php.net/manual/en/imagick.setresourcelimit.php - * @param int $type <p> - * Refer to the list of resourcetype constants. - * </p> - * @param int $limit <p> - * The resource limit. The unit depends on the type of the resource being limited. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public static function setResourceLimit ($type, $limit) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image resolution - * @link https://php.net/manual/en/imagick.setresolution.php - * @param float $x_resolution <p> - * The horizontal resolution. - * </p> - * @param float $y_resolution <p> - * The vertical resolution. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setResolution ($x_resolution, $y_resolution) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image sampling factors - * @link https://php.net/manual/en/imagick.setsamplingfactors.php - * @param array $factors - * @return bool <b>TRUE</b> on success. - */ - public function setSamplingFactors (array $factors) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the size of the Imagick object - * @link https://php.net/manual/en/imagick.setsize.php - * @param int $columns - * @param int $rows - * @return bool <b>TRUE</b> on success. - */ - public function setSize ($columns, $rows) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the image type attribute - * @link https://php.net/manual/en/imagick.settype.php - * @param int $image_type - * @return bool <b>TRUE</b> on success. - */ - public function setType ($image_type) {} - - public function key () {} - - public function next () {} - - public function rewind () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Checks if the current item is valid - * @link https://php.net/manual/en/imagick.valid.php - * @return bool <b>TRUE</b> on success. - */ - public function valid () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns a reference to the current Imagick object - * @link https://php.net/manual/en/imagick.current.php - * @return Imagick self on success. - */ - public function current () {} - - /** - * Change the brightness and/or contrast of an image. It converts the brightness and contrast parameters into slope and intercept and calls a polynomical function to apply to the image. - * @link https://php.net/manual/en/imagick.brightnesscontrastimage.php - * @param string $brightness - * @param string $contrast - * @param int $CHANNEL [optional] - * @return void - * @since 3.3.0 - */ - public function brightnessContrastImage ($brightness, $contrast, $CHANNEL = Imagick::CHANNEL_DEFAULT) { } - - /** - * Applies a user supplied kernel to the image according to the given morphology method. - * @link https://php.net/manual/en/imagick.morphology.php - * @param int $morphologyMethod Which morphology method to use one of the \Imagick::MORPHOLOGY_* constants. - * @param int $iterations The number of iteration to apply the morphology function. A value of -1 means loop until no change found. How this is applied may depend on the morphology method. Typically this is a value of 1. - * @param ImagickKernel $ImagickKernel - * @param int $CHANNEL [optional] - * @return void - * @since 3.3.0 - */ - public function morphology ($morphologyMethod, $iterations, ImagickKernel $ImagickKernel, $CHANNEL = Imagick::CHANNEL_DEFAULT) { } - - /** - * Applies a custom convolution kernel to the image. - * @link https://php.net/manual/en/imagick.filter.php - * @param ImagickKernel $ImagickKernel An instance of ImagickKernel that represents either a single kernel or a linked series of kernels. - * @param int $CHANNEL [optional] Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - * @return void - * @since 3.3.0 - */ - public function filter (ImagickKernel $ImagickKernel , $CHANNEL = Imagick::CHANNEL_DEFAULT) { } - - /** - * Apply color transformation to an image. The method permits saturation changes, hue rotation, luminance to alpha, and various other effects. Although variable-sized transformation matrices can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA (or RGBA with offsets). - * The matrix is similar to those used by Adobe Flash except offsets are in column 6 rather than 5 (in support of CMYKA images) and offsets are normalized (divide Flash offset by 255) - * @link https://php.net/manual/en/imagick.colormatriximage.php - * @param string $color_matrix - * @return void - * @since 3.3.0 - */ - public function colorMatrixImage ($color_matrix = Imagick::CHANNEL_DEFAULT) { } - - /** - * Deletes an image property. - * @link https://php.net/manual/en/imagick.deleteimageproperty.php - * @param string $name The name of the property to delete. - * @return void - * @since 3.3.0 - */ - public function deleteImageProperty ($name) { } - - /** - * Implements the discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair. - * @link https://php.net/manual/en/imagick.forwardfouriertransformimage.php - * @param bool $magnitude If true, return as magnitude / phase pair otherwise a real / imaginary image pair. - * @return void - * @since 3.3.0 - */ - public function forwardFourierTransformimage ($magnitude) { } - - /** - * Gets the current image's compression type. - * @link https://php.net/manual/en/imagick.getimagecompression.php - * @return int - * @since 3.3.0 - */ - public function getImageCompression () { } - - /** - * Get the StringRegistry entry for the named key or false if not set. - * @link https://php.net/manual/en/imagick.getregistry.php - * @param string $key - * @return string|false - * @throws Exception Since version >=3.4.3. Throws an exception if the key does not exist, rather than terminating the program. - * @since 3.3.0 - */ - public static function getRegistry ($key) { } - - /** - * Returns the ImageMagick quantum range as an integer. - * @link https://php.net/manual/en/imagick.getquantum.php - * @return int - * @since 3.3.0 - */ - public static function getQuantum () { } - - /** - * Replaces any embedded formatting characters with the appropriate image property and returns the interpreted text. See https://www.imagemagick.org/script/escape.php for escape sequences. - * @link https://php.net/manual/en/imagick.identifyformat.php - * @see https://www.imagemagick.org/script/escape.php - * @param string $embedText A string containing formatting sequences e.g. "Trim box: %@ number of unique colors: %k". - * @return bool - * @since 3.3.0 - */ - public function identifyFormat ($embedText) { } - - /** - * Implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair. - * @link https://php.net/manual/en/imagick.inversefouriertransformimage.php - * @param Imagick $complement The second image to combine with this one to form either the magnitude / phase or real / imaginary image pair. - * @param bool $magnitude If true, combine as magnitude / phase pair otherwise a real / imaginary image pair. - * @return void - * @since 3.3.0 - */ - public function inverseFourierTransformImage ($complement, $magnitude) { } - - /** - * List all the registry settings. Returns an array of all the key/value pairs in the registry - * @link https://php.net/manual/en/imagick.listregistry.php - * @return array An array containing the key/values from the registry. - * @since 3.3.0 - */ - public static function listRegistry () { } - - /** - * Rotational blurs an image. - * @link https://php.net/manual/en/imagick.rotationalblurimage.php - * @param string $angle - * @param string $CHANNEL - * @return void - * @since 3.3.0 - */ - public function rotationalBlurImage ($angle, $CHANNEL = Imagick::CHANNEL_DEFAULT) { } - - /** - * Selectively blur an image within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold. - * @link https://php.net/manual/en/imagick.selectiveblurimage.php - * @param float $radius - * @param float $sigma - * @param float $threshold - * @param int $CHANNEL Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - * @return void - * @since 3.3.0 - */ - public function selectiveBlurImage ($radius, $sigma, $threshold, $CHANNEL = Imagick::CHANNEL_DEFAULT) { } - - /** - * Set whether antialiasing should be used for operations. On by default. - * @param bool $antialias - * @return int - * @since 3.3.0 - */ - public function setAntiAlias ($antialias) { } - - /** - * @link https://php.net/manual/en/imagick.setimagebiasquantum.php - * @param string $bias - * @return void - * @since 3.3.0 - */ - public function setImageBiasQuantum ($bias) { } - - /** - * Set a callback that will be called during the processing of the Imagick image. - * @link https://php.net/manual/en/imagick.setprogressmonitor.php - * @param callable $callback The progress function to call. It should return true if image processing should continue, or false if it should be cancelled. - * The offset parameter indicates the progress and the span parameter indicates the total amount of work needed to be done. - * <pre> bool callback ( mixed $offset , mixed $span ) </pre> - * <b>Caution</b> - * The values passed to the callback function are not consistent. In particular the span parameter can increase during image processing. Because of this calculating the percentage complete of an image operation is not trivial. - * @return void - * @since 3.3.0 - */ - public function setProgressMonitor ($callback) { } - - /** - * Sets the ImageMagick registry entry named key to value. This is most useful for setting "temporary-path" which controls where ImageMagick creates temporary images e.g. while processing PDFs. - * @link https://php.net/manual/en/imagick.setregistry.php - * @param string $key - * @param string $value - * @return void - * @since 3.3.0 - */ - public static function setRegistry ($key, $value) { } - - /** - * Replace each pixel with corresponding statistic from the neighborhood of the specified width and height. - * @link https://php.net/manual/en/imagick.statisticimage.php - * @param int $type - * @param int $width - * @param int $height - * @param int $channel [optional] - * @return void - * @since 3.3.0 - */ - public function statisticImage ($type, $width, $height, $channel = Imagick::CHANNEL_DEFAULT ) { } - - /** - * Searches for a subimage in the current image and returns a similarity image such that an exact match location is - * completely white and if none of the pixels match, black, otherwise some gray level in-between. - * You can also pass in the optional parameters bestMatch and similarity. After calling the function similarity will - * be set to the 'score' of the similarity between the subimage and the matching position in the larger image, - * bestMatch will contain an associative array with elements x, y, width, height that describe the matching region. - * - * @link https://php.net/manual/en/imagick.subimagematch.php - * @param Imagick $imagick - * @param array $bestMatch [optional] - * @param float $similarity [optional] A new image that displays the amount of similarity at each pixel. - * @param float $similarity_threshold [optional] Only used if compiled with ImageMagick (library) > 7 - * @param int $metric [optional] Only used if compiled with ImageMagick (library) > 7 - * @return Imagick - * @since 3.3.0 - */ - public function subImageMatch (Imagick $imagick, array &$bestMatch, &$similarity, $similarity_threshold, $metric) { } - - /** - * Is an alias of Imagick::subImageMatch - * - * @param Imagick $imagick - * @param array $bestMatch [optional] - * @param float $similarity [optional] A new image that displays the amount of similarity at each pixel. - * @param float $similarity_threshold [optional] - * @param int $metric [optional] - * @return Imagick - * @see Imagick::subImageMatch() This function is an alias of subImageMatch() - * @since 3.4.0 - */ - public function similarityImage (Imagick $imagick, array &$bestMatch, &$similarity, $similarity_threshold, $metric) { } - - /** - * Returns any ImageMagick configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc. - * @return string - * @since 3.4.0 - */ - public function getConfigureOptions () { } - - /** - * GetFeatures() returns the ImageMagick features that have been compiled into the runtime. - * @return string - * @since 3.4.0 - */ - public function getFeatures () { } - - /** - * @return int - * @since 3.4.0 - */ - public function getHDRIEnabled () { } - - /** - * Sets the image channel mask. Returns the previous set channel mask. - * Only works with Imagick >=7 - * @param int $channel - * @since 3.4.0 - */ - public function setImageChannelMask ($channel) {} - - /** - * Merge multiple images of the same size together with the selected operator. https://www.imagemagick.org/Usage/layers/#evaluate-sequence - * @param int $EVALUATE_CONSTANT - * @return bool - * @see https://www.imagemagick.org/Usage/layers/#evaluate-sequence - * @since 3.4.0 - */ - public function evaluateImages ($EVALUATE_CONSTANT) { } - - /** - * Extracts the 'mean' from the image and adjust the image to try make set its gamma appropriately. - * @param int $channel [optional] Default value Imagick::CHANNEL_ALL - * @return bool - * @since 3.4.1 - */ - public function autoGammaImage ($channel = Imagick::CHANNEL_ALL) { } - - /** - * Adjusts an image so that its orientation is suitable $ for viewing (i.e. top-left orientation). - * @return bool - * @since 3.4.1 - */ - public function autoOrient () { } - - /** - * Composite one image onto another using the specified gravity. - * - * @param Imagick $imagick - * @param int $COMPOSITE_CONSTANT - * @param int $GRAVITY_CONSTANT - * @return bool - * @since 3.4.1 - */ - public function compositeImageGravity(Imagick $imagick, $COMPOSITE_CONSTANT, $GRAVITY_CONSTANT) { } - - /** - * Attempts to increase the appearance of large-scale light-dark transitions. - * - * @param float $radius - * @param float $strength - * @return bool - * @since 3.4.1 - */ - public function localContrastImage($radius, $strength) { } - - /** - * Identifies the potential image type, returns one of the Imagick::IMGTYPE_* constants - * @return int - * @since 3.4.3 - */ - public function identifyImageType() { } - - /** - * Sets the image to the specified alpha level. Will replace ImagickDraw::setOpacity() - * - * @param float $alpha - * @return bool - * @since 3.4.3 - */ - public function setImageAlpha($alpha) { } -} + public function transposeImage(): bool {} + + public function transverseImage(): bool {} + + public function trimImage(float $fuzz): bool {} + + public function waveImage(float $amplitude, float $length): bool {} + + public function vignetteImage(float $black_point, float $white_point, int $x, int $y): bool {} + + public function uniqueImageColors(): bool {} + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion < 0x700 +// PHP_ME(imagick, getimagematte, imagick_zero_args, ZEND_ACC_PUBLIC | ZEND_ACC_DEPRECATED) + /** @deprecated */ + public function getImageMatte(): bool {} +#endif +#endif + + // TODO - enabled? + public function setImageMatte(bool $matte): bool {} + + public function adaptiveResizeImage( + int $columns, + int $rows, + bool $bestfit = false, + bool $legacy = false): bool {} -/** - * @method ImagickDraw clone() (PECL imagick 2.0.0)<br/>Makes an exact copy of the specified ImagickDraw object - * @link https://php.net/manual/en/class.imagickdraw.php - */ -class ImagickDraw { - - public function resetVectorGraphics () {} - - public function getTextKerning () {} - - /** - * @param $kerning - */ - public function setTextKerning ($kerning) {} - - public function getTextInterWordSpacing () {} - - /** - * @param $spacing - */ - public function setTextInterWordSpacing ($spacing) {} - - public function getTextInterLineSpacing () {} - - /** - * @param $spacing - */ - public function setTextInterLineSpacing ($spacing) {} - - /** - * (PECL imagick 2.0.0)<br/> - * The ImagickDraw constructor - * @link https://php.net/manual/en/imagickdraw.construct.php - */ - public function __construct () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the fill color to be used for drawing filled objects - * @link https://php.net/manual/en/imagickdraw.setfillcolor.php - * @param ImagickPixel $fill_pixel <p> - * ImagickPixel to use to set the color - * </p> - * @return bool No value is returned. - */ - public function setFillColor (ImagickPixel $fill_pixel) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the opacity to use when drawing using the fill color or fill texture - * @link https://php.net/manual/en/imagickdraw.setfillalpha.php - * @param float $opacity <p> - * fill alpha - * </p> - * @return bool No value is returned. - */ - public function setFillAlpha ($opacity) {} - - /** - * @param $x_resolution - * @param $y_resolution - */ - public function setResolution ($x_resolution, $y_resolution) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the color used for stroking object outlines - * @link https://php.net/manual/en/imagickdraw.setstrokecolor.php - * @param ImagickPixel $stroke_pixel <p> - * the stroke color - * </p> - * @return bool No value is returned. - */ - public function setStrokeColor (ImagickPixel $stroke_pixel) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Specifies the opacity of stroked object outlines - * @link https://php.net/manual/en/imagickdraw.setstrokealpha.php - * @param float $opacity <p> - * opacity - * </p> - * @return bool No value is returned. - */ - public function setStrokeAlpha ($opacity) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the width of the stroke used to draw object outlines - * @link https://php.net/manual/en/imagickdraw.setstrokewidth.php - * @param float $stroke_width <p> - * stroke width - * </p> - * @return bool No value is returned. - */ - public function setStrokeWidth ($stroke_width) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Clears the ImagickDraw - * @link https://php.net/manual/en/imagickdraw.clear.php - * @return bool an ImagickDraw object. - */ - public function clear () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a circle - * @link https://php.net/manual/en/imagickdraw.circle.php - * @param float $ox <p> - * origin x coordinate - * </p> - * @param float $oy <p> - * origin y coordinate - * </p> - * @param float $px <p> - * perimeter x coordinate - * </p> - * @param float $py <p> - * perimeter y coordinate - * </p> - * @return bool No value is returned. - */ - public function circle ($ox, $oy, $px, $py) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws text on the image - * @link https://php.net/manual/en/imagickdraw.annotation.php - * @param float $x <p> - * The x coordinate where text is drawn - * </p> - * @param float $y <p> - * The y coordinate where text is drawn - * </p> - * @param string $text <p> - * The text to draw on the image - * </p> - * @return bool No value is returned. - */ - public function annotation ($x, $y, $text) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Controls whether text is antialiased - * @link https://php.net/manual/en/imagickdraw.settextantialias.php - * @param bool $antiAlias - * @return bool No value is returned. - */ - public function setTextAntialias ($antiAlias) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Specifies specifies the text code set - * @link https://php.net/manual/en/imagickdraw.settextencoding.php - * @param string $encoding <p> - * the encoding name - * </p> - * @return bool No value is returned. - */ - public function setTextEncoding ($encoding) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the fully-specified font to use when annotating with text - * @link https://php.net/manual/en/imagickdraw.setfont.php - * @param string $font_name - * @return bool <b>TRUE</b> on success. - */ - public function setFont ($font_name) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the font family to use when annotating with text - * @link https://php.net/manual/en/imagickdraw.setfontfamily.php - * @param string $font_family <p> - * the font family - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setFontFamily ($font_family) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the font pointsize to use when annotating with text - * @link https://php.net/manual/en/imagickdraw.setfontsize.php - * @param float $pointsize <p> - * the point size - * </p> - * @return bool No value is returned. - */ - public function setFontSize ($pointsize) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the font style to use when annotating with text - * @link https://php.net/manual/en/imagickdraw.setfontstyle.php - * @param int $style <p> - * STYLETYPE_ constant - * </p> - * @return bool No value is returned. - */ - public function setFontStyle ($style) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the font weight - * @link https://php.net/manual/en/imagickdraw.setfontweight.php - * @param int $font_weight - * @return bool - */ - public function setFontWeight ($font_weight) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the font - * @link https://php.net/manual/en/imagickdraw.getfont.php - * @return string|false a string on success and false if no font is set. - */ - public function getFont () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the font family - * @link https://php.net/manual/en/imagickdraw.getfontfamily.php - * @return string|false the font family currently selected or false if font family is not set. - */ - public function getFontFamily () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the font pointsize - * @link https://php.net/manual/en/imagickdraw.getfontsize.php - * @return float the font size associated with the current ImagickDraw object. - */ - public function getFontSize () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the font style - * @link https://php.net/manual/en/imagickdraw.getfontstyle.php - * @return int the font style constant (STYLE_) associated with the ImagickDraw object - * or 0 if no style is set. - */ - public function getFontStyle () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the font weight - * @link https://php.net/manual/en/imagickdraw.getfontweight.php - * @return int an int on success and 0 if no weight is set. - */ - public function getFontWeight () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Frees all associated resources - * @link https://php.net/manual/en/imagickdraw.destroy.php - * @return bool No value is returned. - */ - public function destroy () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a rectangle - * @link https://php.net/manual/en/imagickdraw.rectangle.php - * @param float $x1 <p> - * x coordinate of the top left corner - * </p> - * @param float $y1 <p> - * y coordinate of the top left corner - * </p> - * @param float $x2 <p> - * x coordinate of the bottom right corner - * </p> - * @param float $y2 <p> - * y coordinate of the bottom right corner - * </p> - * @return bool No value is returned. - */ - public function rectangle ($x1, $y1, $x2, $y2) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a rounded rectangle - * @link https://php.net/manual/en/imagickdraw.roundrectangle.php - * @param float $x1 <p> - * x coordinate of the top left corner - * </p> - * @param float $y1 <p> - * y coordinate of the top left corner - * </p> - * @param float $x2 <p> - * x coordinate of the bottom right - * </p> - * @param float $y2 <p> - * y coordinate of the bottom right - * </p> - * @param float $rx <p> - * x rounding - * </p> - * @param float $ry <p> - * y rounding - * </p> - * @return bool No value is returned. - */ - public function roundRectangle ($x1, $y1, $x2, $y2, $rx, $ry) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws an ellipse on the image - * @link https://php.net/manual/en/imagickdraw.ellipse.php - * @param float $ox - * @param float $oy - * @param float $rx - * @param float $ry - * @param float $start - * @param float $end - * @return bool No value is returned. - */ - public function ellipse ($ox, $oy, $rx, $ry, $start, $end) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Skews the current coordinate system in the horizontal direction - * @link https://php.net/manual/en/imagickdraw.skewx.php - * @param float $degrees <p> - * degrees to skew - * </p> - * @return bool No value is returned. - */ - public function skewX ($degrees) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Skews the current coordinate system in the vertical direction - * @link https://php.net/manual/en/imagickdraw.skewy.php - * @param float $degrees <p> - * degrees to skew - * </p> - * @return bool No value is returned. - */ - public function skewY ($degrees) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Applies a translation to the current coordinate system - * @link https://php.net/manual/en/imagickdraw.translate.php - * @param float $x <p> - * horizontal translation - * </p> - * @param float $y <p> - * vertical translation - * </p> - * @return bool No value is returned. - */ - public function translate ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a line - * @link https://php.net/manual/en/imagickdraw.line.php - * @param float $sx <p> - * starting x coordinate - * </p> - * @param float $sy <p> - * starting y coordinate - * </p> - * @param float $ex <p> - * ending x coordinate - * </p> - * @param float $ey <p> - * ending y coordinate - * </p> - * @return bool No value is returned. - */ - public function line ($sx, $sy, $ex, $ey) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws an arc - * @link https://php.net/manual/en/imagickdraw.arc.php - * @param float $sx <p> - * Starting x ordinate of bounding rectangle - * </p> - * @param float $sy <p> - * starting y ordinate of bounding rectangle - * </p> - * @param float $ex <p> - * ending x ordinate of bounding rectangle - * </p> - * @param float $ey <p> - * ending y ordinate of bounding rectangle - * </p> - * @param float $sd <p> - * starting degrees of rotation - * </p> - * @param float $ed <p> - * ending degrees of rotation - * </p> - * @return bool No value is returned. - */ - public function arc ($sx, $sy, $ex, $ey, $sd, $ed) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Paints on the image's opacity channel - * @link https://php.net/manual/en/imagickdraw.matte.php - * @param float $x <p> - * x coordinate of the matte - * </p> - * @param float $y <p> - * y coordinate of the matte - * </p> - * @param int $paintMethod <p> - * PAINT_ constant - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function matte ($x, $y, $paintMethod) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a polygon - * @link https://php.net/manual/en/imagickdraw.polygon.php - * @param array $coordinates <p> - * multidimensional array like array( array( 'x' => 3, 'y' => 4 ), array( 'x' => 2, 'y' => 6 ) ); - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function polygon (array $coordinates) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a point - * @link https://php.net/manual/en/imagickdraw.point.php - * @param float $x <p> - * point's x coordinate - * </p> - * @param float $y <p> - * point's y coordinate - * </p> - * @return bool No value is returned. - */ - public function point ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the text decoration - * @link https://php.net/manual/en/imagickdraw.gettextdecoration.php - * @return int one of the DECORATION_ constants - * and 0 if no decoration is set. - */ - public function getTextDecoration () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the code set used for text annotations - * @link https://php.net/manual/en/imagickdraw.gettextencoding.php - * @return string a string specifying the code set - * or false if text encoding is not set. - */ - public function getTextEncoding () {} - - public function getFontStretch () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the font stretch to use when annotating with text - * @link https://php.net/manual/en/imagickdraw.setfontstretch.php - * @param int $fontStretch <p> - * STRETCH_ constant - * </p> - * @return bool No value is returned. - */ - public function setFontStretch ($fontStretch) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Controls whether stroked outlines are antialiased - * @link https://php.net/manual/en/imagickdraw.setstrokeantialias.php - * @param bool $stroke_antialias <p> - * the antialias setting - * </p> - * @return bool No value is returned. - */ - public function setStrokeAntialias ($stroke_antialias) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Specifies a text alignment - * @link https://php.net/manual/en/imagickdraw.settextalignment.php - * @param int $alignment <p> - * ALIGN_ constant - * </p> - * @return bool No value is returned. - */ - public function setTextAlignment ($alignment) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Specifies a decoration - * @link https://php.net/manual/en/imagickdraw.settextdecoration.php - * @param int $decoration <p> - * DECORATION_ constant - * </p> - * @return bool No value is returned. - */ - public function setTextDecoration ($decoration) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Specifies the color of a background rectangle - * @link https://php.net/manual/en/imagickdraw.settextundercolor.php - * @param ImagickPixel $under_color <p> - * the under color - * </p> - * @return bool No value is returned. - */ - public function setTextUnderColor (ImagickPixel $under_color) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the overall canvas size - * @link https://php.net/manual/en/imagickdraw.setviewbox.php - * @param int $x1 <p> - * left x coordinate - * </p> - * @param int $y1 <p> - * left y coordinate - * </p> - * @param int $x2 <p> - * right x coordinate - * </p> - * @param int $y2 <p> - * right y coordinate - * </p> - * @return bool No value is returned. - */ - public function setViewbox ($x1, $y1, $x2, $y2) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adjusts the current affine transformation matrix - * @link https://php.net/manual/en/imagickdraw.affine.php - * @param array $affine <p> - * Affine matrix parameters - * </p> - * @return bool No value is returned. - */ - public function affine (array $affine) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a bezier curve - * @link https://php.net/manual/en/imagickdraw.bezier.php - * @param array $coordinates <p> - * Multidimensional array like array( array( 'x' => 1, 'y' => 2 ), - * array( 'x' => 3, 'y' => 4 ) ) - * </p> - * @return bool No value is returned. - */ - public function bezier (array $coordinates) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Composites an image onto the current image - * @link https://php.net/manual/en/imagickdraw.composite.php - * @param int $compose <p> - * composition operator. One of COMPOSITE_ constants - * </p> - * @param float $x <p> - * x coordinate of the top left corner - * </p> - * @param float $y <p> - * y coordinate of the top left corner - * </p> - * @param float $width <p> - * width of the composition image - * </p> - * @param float $height <p> - * height of the composition image - * </p> - * @param Imagick $compositeWand <p> - * the Imagick object where composition image is taken from - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function composite ($compose, $x, $y, $width, $height, Imagick $compositeWand) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws color on image - * @link https://php.net/manual/en/imagickdraw.color.php - * @param float $x <p> - * x coordinate of the paint - * </p> - * @param float $y <p> - * y coordinate of the paint - * </p> - * @param int $paintMethod <p> - * one of the PAINT_ constants - * </p> - * @return bool No value is returned. - */ - public function color ($x, $y, $paintMethod) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adds a comment - * @link https://php.net/manual/en/imagickdraw.comment.php - * @param string $comment <p> - * The comment string to add to vector output stream - * </p> - * @return bool No value is returned. - */ - public function comment ($comment) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Obtains the current clipping path ID - * @link https://php.net/manual/en/imagickdraw.getclippath.php - * @return string|false a string containing the clip path ID or false if no clip path exists. - */ - public function getClipPath () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the current polygon fill rule - * @link https://php.net/manual/en/imagickdraw.getcliprule.php - * @return int one of the FILLRULE_ constants. - */ - public function getClipRule () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the interpretation of clip path units - * @link https://php.net/manual/en/imagickdraw.getclipunits.php - * @return int an int on success. - */ - public function getClipUnits () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the fill color - * @link https://php.net/manual/en/imagickdraw.getfillcolor.php - * @return ImagickPixel an ImagickPixel object. - */ - public function getFillColor () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the opacity used when drawing - * @link https://php.net/manual/en/imagickdraw.getfillopacity.php - * @return float The opacity. - */ - public function getFillOpacity () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the fill rule - * @link https://php.net/manual/en/imagickdraw.getfillrule.php - * @return int a FILLRULE_ constant - */ - public function getFillRule () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the text placement gravity - * @link https://php.net/manual/en/imagickdraw.getgravity.php - * @return int a GRAVITY_ constant on success and 0 if no gravity is set. - */ - public function getGravity () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the current stroke antialias setting - * @link https://php.net/manual/en/imagickdraw.getstrokeantialias.php - * @return bool <b>TRUE</b> if antialiasing is on and false if it is off. - */ - public function getStrokeAntialias () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the color used for stroking object outlines - * @link https://php.net/manual/en/imagickdraw.getstrokecolor.php - * @return ImagickPixel an ImagickPixel object which describes the color. - */ - public function getStrokeColor () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns an array representing the pattern of dashes and gaps used to stroke paths - * @link https://php.net/manual/en/imagickdraw.getstrokedasharray.php - * @return array an array on success and empty array if not set. - */ - public function getStrokeDashArray () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the offset into the dash pattern to start the dash - * @link https://php.net/manual/en/imagickdraw.getstrokedashoffset.php - * @return float a float representing the offset and 0 if it's not set. - */ - public function getStrokeDashOffset () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the shape to be used at the end of open subpaths when they are stroked - * @link https://php.net/manual/en/imagickdraw.getstrokelinecap.php - * @return int one of the LINECAP_ constants or 0 if stroke linecap is not set. - */ - public function getStrokeLineCap () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the shape to be used at the corners of paths when they are stroked - * @link https://php.net/manual/en/imagickdraw.getstrokelinejoin.php - * @return int one of the LINEJOIN_ constants or 0 if stroke line join is not set. - */ - public function getStrokeLineJoin () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the stroke miter limit - * @link https://php.net/manual/en/imagickdraw.getstrokemiterlimit.php - * @return int an int describing the miter limit - * and 0 if no miter limit is set. - */ - public function getStrokeMiterLimit () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the opacity of stroked object outlines - * @link https://php.net/manual/en/imagickdraw.getstrokeopacity.php - * @return float a double describing the opacity. - */ - public function getStrokeOpacity () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the width of the stroke used to draw object outlines - * @link https://php.net/manual/en/imagickdraw.getstrokewidth.php - * @return float a double describing the stroke width. - */ - public function getStrokeWidth () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the text alignment - * @link https://php.net/manual/en/imagickdraw.gettextalignment.php - * @return int one of the ALIGN_ constants and 0 if no align is set. - */ - public function getTextAlignment () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the current text antialias setting - * @link https://php.net/manual/en/imagickdraw.gettextantialias.php - * @return bool <b>TRUE</b> if text is antialiased and false if not. - */ - public function getTextAntialias () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns a string containing vector graphics - * @link https://php.net/manual/en/imagickdraw.getvectorgraphics.php - * @return string a string containing the vector graphics. - */ - public function getVectorGraphics () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the text under color - * @link https://php.net/manual/en/imagickdraw.gettextundercolor.php - * @return ImagickPixel an ImagickPixel object describing the color. - */ - public function getTextUnderColor () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adds a path element to the current path - * @link https://php.net/manual/en/imagickdraw.pathclose.php - * @return bool No value is returned. - */ - public function pathClose () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a cubic Bezier curve - * @link https://php.net/manual/en/imagickdraw.pathcurvetoabsolute.php - * @param float $x1 <p> - * x coordinate of the first control point - * </p> - * @param float $y1 <p> - * y coordinate of the first control point - * </p> - * @param float $x2 <p> - * x coordinate of the second control point - * </p> - * @param float $y2 <p> - * y coordinate of the first control point - * </p> - * @param float $x <p> - * x coordinate of the curve end - * </p> - * @param float $y <p> - * y coordinate of the curve end - * </p> - * @return bool No value is returned. - */ - public function pathCurveToAbsolute ($x1, $y1, $x2, $y2, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a cubic Bezier curve - * @link https://php.net/manual/en/imagickdraw.pathcurvetorelative.php - * @param float $x1 <p> - * x coordinate of starting control point - * </p> - * @param float $y1 <p> - * y coordinate of starting control point - * </p> - * @param float $x2 <p> - * x coordinate of ending control point - * </p> - * @param float $y2 <p> - * y coordinate of ending control point - * </p> - * @param float $x <p> - * ending x coordinate - * </p> - * @param float $y <p> - * ending y coordinate - * </p> - * @return bool No value is returned. - */ - public function pathCurveToRelative ($x1, $y1, $x2, $y2, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a quadratic Bezier curve - * @link https://php.net/manual/en/imagickdraw.pathcurvetoquadraticbezierabsolute.php - * @param float $x1 <p> - * x coordinate of the control point - * </p> - * @param float $y1 <p> - * y coordinate of the control point - * </p> - * @param float $x <p> - * x coordinate of the end point - * </p> - * @param float $y <p> - * y coordinate of the end point - * </p> - * @return bool No value is returned. - */ - public function pathCurveToQuadraticBezierAbsolute ($x1, $y1, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a quadratic Bezier curve - * @link https://php.net/manual/en/imagickdraw.pathcurvetoquadraticbezierrelative.php - * @param float $x1 <p> - * starting x coordinate - * </p> - * @param float $y1 <p> - * starting y coordinate - * </p> - * @param float $x <p> - * ending x coordinate - * </p> - * @param float $y <p> - * ending y coordinate - * </p> - * @return bool No value is returned. - */ - public function pathCurveToQuadraticBezierRelative ($x1, $y1, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a quadratic Bezier curve - * @link https://php.net/manual/en/imagickdraw.pathcurvetoquadraticbeziersmoothabsolute.php - * @param float $x <p> - * ending x coordinate - * </p> - * @param float $y <p> - * ending y coordinate - * </p> - * @return bool No value is returned. - */ - public function pathCurveToQuadraticBezierSmoothAbsolute ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a quadratic Bezier curve - * @link https://php.net/manual/en/imagickdraw.pathcurvetoquadraticbeziersmoothrelative.php - * @param float $x <p> - * ending x coordinate - * </p> - * @param float $y <p> - * ending y coordinate - * </p> - * @return bool No value is returned. - */ - public function pathCurveToQuadraticBezierSmoothRelative ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a cubic Bezier curve - * @link https://php.net/manual/en/imagickdraw.pathcurvetosmoothabsolute.php - * @param float $x2 <p> - * x coordinate of the second control point - * </p> - * @param float $y2 <p> - * y coordinate of the second control point - * </p> - * @param float $x <p> - * x coordinate of the ending point - * </p> - * @param float $y <p> - * y coordinate of the ending point - * </p> - * @return bool No value is returned. - */ - public function pathCurveToSmoothAbsolute ($x2, $y2, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a cubic Bezier curve - * @link https://php.net/manual/en/imagickdraw.pathcurvetosmoothrelative.php - * @param float $x2 <p> - * x coordinate of the second control point - * </p> - * @param float $y2 <p> - * y coordinate of the second control point - * </p> - * @param float $x <p> - * x coordinate of the ending point - * </p> - * @param float $y <p> - * y coordinate of the ending point - * </p> - * @return bool No value is returned. - */ - public function pathCurveToSmoothRelative ($x2, $y2, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws an elliptical arc - * @link https://php.net/manual/en/imagickdraw.pathellipticarcabsolute.php - * @param float $rx <p> - * x radius - * </p> - * @param float $ry <p> - * y radius - * </p> - * @param float $x_axis_rotation <p> - * x axis rotation - * </p> - * @param bool $large_arc_flag <p> - * large arc flag - * </p> - * @param bool $sweep_flag <p> - * sweep flag - * </p> - * @param float $x <p> - * x coordinate - * </p> - * @param float $y <p> - * y coordinate - * </p> - * @return bool No value is returned. - */ - public function pathEllipticArcAbsolute ($rx, $ry, $x_axis_rotation, $large_arc_flag, $sweep_flag, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws an elliptical arc - * @link https://php.net/manual/en/imagickdraw.pathellipticarcrelative.php - * @param float $rx <p> - * x radius - * </p> - * @param float $ry <p> - * y radius - * </p> - * @param float $x_axis_rotation <p> - * x axis rotation - * </p> - * @param bool $large_arc_flag <p> - * large arc flag - * </p> - * @param bool $sweep_flag <p> - * sweep flag - * </p> - * @param float $x <p> - * x coordinate - * </p> - * @param float $y <p> - * y coordinate - * </p> - * @return bool No value is returned. - */ - public function pathEllipticArcRelative ($rx, $ry, $x_axis_rotation, $large_arc_flag, $sweep_flag, $x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Terminates the current path - * @link https://php.net/manual/en/imagickdraw.pathfinish.php - * @return bool No value is returned. - */ - public function pathFinish () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a line path - * @link https://php.net/manual/en/imagickdraw.pathlinetoabsolute.php - * @param float $x <p> - * starting x coordinate - * </p> - * @param float $y <p> - * ending x coordinate - * </p> - * @return bool No value is returned. - */ - public function pathLineToAbsolute ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a line path - * @link https://php.net/manual/en/imagickdraw.pathlinetorelative.php - * @param float $x <p> - * starting x coordinate - * </p> - * @param float $y <p> - * starting y coordinate - * </p> - * @return bool No value is returned. - */ - public function pathLineToRelative ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a horizontal line path - * @link https://php.net/manual/en/imagickdraw.pathlinetohorizontalabsolute.php - * @param float $x <p> - * x coordinate - * </p> - * @return bool No value is returned. - */ - public function pathLineToHorizontalAbsolute ($x) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a horizontal line - * @link https://php.net/manual/en/imagickdraw.pathlinetohorizontalrelative.php - * @param float $x <p> - * x coordinate - * </p> - * @return bool No value is returned. - */ - public function pathLineToHorizontalRelative ($x) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a vertical line - * @link https://php.net/manual/en/imagickdraw.pathlinetoverticalabsolute.php - * @param float $y <p> - * y coordinate - * </p> - * @return bool No value is returned. - */ - public function pathLineToVerticalAbsolute ($y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a vertical line path - * @link https://php.net/manual/en/imagickdraw.pathlinetoverticalrelative.php - * @param float $y <p> - * y coordinate - * </p> - * @return bool No value is returned. - */ - public function pathLineToVerticalRelative ($y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Starts a new sub-path - * @link https://php.net/manual/en/imagickdraw.pathmovetoabsolute.php - * @param float $x <p> - * x coordinate of the starting point - * </p> - * @param float $y <p> - * y coordinate of the starting point - * </p> - * @return bool No value is returned. - */ - public function pathMoveToAbsolute ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Starts a new sub-path - * @link https://php.net/manual/en/imagickdraw.pathmovetorelative.php - * @param float $x <p> - * target x coordinate - * </p> - * @param float $y <p> - * target y coordinate - * </p> - * @return bool No value is returned. - */ - public function pathMoveToRelative ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Declares the start of a path drawing list - * @link https://php.net/manual/en/imagickdraw.pathstart.php - * @return bool No value is returned. - */ - public function pathStart () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Draws a polyline - * @link https://php.net/manual/en/imagickdraw.polyline.php - * @param array $coordinates <p> - * array of x and y coordinates: array( array( 'x' => 4, 'y' => 6 ), array( 'x' => 8, 'y' => 10 ) ) - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function polyline (array $coordinates) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Terminates a clip path definition - * @link https://php.net/manual/en/imagickdraw.popclippath.php - * @return bool No value is returned. - */ - public function popClipPath () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Terminates a definition list - * @link https://php.net/manual/en/imagickdraw.popdefs.php - * @return bool No value is returned. - */ - public function popDefs () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Terminates a pattern definition - * @link https://php.net/manual/en/imagickdraw.poppattern.php - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function popPattern () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Starts a clip path definition - * @link https://php.net/manual/en/imagickdraw.pushclippath.php - * @param string $clip_mask_id <p> - * Clip mask Id - * </p> - * @return bool No value is returned. - */ - public function pushClipPath ($clip_mask_id) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Indicates that following commands create named elements for early processing - * @link https://php.net/manual/en/imagickdraw.pushdefs.php - * @return bool No value is returned. - */ - public function pushDefs () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Indicates that subsequent commands up to a ImagickDraw::opPattern() command comprise the definition of a named pattern - * @link https://php.net/manual/en/imagickdraw.pushpattern.php - * @param string $pattern_id <p> - * the pattern Id - * </p> - * @param float $x <p> - * x coordinate of the top-left corner - * </p> - * @param float $y <p> - * y coordinate of the top-left corner - * </p> - * @param float $width <p> - * width of the pattern - * </p> - * @param float $height <p> - * height of the pattern - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function pushPattern ($pattern_id, $x, $y, $width, $height) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Renders all preceding drawing commands onto the image - * @link https://php.net/manual/en/imagickdraw.render.php - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function render () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Applies the specified rotation to the current coordinate space - * @link https://php.net/manual/en/imagickdraw.rotate.php - * @param float $degrees <p> - * degrees to rotate - * </p> - * @return bool No value is returned. - */ - public function rotate ($degrees) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Adjusts the scaling factor - * @link https://php.net/manual/en/imagickdraw.scale.php - * @param float $x <p> - * horizontal factor - * </p> - * @param float $y <p> - * vertical factor - * </p> - * @return bool No value is returned. - */ - public function scale ($x, $y) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Associates a named clipping path with the image - * @link https://php.net/manual/en/imagickdraw.setclippath.php - * @param string $clip_mask <p> - * the clipping path name - * </p> - * @return bool No value is returned. - */ - public function setClipPath ($clip_mask) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Set the polygon fill rule to be used by the clipping path - * @link https://php.net/manual/en/imagickdraw.setcliprule.php - * @param int $fill_rule <p> - * FILLRULE_ constant - * </p> - * @return bool No value is returned. - */ - public function setClipRule ($fill_rule) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the interpretation of clip path units - * @link https://php.net/manual/en/imagickdraw.setclipunits.php - * @param int $clip_units <p> - * the number of clip units - * </p> - * @return bool No value is returned. - */ - public function setClipUnits ($clip_units) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the opacity to use when drawing using the fill color or fill texture - * @link https://php.net/manual/en/imagickdraw.setfillopacity.php - * @param float $fillOpacity <p> - * the fill opacity - * </p> - * @return bool No value is returned. - */ - public function setFillOpacity ($fillOpacity) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the URL to use as a fill pattern for filling objects - * @link https://php.net/manual/en/imagickdraw.setfillpatternurl.php - * @param string $fill_url <p> - * URL to use to obtain fill pattern. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function setFillPatternURL ($fill_url) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the fill rule to use while drawing polygons - * @link https://php.net/manual/en/imagickdraw.setfillrule.php - * @param int $fill_rule <p> - * FILLRULE_ constant - * </p> - * @return bool No value is returned. - */ - public function setFillRule ($fill_rule) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the text placement gravity - * @link https://php.net/manual/en/imagickdraw.setgravity.php - * @param int $gravity <p> - * GRAVITY_ constant - * </p> - * @return bool No value is returned. - */ - public function setGravity ($gravity) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the pattern used for stroking object outlines - * @link https://php.net/manual/en/imagickdraw.setstrokepatternurl.php - * @param string $stroke_url <p> - * stroke URL - * </p> - * @return bool imagick.imagickdraw.return.success; - */ - public function setStrokePatternURL ($stroke_url) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Specifies the offset into the dash pattern to start the dash - * @link https://php.net/manual/en/imagickdraw.setstrokedashoffset.php - * @param float $dash_offset <p> - * dash offset - * </p> - * @return bool No value is returned. - */ - public function setStrokeDashOffset ($dash_offset) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Specifies the shape to be used at the end of open subpaths when they are stroked - * @link https://php.net/manual/en/imagickdraw.setstrokelinecap.php - * @param int $linecap <p> - * LINECAP_ constant - * </p> - * @return bool No value is returned. - */ - public function setStrokeLineCap ($linecap) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Specifies the shape to be used at the corners of paths when they are stroked - * @link https://php.net/manual/en/imagickdraw.setstrokelinejoin.php - * @param int $linejoin <p> - * LINEJOIN_ constant - * </p> - * @return bool No value is returned. - */ - public function setStrokeLineJoin ($linejoin) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Specifies the miter limit - * @link https://php.net/manual/en/imagickdraw.setstrokemiterlimit.php - * @param int $miterlimit <p> - * the miter limit - * </p> - * @return bool No value is returned. - */ - public function setStrokeMiterLimit ($miterlimit) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Specifies the opacity of stroked object outlines - * @link https://php.net/manual/en/imagickdraw.setstrokeopacity.php - * @param float $stroke_opacity <p> - * stroke opacity. 1.0 is fully opaque - * </p> - * @return bool No value is returned. - */ - public function setStrokeOpacity ($stroke_opacity) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the vector graphics - * @link https://php.net/manual/en/imagickdraw.setvectorgraphics.php - * @param string $xml <p> - * xml containing the vector graphics - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function setVectorGraphics ($xml) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Destroys the current ImagickDraw in the stack, and returns to the previously pushed ImagickDraw - * @link https://php.net/manual/en/imagickdraw.pop.php - * @return bool <b>TRUE</b> on success and false on failure. - */ - public function pop () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Clones the current ImagickDraw and pushes it to the stack - * @link https://php.net/manual/en/imagickdraw.push.php - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - */ - public function push () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Specifies the pattern of dashes and gaps used to stroke paths - * @link https://php.net/manual/en/imagickdraw.setstrokedasharray.php - * @param array $dashArray <p> - * array of floats - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setStrokeDashArray (array $dashArray) {} + public function sketchImage(float $radius, float $sigma, float $angle): bool {} + public function shadeImage(bool $gray, float $azimuth, float $elevation): bool {} + + public function getSizeOffset(): int {} + + public function setSizeOffset(int $columns, int $rows, int $offset): bool {} + + + public function adaptiveBlurImage( + float $radius, + float $sigma, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} + + public function contrastStretchImage( + float $black_point, + float $white_point, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} + + public function adaptiveSharpenImage( + float $radius, + float $sigma, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} + + + public function randomThresholdImage( + float $low, + float $high, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} + +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function roundCornersImage( + float $x_rounding, + float $y_rounding, + float $stroke_width = 10, + float $displace = 5, + float $size_correction = -6): bool {} + + /* This alias is due to BWC */ /** - * Sets the opacity to use when drawing using the fill or stroke color or texture. Fully opaque is 1.0. + * @deprecated + * @alias Imagick::roundCornersImage + */ + public function roundCorners( + float $x_rounding, + float $y_rounding, + float $stroke_width = 10, + float $displace = 5, + float $size_correction = -6): bool {} + +#endif + + public function setIteratorIndex(int $index): bool {} + + public function getIteratorIndex(): int {} + +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function transformImage(string $crop, string $geometry): Imagick {} +#endif +#endif + +#if MagickLibVersion > 0x630 +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function setImageOpacity(float $opacity): bool {} +#endif + +#if MagickLibVersion >= 0x700 + public function setImageAlpha(float $alpha): bool {} +#endif + +#if MagickLibVersion < 0x700 + + /** @deprecated */ + public function orderedPosterizeImage( + string $threshold_map, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} +#endif +#endif + +#if MagickLibVersion > 0x631 + // TODO - ImagickDraw .... + public function polaroidImage(ImagickDraw $settings, float $angle): bool {} + + public function getImageProperty(string $name): string {} + + public function setImageProperty(string $name, string $value): bool {} + + public function deleteImageProperty(string $name): bool {} + + // Replaces any embedded formatting characters with the appropriate + // image property and returns the interpreted text. + // See http://www.imagemagick.org/script/escape.php for escape sequences. + // -format "%m:%f %wx%h" + public function identifyFormat(string $format): string {} + + +#if IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD + // INTERPOLATE_* + public function setImageInterpolateMethod(int $method): bool {} +#endif + + // why does this not need to be inside the 'if' for IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD ..? + public function getImageInterpolateMethod(): int {} + + public function linearStretchImage(float $black_point, float $white_point): bool {} + + public function getImageLength(): int {} + + public function extentImage(int $width, int $height, int $x, int $y): bool {} +#endif +#if MagickLibVersion > 0x633 + public function getImageOrientation(): int {} + + public function setImageOrientation(int $orientation): bool {} +#endif + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion > 0x634 +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function paintFloodfillImage( + ImagickPixel|string $fill_color, + float $fuzz, + ImagickPixel|string $border_color, + int $x, + int $y, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} +#endif +#endif +#endif + +#if MagickLibVersion > 0x635 + + // TODO - Imagick + public function clutImage(Imagick $lookup_table, int $channel = Imagick::CHANNEL_DEFAULT): bool {} + + public function getImageProperties(string $pattern = "*", bool $include_values = true): array {} + + public function getImageProfiles(string $pattern = "*", bool $include_values = true): array {} + + // DISTORTION_* + public function distortImage(int $distortion, array $arguments, bool $bestfit): bool {} + + public function writeImageFile(resource $filehandle, ?string $format = null): bool {} + + public function writeImagesFile(resource $filehandle, ?string $format = null): bool {} + + public function resetImagePage(string $page): bool {} + +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function setImageClipMask(imagick $clip_mask): bool {} + + /** @deprecated */ + public function getImageClipMask(): Imagick {} +#endif + + // TODO - x server? + public function animateImages(string $x_server): bool {} + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function recolorImage(array $matrix): bool {} +#endif +#endif +#endif + +#if MagickLibVersion > 0x636 + public function setFont(string $font): bool {} + + public function getFont(): string {} + + public function setPointSize(float $point_size): bool {} + + public function getPointSize(): float {} + + // LAYERMETHOD_* + public function mergeImageLayers(int $layermethod): Imagick {} +#endif + +#if MagickLibVersion > 0x637 + // ALPHACHANNEL_* + public function setImageAlphaChannel(int $alphachannel): bool {} + + // TODO - ImagickPixel ugh +// TODO - ugh MagickBooleanType MagickFloodfillPaintImage(MagickWand *wand, +// const PixelWand *fill,const double fuzz,const PixelWand *bordercolor, +// const ssize_t x,const ssize_t y,const MagickBooleanType invert) + + public function floodfillPaintImage( + ImagickPixel|string $fill_color, + float $fuzz, + ImagickPixel|string $border_color, + int $x, + int $y, + bool $invert, + ?int $channel = Imagick::CHANNEL_DEFAULT + ): bool{} + + + + public function opaquePaintImage( + ImagickPixel|string $target_color, + ImagickPixel|string $fill_color, + float $fuzz, + bool $invert, + int $channel = Imagick::CHANNEL_DEFAULT): bool {} + + public function transparentPaintImage( + ImagickPixel|string $target_color, + float $alpha, + float $fuzz, + bool $invert + ): bool {} +#endif +#if MagickLibVersion > 0x638 + public function liquidRescaleImage(int $width, int $height, float $delta_x, float $rigidity): bool {} + + public function encipherImage(string $passphrase): bool {} + +// PHP_ME(imagick, decipherimage, imagick_decipherimage_args, ZEND_ACC_PUBLIC) + public function decipherImage(string $passphrase): bool {} +#endif + +#if MagickLibVersion > 0x639 + + // GRAVITY_* + public function setGravity(int $gravity): bool {} + + public function getGravity(): int {} + + // CHANNEL_ + public function getImageChannelRange(int $channel): array {} + + public function getImageAlphaChannel(): int {} +#endif + +#if MagickLibVersion > 0x642 + public function getImageChannelDistortions( + Imagick $reference_image, + int $metric, + int $channel = Imagick::CHANNEL_DEFAULT + ): float {} +#endif + +#if MagickLibVersion > 0x643 + // GRAVITY_ + public function setImageGravity(int $gravity): bool {} + + public function getImageGravity(): int {} +#endif + +#if MagickLibVersion > 0x645 + /** + * @param int $x + * @param int $y + * @param int $width + * @param int $height + * @param string $map + * @param int $pixelstorage // PIXELSTORAGE + * @param array $pixels + * @return bool + */ + public function importImagePixels( + int $x, + int $y, + int $width, + int $height, + string $map, + int $pixelstorage, + array $pixels): bool {} + + public function deskewImage(float $threshold): bool {} + + /** + * @param int $colorspace // COLORSPACE + * @param float $cluster_threshold + * @param float $smooth_threshold + * @param bool $verbose + * @return bool + */ + public function segmentImage( + int $colorspace, + float $cluster_threshold, + float $smooth_threshold, + bool $verbose = false + ): bool {} + + // SPARSECOLORMETHOD_* + public function sparseColorImage( + int $sparsecolormethod, + array $arguments, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} + + public function remapImage(Imagick $replacement, int $dither_method): bool {} +#endif + + +#if PHP_IMAGICK_HAVE_HOUGHLINE + public function houghLineImage(int $width, int $height, float $threshold): bool {} +#endif + +#if MagickLibVersion > 0x646 + /** + * @param int $x + * @param int $y + * @param int $width + * @param int $height + * @param string $map e.g. "RGB" + * @param int $pixelstorage // PIXELSTORAGE + * @return array + */ + public function exportImagePixels( + int $x, + int $y, + int $width, + int $height, + string $map, + int $pixelstorage + ): array {} +#endif + +#if MagickLibVersion > 0x648 + public function getImageChannelKurtosis(int $channel = Imagick::CHANNEL_DEFAULT): array {} + + public function functionImage( + int $function, + array $parameters, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} +#endif + +#if MagickLibVersion > 0x651 + // COLORSPACE_* + public function transformImageColorspace(int $colorspace): bool {} +#endif + +#if MagickLibVersion > 0x652 + public function haldClutImage(Imagick $clut, int $channel = Imagick::CHANNEL_DEFAULT): bool {} +#endif + +#if MagickLibVersion > 0x655 + public function autoLevelImage(int $channel = Imagick::CHANNEL_DEFAULT): bool {} + + public function blueShiftImage(float $factor = 1.5): bool {} +#endif + +#if MagickLibVersion > 0x656 + /** + * @param string $artifact example 'compose:args' + * @return string + */ + public function getImageArtifact(string $artifact): string {} + + /** + * @param string $artifact example 'compose:args' + * @param string $value example "1,0,-0.5,0.5" + * @return bool + */ + public function setImageArtifact(string $artifact, string $value): bool {} + + public function deleteImageArtifact(string $artifact): bool {} + + // Will return CHANNEL_* + public function getColorspace(): int {} + +// PHP_ME(imagick, setcolorspace, imagick_setcolorspace_args, ZEND_ACC_PUBLIC) + public function setColorspace(int $colorspace): bool {} + + // CHANNEL_* + public function clampImage(int $channel = Imagick::CHANNEL_DEFAULT): bool {} +#endif + +#if MagickLibVersion > 0x667 + // stack By default, images are stacked left-to-right. Set stack to MagickTrue to stack them top-to-bottom. + //offset minimum distance in pixels between images. + public function smushImages(bool $stack, int $offset): Imagick {} +#endif + +// PHP_ME(imagick, __construct, imagick_construct_args, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) + // TODO int|float? :spocks_eyebrow.gif: + public function __construct(string|array|int|float|null $files = null) {} + + public function __toString(): string {} + +#if PHP_VERSION_ID >= 50600 + // This calls MagickGetNumberImages underneath + // mode is unused. Remove at next major release + // https://github.com/Imagick/imagick/commit/13302500c0ab0ce58e6502e68871187180f7987c + public function count(int $mode = 0): int {} +#else + public function count(): int {} +#endif + + public function getPixelIterator(): ImagickPixelIterator {} + + public function getPixelRegionIterator(int $x, int $y, int $columns, int $rows): ImagickPixelIterator {} + + public function readImage(string $filename): bool {} + + public function readImages(array $filenames): bool {} + + public function readImageBlob(string $image, ?string $filename = null): bool {} + + public function setImageFormat(string $format): bool {} + + public function scaleImage(int $columns, int $rows, bool $bestfit = false, bool $legacy = false): bool {} + + public function writeImage(?string $filename = null): bool {} + + public function writeImages(string $filename, bool $adjoin): bool {} + + // CHANNEL_ + public function blurImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool {} + + public function thumbnailImage( + ?int $columns, + ?int $rows, + bool $bestfit = false, + bool $fill = false, + bool $legacy = false): bool {} + + public function cropThumbnailImage(int $width, int $height, bool $legacy = false): bool {} + + public function getImageFilename(): string {} + + public function setImageFilename(string $filename): bool {} + + public function getImageFormat(): string {} + + public function getImageMimeType(): string {} + + public function removeImage(): bool {} + + /** @alias Imagick::clear */ + public function destroy(): bool {} + + public function clear(): bool {} + + public function clone(): Imagick {} + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function getImageSize(): int {} +#endif +#endif + + public function getImageBlob(): string {} + + public function getImagesBlob(): string {} + + public function setFirstIterator(): bool {} + + public function setLastIterator(): bool {} + + public function resetIterator(): void {} + + public function previousImage(): bool {} + + public function nextImage(): bool {} + + public function hasPreviousImage(): bool {} + + public function hasNextImage(): bool {} + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function setImageIndex(int $index): bool {} + + /** @deprecated */ + public function getImageIndex(): int {} +#endif +#endif + + public function commentImage(string $comment): bool {} + + public function cropImage(int $width, int $height, int $x, int $y): bool {} + + public function labelImage(string $label): bool {} + + public function getImageGeometry(): array {} + + public function drawImage(ImagickDraw $drawing): bool {} + + public function setImageCompressionQuality(int $quality): bool {} + + public function getImageCompressionQuality(): int {} + + public function setImageCompression(int $compression): bool {} + + public function getImageCompression(): int {} + + public function annotateImage( + ImagickDraw $settings, + float $x, + float $y, + float $angle, + string $text + ): bool {} + + public function compositeImage( + Imagick $composite_image, + int $composite, + int $x, + int $y, + int $channel = Imagick::CHANNEL_DEFAULT): bool{} + + public function modulateImage(float $brightness, float $saturation, float $hue): bool {} + + public function getImageColors(): int {} + + + + /** + * @param ImagickDraw $settings + * @param string $tile_geometry e.g. "3x2+0+0" + * @param string $thumbnail_geometry e.g. "200x160+3+3>" + * @param int $monatgemode // MONTAGEMODE_ + * @param string $frame // "10x10+2+2" + * @return Imagick + */ + public function montageImage( + ImagickDraw $settings, + string $tile_geometry, + string $thumbnail_geometry, + int $monatgemode, + string $frame + ): Imagick {} + + public function identifyImage(bool $append_raw_output = false): array {} + + public function thresholdImage(float $threshold, int $channel = Imagick::CHANNEL_DEFAULT): bool {} + + public function adaptiveThresholdImage(int $width, int $height, int $offset): bool {} + + public function blackThresholdImage(ImagickPixel|string $threshold_color): bool {} + + public function whiteThresholdImage(ImagickPixel|string $threshold_color): bool {} + + public function appendImages(bool $stack): Imagick {} + + public function charcoalImage(float $radius, float $sigma): bool {} + + public function normalizeImage(int $channel = Imagick::CHANNEL_DEFAULT): bool {} + + public function oilPaintImage(float $radius): bool {} + + public function posterizeImage(int $levels, bool $dither): bool {} + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function radialBlurImage(float $angle, int $channel = Imagick::CHANNEL_DEFAULT): bool {} +#endif +#endif + + public function raiseImage(int $width, int $height, int $x, int $y, bool $raise): bool {} + + public function resampleImage(float $x_resolution, float $y_resolution, int $filter, float $blur): bool {} + + public function resizeImage( + int $columns, + int $rows, + int $filter, + float $blur, + bool $bestfit = false, + bool $legacy = false): bool {} + + public function rollImage(int $x, int $y): bool {} + + public function rotateImage(ImagickPixel|string $background_color, float $degrees): bool {} + + public function sampleImage(int $columns, int $rows): bool {} + + public function solarizeImage(int $threshold): bool {} + + public function shadowImage(float $opacity, float $sigma, int $x, int $y): bool {} + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function setImageAttribute(string $key, string $value): bool {} +#endif +#endif + + public function setImageBackgroundColor(ImagickPixel|string $background_color): bool {} + +#if MagickLibVersion >= 0x700 + public function setImageChannelMask(int $channel): int {} +#endif + + public function setImageCompose(int $compose): bool {} + + public function setImageDelay(int $delay): bool {} + + public function setImageDepth(int $depth): bool {} + + public function setImageGamma(float $gamma): bool {} + + public function setImageIterations(int $iterations): bool {} + +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function setImageMatteColor(ImagickPixel|string $matte_color): bool {} +#endif + + public function setImagePage(int $width, int $height, int $x, int $y): bool {} + + // TODO test this. + public function setImageProgressMonitor(string $filename): bool {} + +#if MagickLibVersion > 0x653 + public function setProgressMonitor(callable $callback): bool {} +#endif + + public function setImageResolution(float $x_resolution, float $y_resolution): bool {} + + // I have no idea what scene does. + public function setImageScene(int $scene): bool {} + + public function setImageTicksPerSecond(int $ticks_per_second): bool {} + + // IMGTYPE_* + public function setImageType(int $image_type): bool {} + + public function setImageUnits(int $units): bool {} + + public function sharpenImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool {} + + public function shaveImage(int $columns, int $rows): bool {} + + public function shearImage(ImagickPixel|string $background_color, float $x_shear, float $y_shear): bool {} + + public function spliceImage(int $width, int $height, int $x, int $y): bool {} + + public function pingImage(string $filename): bool {} + + public function readImageFile(resource $filehandle, ?string $filename = null): bool {} + + public function displayImage(string $servername): bool {} + + public function displayImages(string $servername): bool {} + + public function spreadImage(float $radius): bool {} + + public function swirlImage(float $degrees): bool {} + + public function stripImage(): bool {} + + public static function queryFormats(string $pattern = "*"): array {} + + public static function queryFonts(string $pattern = "*"): array {} + + /* TODO $multiline == null, means we should autodetect */ + public function queryFontMetrics(ImagickDraw $settings, string $text, ?bool $multiline = null): array {} + + public function steganoImage(Imagick $watermark, int $offset): Imagick {} + + // NOISE_* + public function addNoiseImage(int $noise, int $channel = Imagick::CHANNEL_DEFAULT): bool {} + + public function motionBlurImage( + float $radius, + float $sigma, + float $angle, + int $channel = Imagick::CHANNEL_DEFAULT + ):bool {} + +#if MagickLibVersion < 0x700 +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) + /** @deprecated */ + public function mosaicImages(): Imagick {} +#endif +#endif + + public function morphImages(int $number_frames): Imagick {} + + public function minifyImage(): bool {} + + public function affineTransformImage(ImagickDraw $settings): bool {} + +#if MagickLibVersion < 0x700 +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) + /** @deprecated */ + public function averageImages(): Imagick {} +#endif +#endif + + public function borderImage(ImagickPixel|string $border_color, int $width, int $height): bool {} + + public static function calculateCrop( + int $original_width, + int $original_height, + int $desired_width, + int $desired_height, + bool $legacy = false): array {} + + public function chopImage(int $width, int $height, int $x, int $y): bool {} + + public function clipImage(): bool {} + + public function clipPathImage(string $pathname, bool $inside): bool {} + + /* clippathimage has been deprecated. Create alias here and use the newer API function if present */ + /** @alias Imagick::clipPathImage */ + public function clipImagePath(string $pathname, bool $inside): void {} + + public function coalesceImages(): Imagick {} + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function colorFloodfillImage( + ImagickPixel|string $fill_color, + float $fuzz, + ImagickPixel|string $border_color, + int $x, + int $y + ): bool {} +#endif +#endif + + // TODO - opacity is actually float if legacy is true... + public function colorizeImage( + ImagickPixel|string $colorize_color, + ImagickPixel|string|false $opacity_color, + ?bool $legacy = false ): bool {} + + public function compareImageChannels(Imagick $reference, int $channel, int $metric): array {} + + public function compareImages(Imagick $reference, int $metric): array {} + + public function contrastImage(bool $sharpen): bool {} + + public function combineImages(int $colorspace): Imagick {} + + // kernel is a 2d array of float values + public function convolveImage(array $kernel, int $channel = Imagick::CHANNEL_DEFAULT): bool {} + + public function cycleColormapImage(int $displace): bool {} + + public function deconstructImages(): Imagick {} + + public function despeckleImage(): bool {} + + public function edgeImage(float $radius): bool {} + + public function embossImage(float $radius, float $sigma): bool {} + + public function enhanceImage(): bool {} + + public function equalizeImage(): bool {} + + // EVALUATE_* + public function evaluateImage(int $evaluate, float $constant, int $channel = Imagick::CHANNEL_DEFAULT): bool {} + +#if MagickLibVersion >= 0x687 +// Merge multiple images of the same size together with the selected operator. +//http://www.imagemagick.org/Usage/layers/#evaluate-sequence + + // EVALUATE_* + public function evaluateImages(int $evaluate): bool {} + +#endif + +#if MagickLibVersion < 0x700 +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) + /** @deprecated */ + public function flattenImages(): Imagick {} +#endif +#endif + public function flipImage(): bool {} + + public function flopImage(): bool {} + +#if MagickLibVersion >= 0x655 + public function forwardFourierTransformImage(bool $magnitude): bool {} +#endif + + public function frameImage( + ImagickPixel|string $matte_color, + int $width, + int $height, + int $inner_bevel, + int $outer_bevel + ): bool {} + + + public function fxImage(string $expression, int $channel = Imagick::CHANNEL_DEFAULT): Imagick {} + + public function gammaImage(float $gamma, int $channel = Imagick::CHANNEL_DEFAULT): bool {} + + public function gaussianBlurImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool {} + +#if MagickLibVersion < 0x700 +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) + /** @deprecated */ + public function getImageAttribute(string $key): string {} +#endif +#endif + + public function getImageBackgroundColor(): ImagickPixel {} + + public function getImageBluePrimary(): array {} + + public function getImageBorderColor(): ImagickPixel {} + + public function getImageChannelDepth(int $channel): int {} + + public function getImageChannelDistortion(Imagick $reference, int $channel, int $metric): float {} + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function getImageChannelExtrema(int $channel): array {} +#endif +#endif + + public function getImageChannelMean(int $channel): array {} + + public function getImageChannelStatistics(): array {} + + // index - the offset into the image colormap. I have no idea. + public function getImageColormapColor(int $index): ImagickPixel {} + + public function getImageColorspace(): int {} + + public function getImageCompose(): int {} + + public function getImageDelay(): int {} + + public function getImageDepth(): int {} + + // METRIC_ + public function getImageDistortion(Imagick $reference, int $metric): float {} + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function getImageExtrema(): array {} +#endif +#endif + + public function getImageDispose(): int {} + + public function getImageGamma(): float {} + + public function getImageGreenPrimary(): array {} + + public function getImageHeight(): int {} + + public function getImageHistogram(): array {} + + public function getImageInterlaceScheme(): int {} + + public function getImageIterations(): int {} + +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function getImageMatteColor(): ImagickPixel {} +#endif + + public function getImagePage(): array {} + + public function getImagePixelColor(int $x, int $y): ImagickPixel {} + + +#if IM_HAVE_IMAGICK_SETIMAGEPIXELCOLOR + // TODO - needs a test. + public function setImagePixelColor(int $x, int $y, ImagickPixel|string $color): ImagickPixel {} +#endif + + public function getImageProfile(string $name): string {} + + public function getImageRedPrimary(): array {} + + public function getImageRenderingIntent(): int {} + + public function getImageResolution(): array {} + + public function getImageScene(): int {} + + public function getImageSignature(): string {} + + public function getImageTicksPerSecond(): int {} + + public function getImageType(): int {} + + public function getImageUnits(): int {} + + public function getImageVirtualPixelMethod(): int {} + + public function getImageWhitePoint(): array {} + + public function getImageWidth(): int {} + + public function getNumberImages(): int {} + + public function getImageTotalInkDensity(): float {} + + public function getImageRegion(int $width, int $height, int $x, int $y): Imagick {} + + public function implodeImage(float $radius): bool {} + +#if MagickLibVersion >= 0x658 + // TODO MagickWand *magnitude_wand,MagickWand *phase_wand, + public function inverseFourierTransformImage(Imagick $complement, bool $magnitude): bool {} +#endif + + public function levelImage( + float $black_point, + float $gamma, + float $white_point, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} + + public function magnifyImage(): bool {} + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function mapImage(imagick $map, bool $dither): bool {} + + /** @deprecated */ + public function matteFloodfillImage( + float $alpha, + float $fuzz, + ImagickPixel|string $border_color, + int $x, + int $y + ): bool {} +#endif +#endif + +#if MagickLibVersion < 0x700 +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) + /** @deprecated */ + public function medianFilterImage(float $radius): bool {} +#endif +#endif + + public function negateImage(bool $gray, int $channel = Imagick::CHANNEL_DEFAULT): bool {} + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function paintOpaqueImage( + ImagickPixel|string $target_color, + ImagickPixel|string $fill_color, + float $fuzz, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} + + /** @deprecated */ + public function paintTransparentImage(ImagickPixel|string $target_color, float $alpha, float $fuzz): bool {} +#endif +#endif + + // PREVIEW_* + public function previewImages(int $preview): bool {} + + public function profileImage(string $name, string $profile): bool {} + + public function quantizeImage( + int $number_colors, + int $colorspace, + int $tree_depth, + bool $dither, + bool $measure_error + ): bool {} + + + public function quantizeImages( + int $number_colors, + int $colorspace, + int $tree_depth, + bool $dither, + bool $measure_error): bool {} + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function reduceNoiseImage(float $radius): bool {} +#endif +#endif + + public function removeImageProfile(string $name): string {} + + public function separateImageChannel(int $channel): bool {} + + public function sepiaToneImage(float $threshold): bool {} + +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function setImageBias(float $bias): bool {} + + /** @deprecated */ + public function setImageBiasQuantum(string $bias): void {} +#endif + + public function setImageBluePrimary(float $x, float $y): bool {} + /* {{{ proto bool Imagick::setImageBluePrimary(float x,float y) +For IM7 the prototype is +proto bool Imagick::setImageBluePrimary(float x, float y, float z) */ + + public function setImageBorderColor(ImagickPixel|string $border_color): bool {} + + public function setImageChannelDepth(int $channel, int $depth): bool {} + + public function setImageColormapColor(int $index, ImagickPixel|string $color): bool {} + + public function setImageColorspace(int $colorspace): bool {} + + public function setImageDispose(int $dispose): bool {} + + public function setImageExtent(int $columns, int $rows): bool {} + + public function setImageGreenPrimary(float $x, float $y): bool {} + + // INTERLACE_* + public function setImageInterlaceScheme(int $interlace): bool {} + + public function setImageProfile(string $name, string $profile): bool {} + + public function setImageRedPrimary(float $x, float $y): bool {} + + // RENDERINGINTENT + public function setImageRenderingIntent(int $rendering_intent): bool {} + + public function setImageVirtualPixelMethod(int $method): bool {} + + public function setImageWhitePoint(float $x, float $y): bool {} + + public function sigmoidalContrastImage( + bool $sharpen, + float $alpha, + float $beta, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool{} + + // TODO - MagickStereoImage() composites two images and produces a single + // image that is the composite of a left and right image of a stereo pair + public function stereoImage(Imagick $offset_image): bool {} + + public function textureImage(Imagick $texture): Imagick {} + + public function tintImage( + ImagickPixel|string $tint_color, + ImagickPixel|string $opacity_color, + bool $legacy = false + ): bool {} + + public function unsharpMaskImage( + float $radius, + float $sigma, + float $amount, + float $threshold, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} + + public function getImage(): Imagick {} + + public function addImage(Imagick $image): bool {} + + public function setImage(Imagick $image): bool {} + + + public function newImage( + int $columns, + int $rows, + ImagickPixel|string $background_color, + string $format = null + ): bool {} + + // TODO - canvas? description + public function newPseudoImage(int $columns, int $rows, string $pseudo_format): bool {} + + public function getCompression(): int {} + + public function getCompressionQuality(): int {} + + public static function getCopyright(): string {} + + public static function getConfigureOptions(string $pattern = "*"): string {} + + +#if MagickLibVersion > 0x660 + public static function getFeatures(): string {} +#endif + + public function getFilename(): string {} + + public function getFormat(): string {} + + public static function getHomeURL(): string {} + + public function getInterlaceScheme(): int {} + + public function getOption(string $key): string {} + + public static function getPackageName(): string {} + + public function getPage(): array {} + + public static function getQuantum(): int {} + + public static function getHdriEnabled(): bool {} + + public static function getQuantumDepth(): array {} + + public static function getQuantumRange(): array {} + + public static function getReleaseDate(): string {} + + public static function getResource(int $type): int {} + + public static function getResourceLimit(int $type): int {} + + public function getSamplingFactors(): array {} + + public function getSize(): array {} + + public static function getVersion(): array {} + + public function setBackgroundColor(ImagickPixel|string $background_color): bool {} + + public function setCompression(int $compression): bool {} + + public function setCompressionQuality(int $quality): bool {} + + public function setFilename(string $filename): bool {} + + public function setFormat(string $format): bool {} + + // INTERLACE_* + public function setInterlaceScheme(int $interlace): bool {} + + public function setOption(string $key, string $value): bool {} + + public function setPage(int $width, int $height, int $x, int $y): bool {} + + public static function setResourceLimit(int $type, int $limit): bool {} + + public function setResolution(float $x_resolution, float $y_resolution): bool {} + + public function setSamplingFactors(array $factors): bool {} + + public function setSize(int $columns, int $rows): bool {} + + // IMGTYPE_* + public function setType(int $imgtype): bool {} + +#if MagickLibVersion > 0x628 + /** @alias Imagick::getIteratorIndex */ + public function key(): int {} + +//#else +//# if defined(MAGICKCORE_EXCLUDE_DEPRECATED) +//# error "MAGICKCORE_EXCLUDE_DEPRECATED should not be defined with ImageMagick version below 6.2.8" +//# else +//// PHP_MALIAS(imagick, key, getimageindex, imagick_zero_args, ZEND_ACC_PUBLIC) +// /** @alias Imagick::getImageIndex */ +// public function key(): int {} +// +//# endif +//#endif + + /** @alias Imagick::nextImage + * @tentative-return-type + */ + public function next(): void {} + + /** @alias Imagick::setFirstIterator + * @tentative-return-type + */ + public function rewind(): void {} + + public function valid(): bool {} + + public function current(): Imagick {} + +#if MagickLibVersion >= 0x659 + public function brightnessContrastImage( + float $brightness, + float $contrast, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} +#endif + +#if MagickLibVersion > 0x661 + public function colorMatrixImage(array $color_matrix): bool {} +#endif + + public function selectiveBlurImage( + float $radius, + float $sigma, + float $threshold, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} + +#if MagickLibVersion >= 0x689 + public function rotationalBlurImage(float $angle, int $channel = Imagick::CHANNEL_DEFAULT): bool {} +#endif + +#if MagickLibVersion >= 0x683 + public function statisticImage( + int $type, + int $width, + int $height, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} +#endif + +#if MagickLibVersion >= 0x652 + public function subimageMatch(Imagick $image, ?array &$offset = null, ?float &$similarity = null, float $threshold = 0.0, int $metric = 0): Imagick {} + + /** @alias Imagick::subimageMatch */ + public function similarityimage(Imagick $image, ?array &$offset = null, ?float &$similarity = null, float $threshold = 0.0, int $metric = 0): Imagick {} +#endif + + public static function setRegistry(string $key, string $value): bool {} + + public static function getRegistry(string $key): string {} + + public static function listRegistry(): array {} + +#if MagickLibVersion >= 0x680 + + /** + * @param int $morphology MORPHOLOGY_* + * @param int $iterations + * @param ImagickKernel $kernel + * @param int $channel + * @return bool + */ + public function morphology( + int $morphology, + int $iterations, + ImagickKernel $kernel, + int $channel = Imagick::CHANNEL_DEFAULT + ): bool {} +#endif + +#ifdef IMAGICK_WITH_KERNEL +#if MagickLibVersion < 0x700 + /** @deprecated */ + public function filter(ImagickKernel $kernel, int $channel = Imagick::CHANNEL_UNDEFINED): bool {} +#endif +#endif + + public function setAntialias(bool $antialias): void {} + + public function getAntialias(): bool {} + +#if MagickLibVersion > 0x676 + /** + * @param string $color_correction_collection + * <ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2"> + * <ColorCorrection id="cc03345"> + * <SOPNode> + * <Slope> 0.9 1.2 0.5 </Slope> + * <Offset> 0.4 -0.5 0.6 </Offset> + * <Power> 1.0 0.8 1.5 </Power> + * </SOPNode> + * <SATNode> + * <Saturation> 0.85 </Saturation> + * </SATNode> + * </ColorCorrection> + * </ColorCorrectionCollection> * - * @param float $opacity - * @return void - * @since 3.4.1 + * @return bool */ - public function setOpacity($opacity) { } - - /** - * Returns the opacity used when drawing with the fill or stroke color or texture. Fully opaque is 1.0. - * - * @return float - * @since 3.4.1 - */ - public function getOpacity() { } - - /** - * Sets the image font resolution. - * - * @param float $x - * @param float $y - * @return bool - * @since 3.4.1 - */ - public function setFontResolution($x, $y) { } - - /** - * Gets the image X and Y resolution. - * - * @return array - * @since 3.4.1 - */ - public function getFontResolution() { } - - /** - * Returns the direction that will be used when annotating with text. - * @return bool - * @since 3.4.1 - */ - public function getTextDirection() { } - - /** - * Sets the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option. - * - * @param int $direction - * @return bool - * @since 3.4.1 - */ - public function setTextDirection($direction) { } - - /** - * Returns the border color used for drawing bordered objects. - * - * @return ImagickPixel - * @since 3.4.1 - */ - public function getBorderColor() { } - - /** - * Sets the border color to be used for drawing bordered objects. - * @param ImagickPixel $color - * @return bool - * @since 3.4.1 - */ - public function setBorderColor(ImagickPixel $color) { } - - /** - * Obtains the vertical and horizontal resolution. - * - * @return string|null - * @since 3.4.1 - */ - public function getDensity() { } - - /** - * Sets the vertical and horizontal resolution. - * @param string $density_string - * @return bool - * @since 3.4.1 - */ - public function setDensity($density_string) { } -} + public function colorDecisionListImage(string $color_correction_collection): bool {} +#endif -/** - * @link https://php.net/manual/en/class.imagickpixeliterator.php - */ -class ImagickPixelIterator implements Iterator { - - /** - * (PECL imagick 2.0.0)<br/> - * The ImagickPixelIterator constructor - * @link https://php.net/manual/en/imagickpixeliterator.construct.php - * @param Imagick $wand - */ - public function __construct (Imagick $wand) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns a new pixel iterator - * @link https://php.net/manual/en/imagickpixeliterator.newpixeliterator.php - * @param Imagick $wand - * @return bool <b>TRUE</b> on success. Throwing ImagickPixelIteratorException. - * @throws ImagickPixelIteratorException - */ - public function newPixelIterator (Imagick $wand) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns a new pixel iterator - * @link https://php.net/manual/en/imagickpixeliterator.newpixelregioniterator.php - * @param Imagick $wand - * @param int $x - * @param int $y - * @param int $columns - * @param int $rows - * @return bool a new ImagickPixelIterator on success; on failure, throws ImagickPixelIteratorException - * @throws ImagickPixelIteratorException - */ - public function newPixelRegionIterator (Imagick $wand, $x, $y, $columns, $rows) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the current pixel iterator row - * @link https://php.net/manual/en/imagickpixeliterator.getiteratorrow.php - * @return int the integer offset of the row, throwing ImagickPixelIteratorException on error. - * @throws ImagickPixelIteratorException on error - */ - public function getIteratorRow () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Set the pixel iterator row - * @link https://php.net/manual/en/imagickpixeliterator.setiteratorrow.php - * @param int $row - * @return bool <b>TRUE</b> on success. - */ - public function setIteratorRow ($row) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the pixel iterator to the first pixel row - * @link https://php.net/manual/en/imagickpixeliterator.setiteratorfirstrow.php - * @return bool <b>TRUE</b> on success. - */ - public function setIteratorFirstRow () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the pixel iterator to the last pixel row - * @link https://php.net/manual/en/imagickpixeliterator.setiteratorlastrow.php - * @return bool <b>TRUE</b> on success. - */ - public function setIteratorLastRow () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the previous row - * @link https://php.net/manual/en/imagickpixeliterator.getpreviousiteratorrow.php - * @return array the previous row as an array of ImagickPixelWand objects from the - * ImagickPixelIterator, throwing ImagickPixelIteratorException on error. - * @throws ImagickPixelIteratorException on error - */ - public function getPreviousIteratorRow () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the current row of ImagickPixel objects - * @link https://php.net/manual/en/imagickpixeliterator.getcurrentiteratorrow.php - * @return array a row as an array of ImagickPixel objects that can themselves be iterated. - */ - public function getCurrentIteratorRow () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the next row of the pixel iterator - * @link https://php.net/manual/en/imagickpixeliterator.getnextiteratorrow.php - * @return array the next row as an array of ImagickPixel objects, throwing - * ImagickPixelIteratorException on error. - * @throws ImagickPixelIteratorException on error - */ - public function getNextIteratorRow () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Resets the pixel iterator - * @link https://php.net/manual/en/imagickpixeliterator.resetiterator.php - * @return bool <b>TRUE</b> on success. - */ - public function resetIterator () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Syncs the pixel iterator - * @link https://php.net/manual/en/imagickpixeliterator.synciterator.php - * @return bool <b>TRUE</b> on success. - */ - public function syncIterator () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Deallocates resources associated with a PixelIterator - * @link https://php.net/manual/en/imagickpixeliterator.destroy.php - * @return bool <b>TRUE</b> on success. - */ - public function destroy () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Clear resources associated with a PixelIterator - * @link https://php.net/manual/en/imagickpixeliterator.clear.php - * @return bool <b>TRUE</b> on success. - */ - public function clear () {} - - /** - * @param Imagick $Imagick - */ - public static function getpixeliterator (Imagick $Imagick) {} - - /** - * @param Imagick $Imagick - * @param $x - * @param $y - * @param $columns - * @param $rows - */ - public static function getpixelregioniterator (Imagick $Imagick, $x, $y, $columns, $rows) {} - - public function key () {} - - public function next () {} - - public function rewind () {} - - public function current () {} - - public function valid () {} +#if MagickLibVersion >= 0x687 + public function optimizeImageTransparency(): void {} +#endif -} +#if MagickLibVersion >= 0x660 + public function autoGammaImage(?int $channel = Imagick::CHANNEL_ALL): void {} +#endif -/** - * @method clone() - * @link https://php.net/manual/en/class.imagickpixel.php - */ -class ImagickPixel { - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the normalized HSL color of the ImagickPixel object - * @link https://php.net/manual/en/imagickpixel.gethsl.php - * @return array the HSL value in an array with the keys "hue", - * "saturation", and "luminosity". Throws ImagickPixelException on failure. - * @throws ImagickPixelException on failure - */ - public function getHSL () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the normalized HSL color - * @link https://php.net/manual/en/imagickpixel.sethsl.php - * @param float $hue <p> - * The normalized value for hue, described as a fractional arc - * (between 0 and 1) of the hue circle, where the zero value is - * red. - * </p> - * @param float $saturation <p> - * The normalized value for saturation, with 1 as full saturation. - * </p> - * @param float $luminosity <p> - * The normalized value for luminosity, on a scale from black at - * 0 to white at 1, with the full HS value at 0.5 luminosity. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setHSL ($hue, $saturation, $luminosity) {} - - public function getColorValueQuantum () {} - - /** - * @param $color_value - */ - public function setColorValueQuantum ($color_value) {} - - public function getIndex () {} - - /** - * @param $index - */ - public function setIndex ($index) {} - - /** - * (PECL imagick 2.0.0)<br/> - * The ImagickPixel constructor - * @link https://php.net/manual/en/imagickpixel.construct.php - * @param string $color [optional] <p> - * The optional color string to use as the initial value of this object. - * </p> - */ - public function __construct ($color = null) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the color - * @link https://php.net/manual/en/imagickpixel.setcolor.php - * @param string $color <p> - * The color definition to use in order to initialise the - * ImagickPixel object. - * </p> - * @return bool <b>TRUE</b> if the specified color was set, <b>FALSE</b> otherwise. - */ - public function setColor ($color) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Sets the normalized value of one of the channels - * @link https://php.net/manual/en/imagickpixel.setcolorvalue.php - * @param int $color <p> - * One of the Imagick color constants e.g. \Imagick::COLOR_GREEN or \Imagick::COLOR_ALPHA. - * </p> - * @param float $value <p> - * The value to set this channel to, ranging from 0 to 1. - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function setColorValue ($color, $value) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Gets the normalized value of the provided color channel - * @link https://php.net/manual/en/imagickpixel.getcolorvalue.php - * @param int $color <p> - * The color to get the value of, specified as one of the Imagick color - * constants. This can be one of the RGB colors, CMYK colors, alpha and - * opacity e.g (Imagick::COLOR_BLUE, Imagick::COLOR_MAGENTA). - * </p> - * @return float The value of the channel, as a normalized floating-point number, throwing - * ImagickPixelException on error. - * @throws ImagickPixelException on error - */ - public function getColorValue ($color) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Clears resources associated with this object - * @link https://php.net/manual/en/imagickpixel.clear.php - * @return bool <b>TRUE</b> on success. - */ - public function clear () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Deallocates resources associated with this object - * @link https://php.net/manual/en/imagickpixel.destroy.php - * @return bool <b>TRUE</b> on success. - */ - public function destroy () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Check the distance between this color and another - * @link https://php.net/manual/en/imagickpixel.issimilar.php - * @param ImagickPixel $color <p> - * The ImagickPixel object to compare this object against. - * </p> - * @param float $fuzz <p> - * The maximum distance within which to consider these colors as similar. - * The theoretical maximum for this value is the square root of three - * (1.732). - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function isSimilar (ImagickPixel $color, $fuzz) {} - - /** - * (No version information available, might only be in SVN)<br/> - * Check the distance between this color and another - * @link https://php.net/manual/en/imagickpixel.ispixelsimilar.php - * @param ImagickPixel $color <p> - * The ImagickPixel object to compare this object against. - * </p> - * @param float $fuzz <p> - * The maximum distance within which to consider these colors as similar. - * The theoretical maximum for this value is the square root of three - * (1.732). - * </p> - * @return bool <b>TRUE</b> on success. - */ - public function isPixelSimilar (ImagickPixel $color, $fuzz) {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the color - * @link https://php.net/manual/en/imagickpixel.getcolor.php - * @param bool $normalized [optional] <p> - * Normalize the color values - * </p> - * @return array An array of channel values, each normalized if <b>TRUE</b> is given as param. Throws - * ImagickPixelException on error. - * @throws ImagickPixelException on error. - */ - public function getColor ($normalized = false) {} - - /** - * (PECL imagick 2.1.0)<br/> - * Returns the color as a string - * @link https://php.net/manual/en/imagickpixel.getcolorasstring.php - * @return string the color of the ImagickPixel object as a string. - */ - public function getColorAsString () {} - - /** - * (PECL imagick 2.0.0)<br/> - * Returns the color count associated with this color - * @link https://php.net/manual/en/imagickpixel.getcolorcount.php - * @return int the color count as an integer on success, throws - * ImagickPixelException on failure. - * @throws ImagickPixelException on failure. - */ - public function getColorCount () {} - - /** - * @param $colorCount - */ - public function setColorCount ($colorCount) {} - - - /** - * Returns true if the distance between two colors is less than the specified distance. The fuzz value should be in the range 0-QuantumRange.<br> - * The maximum value represents the longest possible distance in the colorspace. e.g. from RGB(0, 0, 0) to RGB(255, 255, 255) for the RGB colorspace - * @link https://php.net/manual/en/imagickpixel.ispixelsimilarquantum.php - * @param string $pixel - * @param string $fuzz - * @return bool - * @since 3.3.0 - */ - public function isPixelSimilarQuantum($color, $fuzz) { } - - /** - * Returns the color of the pixel in an array as Quantum values. If ImageMagick was compiled as HDRI these will be floats, otherwise they will be integers. - * @link https://php.net/manual/en/imagickpixel.getcolorquantum.php - * @return mixed The quantum value of the color element. Float if ImageMagick was compiled with HDRI, otherwise an int. - * @since 3.3.0 - */ - public function getColorQuantum() { } - - /** - * Sets the color count associated with this color from another ImagickPixel object. - * - * @param ImagickPixel $srcPixel - * @return bool - * @since 3.4.1 - */ - public function setColorFromPixel(ImagickPixel $srcPixel) { } -} -// End of imagick v.3.2.0RC1 - -// Start of Imagick v3.3.0RC1 - -/** - * @link https://php.net/manual/en/class.imagickkernel.php - */ -class ImagickKernel { - /** - * Attach another kernel to this kernel to allow them to both be applied in a single morphology or filter function. Returns the new combined kernel. - * @link https://php.net/manual/en/imagickkernel.addkernel.php - * @param ImagickKernel $imagickKernel - * @return void - * @since 3.3.0 - */ - public function addKernel(ImagickKernel $imagickKernel) { } - - /** - * Adds a given amount of the 'Unity' Convolution Kernel to the given pre-scaled and normalized Kernel. This in effect adds that amount of the original image into the resulting convolution kernel. The resulting effect is to convert the defined kernels into blended soft-blurs, unsharp kernels or into sharpening kernels. - * @link https://php.net/manual/en/imagickkernel.addunitykernel.php - * @return void - * @since 3.3.0 - */ - public function addUnityKernel() { } - - /** - * Create a kernel from a builtin in kernel. See https://www.imagemagick.org/Usage/morphology/#kernel for examples.<br> - * Currently the 'rotation' symbols are not supported. Example: $diamondKernel = ImagickKernel::fromBuiltIn(\Imagick::KERNEL_DIAMOND, "2"); - * @link https://php.net/manual/en/imagickkernel.frombuiltin.php - * @param string $kernelType The type of kernel to build e.g. \Imagick::KERNEL_DIAMOND - * @param string $kernelString A string that describes the parameters e.g. "4,2.5" - * @return void - * @since 3.3.0 - */ - public static function fromBuiltin($kernelType, $kernelString) { } - - /** - * Create a kernel from a builtin in kernel. See https://www.imagemagick.org/Usage/morphology/#kernel for examples.<br> - * Currently the 'rotation' symbols are not supported. Example: $diamondKernel = ImagickKernel::fromBuiltIn(\Imagick::KERNEL_DIAMOND, "2"); - * @link https://php.net/manual/en/imagickkernel.frombuiltin.php - * @see https://www.imagemagick.org/Usage/morphology/#kernel - * @param array $matrix A matrix (i.e. 2d array) of values that define the kernel. Each element should be either a float value, or FALSE if that element shouldn't be used by the kernel. - * @param array $origin [optional] Which element of the kernel should be used as the origin pixel. e.g. For a 3x3 matrix specifying the origin as [2, 2] would specify that the bottom right element should be the origin pixel. - * @return ImagickKernel - * @since 3.3.0 - */ - public static function fromMatrix($matrix, $origin) { } - - /** - * Get the 2d matrix of values used in this kernel. The elements are either float for elements that are used or 'false' if the element should be skipped. - * @link https://php.net/manual/en/imagickkernel.getmatrix.php - * @return array A matrix (2d array) of the values that represent the kernel. - * @since 3.3.0 - */ - public function getMatrix() { } - - /** - * ScaleKernelInfo() scales the given kernel list by the given amount, with or without normalization of the sum of the kernel values (as per given flags).<br> - * The exact behaviour of this function depends on the normalization type being used please see https://www.imagemagick.org/api/morphology.php#ScaleKernelInfo for details.<br> - * Flag should be one of Imagick::NORMALIZE_KERNEL_VALUE, Imagick::NORMALIZE_KERNEL_CORRELATE, Imagick::NORMALIZE_KERNEL_PERCENT or not set. - * @link https://php.net/manual/en/imagickkernel.scale.php - * @see https://www.imagemagick.org/api/morphology.php#ScaleKernelInfo - * @return void - * @since 3.3.0 - */ - public function scale() { } - - /** - * Separates a linked set of kernels and returns an array of ImagickKernels. - * @link https://php.net/manual/en/imagickkernel.separate.php - * @return void - * @since 3.3.0 - */ - public function seperate() { } +#if MagickLibVersion >= 0x692 + public function autoOrient(): void {} + + /** @alias Imagick::autoOrient */ + public function autoOrientate(): void {} + + // COMPOSITE_* + public function compositeImageGravity(Imagick $image, int $composite_constant, int $gravity): bool {} + +#endif + +#if MagickLibVersion >= 0x693 + public function localContrastImage(float $radius, float $strength): void {} +#endif + +#if MagickLibVersion >= 0x700 + // Identifies the potential image type, returns one of the Imagick::IMGTYPE_* constants + public function identifyImageType(): int {} +#endif + + +#if IM_HAVE_IMAGICK_GETSETIMAGEMASK + // PIXELMASK_* + public function getImageMask(int $pixelmask): ?Imagick {} + + // PIXELMASK_* + public function setImageMask(Imagick $clip_mask, int $pixelmask): void {} +#endif + + + // TODO - needs deleting from docs. +// public function getImageMagickLicense(): string {} + + // TODO - needs deleting from docs. +// public function render(): bool {} + +// public function floodfillPaintImage( +// ImagickPixel|string $fill, +// float $fuzz, +// ImagickPixel|string $bordercolor, +// int $x, +// int $y, +// bool $invert, +// int $channel = Imagick::CHANNEL_DEFAULT): null {} } diff --git a/build/stubs/intl.php b/build/stubs/intl.php index 201db9a33f4..5ca558d049f 100644 --- a/build/stubs/intl.php +++ b/build/stubs/intl.php @@ -1,21 +1,27 @@ <?php +/** + * SPDX-FileCopyrightText: 2023 JetBrains s.r.o. + * SPDX-License-Identifier: Apache-2.0 + */ + // Start of intl v.1.1.0 -class Collator { - const DEFAULT_VALUE = -1; - const PRIMARY = 0; - const SECONDARY = 1; - const TERTIARY = 2; - const DEFAULT_STRENGTH = 2; - const QUATERNARY = 3; - const IDENTICAL = 15; - const OFF = 16; - const ON = 17; - const SHIFTED = 20; - const NON_IGNORABLE = 21; - const LOWER_FIRST = 24; - const UPPER_FIRST = 25; +class Collator +{ + public const DEFAULT_VALUE = -1; + public const PRIMARY = 0; + public const SECONDARY = 1; + public const TERTIARY = 2; + public const DEFAULT_STRENGTH = 2; + public const QUATERNARY = 3; + public const IDENTICAL = 15; + public const OFF = 16; + public const ON = 17; + public const SHIFTED = 20; + public const NON_IGNORABLE = 21; + public const LOWER_FIRST = 24; + public const UPPER_FIRST = 25; /** * <p> @@ -37,9 +43,9 @@ class Collator { * F=ON cote < côte < coté < côté * </p> * </p> - * @link https://php.net/manual/en/intl.collator-constants.php + * @link https://php.net/manual/en/class.collator.php#intl.collator-constants */ - const FRENCH_COLLATION = 0; + public const FRENCH_COLLATION = 0; /** * <p> @@ -82,9 +88,9 @@ class Collator { * S=4, A=S di Silva < diSilva < Di Silva < U.S.A. < USA * </p> * </p> - * @link https://php.net/manual/en/intl.collator-constants.php + * @link https://php.net/manual/en/class.collator.php#intl.collator-constants */ - const ALTERNATE_HANDLING = 1; + public const ALTERNATE_HANDLING = 1; /** * <p> @@ -116,9 +122,9 @@ class Collator { * C=U "China" < "china" < "Denmark" < "denmark" * </p> * </p> - * @link https://php.net/manual/en/intl.collator-constants.php + * @link https://php.net/manual/en/class.collator.php#intl.collator-constants */ - const CASE_FIRST = 2; + public const CASE_FIRST = 2; /** * <p> @@ -142,9 +148,9 @@ class Collator { * S=1, E=O role = rôle < Role * </p> * </p> - * @link https://php.net/manual/en/intl.collator-constants.php + * @link https://php.net/manual/en/class.collator.php#intl.collator-constants */ - const CASE_LEVEL = 3; + public const CASE_LEVEL = 3; /** * <p> @@ -168,9 +174,9 @@ class Collator { * <b>Collator::ON</b> * <b>Collator::DEFAULT_VALUE</b> * </p> - * @link https://php.net/manual/en/intl.collator-constants.php + * @link https://php.net/manual/en/class.collator.php#intl.collator-constants */ - const NORMALIZATION_MODE = 4; + public const NORMALIZATION_MODE = 4; /** * <p> @@ -186,14 +192,14 @@ class Collator { * Possible values are: * <b>Collator::PRIMARY</b> * <b>Collator::SECONDARY</b> - * <b>Collator::TERTIARY</b>(<default) + * <b>Collator::TERTIARY</b>(default) * <b>Collator::QUATERNARY</b> * <b>Collator::IDENTICAL</b> * <b>Collator::DEFAULT_VALUE</b> * </p> - * @link https://php.net/manual/en/intl.collator-constants.php + * @link https://php.net/manual/en/class.collator.php#intl.collator-constants */ - const STRENGTH = 5; + public const STRENGTH = 5; /** * <p> @@ -210,9 +216,9 @@ class Collator { * <b>Collator::ON</b> * <b>Collator::DEFAULT_VALUE</b> * </p> - * @link https://php.net/manual/en/intl.collator-constants.php + * @link https://php.net/manual/en/class.collator.php#intl.collator-constants */ - const HIRAGANA_QUATERNARY_MODE = 6; + public const HIRAGANA_QUATERNARY_MODE = 6; /** * <p> @@ -226,13 +232,12 @@ class Collator { * <b>Collator::ON</b> * <b>Collator::DEFAULT_VALUE</b> * </p> - * @link https://php.net/manual/en/intl.collator-constants.php + * @link https://php.net/manual/en/class.collator.php#intl.collator-constants */ - const NUMERIC_COLLATION = 7; - const SORT_REGULAR = 0; - const SORT_STRING = 1; - const SORT_NUMERIC = 2; - + public const NUMERIC_COLLATION = 7; + public const SORT_REGULAR = 0; + public const SORT_STRING = 1; + public const SORT_NUMERIC = 2; /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -240,7 +245,7 @@ class Collator { * @link https://php.net/manual/en/collator.construct.php * @param string $locale */ - public function __construct($locale) { } + public function __construct(string $locale) {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -252,22 +257,22 @@ class Collator { * default locale collation rules will be used. If empty string ("") or * "root" are passed, UCA rules will be used. * </p> - * @return Collator Return new instance of <b>Collator</b> object, or <b>NULL</b> + * @return Collator|null Return new instance of <b>Collator</b> object, or <b>NULL</b> * on error. */ - public static function create($locale) { } + public static function create(string $locale): ?Collator {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Compare two Unicode strings * @link https://php.net/manual/en/collator.compare.php - * @param string $str1 <p> + * @param string $string1 <p> * The first string to compare. * </p> - * @param string $str2 <p> + * @param string $string2 <p> * The second string to compare. * </p> - * @return int Return comparison result:</p> + * @return int|false Return comparison result:</p> * <p> * <p> * 1 if <i>str1</i> is greater than @@ -286,81 +291,93 @@ class Collator { * <b>FALSE</b> * is returned. */ - public function compare($str1, $str2) { } + public function compare( + string $string1, + string $string2 + ): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Sort array using specified collator * @link https://php.net/manual/en/collator.sort.php - * @param array $arr <p> + * @param string[] &$array <p> * Array of strings to sort. * </p> - * @param int $sort_flag [optional] <p> + * @param int $flags [optional] <p> * Optional sorting type, one of the following: * </p> * <p> - * <p> * <b>Collator::SORT_REGULAR</b> * - compare items normally (don't change types) * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public function sort(array &$arr, $sort_flag = null) { } + public function sort( + array &$array, + int $flags = 0 + ): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Sort array using specified collator and sort keys * @link https://php.net/manual/en/collator.sortwithsortkeys.php - * @param array $arr <p>Array of strings to sort</p> + * @param string[] &$array <p>Array of strings to sort</p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public function sortWithSortKeys(array &$arr) { } + public function sortWithSortKeys( + array &$array, + ): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Sort array maintaining index association * @link https://php.net/manual/en/collator.asort.php - * @param array $arr <p>Array of strings to sort.</p> - * @param int $sort_flag [optional] <p> + * @param string[] &$array <p>Array of strings to sort.</p> + * @param int $flags [optional] <p> * Optional sorting type, one of the following: - * <p> * <b>Collator::SORT_REGULAR</b> * - compare items normally (don't change types) * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public function asort(array &$arr, $sort_flag = null) { } + public function asort( + array &$array, + int $flags = 0 + ): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get collation attribute value * @link https://php.net/manual/en/collator.getattribute.php - * @param int $attr <p> + * @param int $attribute <p> * Attribute to get value for. * </p> * @return int|false Attribute value, or boolean <b>FALSE</b> on error. */ - public function getAttribute($attr) { } + public function getAttribute(int $attribute): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Set collation attribute * @link https://php.net/manual/en/collator.setattribute.php - * @param int $attr <p>Attribute.</p> - * @param int $val <p> + * @param int $attribute <p>Attribute.</p> + * @param int $value <p> * Attribute value. * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public function setAttribute($attr, $val) { } + public function setAttribute( + int $attribute, + int $value + ): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get current collation strength * @link https://php.net/manual/en/collator.getstrength.php - * @return int|false current collation strength, or boolean <b>FALSE</b> on error. + * @return int current collation strength, or boolean <b>FALSE</b> on error. */ - public function getStrength() { } + public function getStrength(): int {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -369,513 +386,538 @@ class Collator { * @param int $strength <p>Strength to set.</p> * <p> * Possible values are: - * <p> * <b>Collator::PRIMARY</b> * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public function setStrength($strength) { } + public function setStrength(int $strength): bool {} + + /** + * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> + * Get collator's last error code + * @link https://php.net/manual/en/collator.geterrorcode.php + * @return int|false Error code returned by the last Collator API function call. + */ + public function getErrorCode(): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the locale name of the collator * @link https://php.net/manual/en/collator.getlocale.php - * @param int $type [optional] <p> + * @param int $type <p> * You can choose between valid and actual locale ( * <b>Locale::VALID_LOCALE</b> and * <b>Locale::ACTUAL_LOCALE</b>, - * respectively). The default is the actual locale. + * respectively). * </p> - * @return string Real locale name from which the collation data comes. If the collator was + * @return string|false Real locale name from which the collation data comes. If the collator was * instantiated from rules or an error occurred, returns * boolean <b>FALSE</b>. */ - public function getLocale($type = null) { } - - /** - * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> - * Get collator's last error code - * @link https://php.net/manual/en/collator.geterrorcode.php - * @return int Error code returned by the last Collator API function call. - */ - public function getErrorCode() { } + public function getLocale( + int $type + ): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get text for collator's last error code * @link https://php.net/manual/en/collator.geterrormessage.php - * @return string Description of an error occurred in the last Collator API function call. + * @return string|false Description of an error occurred in the last Collator API function call. */ - public function getErrorMessage() { } + public function getErrorMessage(): string|false {} /** - * (No version information available, might only be in SVN)<br/> + * (PHP 5 >= 5.3.2, PECL intl >= 1.0.3)<br/> * Get sorting key for a string * @link https://php.net/manual/en/collator.getsortkey.php - * @param string $str <p> + * @param string $string <p> * The string to produce the key from. * </p> - * @return string the collation key for the string. Collation keys can be compared directly instead of strings. + * @return string|false the collation key for the string. Collation keys can be compared directly instead of strings. */ - public function getSortKey($str) { } + public function getSortKey( + string $string, + ): string|false {} } -class NumberFormatter { +class NumberFormatter +{ + public const CURRENCY_ACCOUNTING = 12; /** * Decimal format defined by pattern - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PATTERN_DECIMAL = 0; + public const PATTERN_DECIMAL = 0; /** * Decimal format - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const DECIMAL = 1; + public const DECIMAL = 1; /** * Currency format - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const CURRENCY = 2; + public const CURRENCY = 2; /** * Percent format - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PERCENT = 3; + public const PERCENT = 3; /** * Scientific format - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const SCIENTIFIC = 4; + public const SCIENTIFIC = 4; /** * Spellout rule-based format - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const SPELLOUT = 5; + public const SPELLOUT = 5; /** * Ordinal rule-based format - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const ORDINAL = 6; + public const ORDINAL = 6; /** * Duration rule-based format - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const DURATION = 7; + public const DURATION = 7; /** * Rule-based format defined by pattern - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.locale.php#intl.locale-constants */ - const PATTERN_RULEBASED = 9; + public const PATTERN_RULEBASED = 9; /** * Alias for PATTERN_DECIMAL - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const IGNORE = 0; + public const IGNORE = 0; /** * Default format for the locale - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const DEFAULT_STYLE = 1; + public const DEFAULT_STYLE = 1; /** * Rounding mode to round towards positive infinity. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const ROUND_CEILING = 0; + public const ROUND_CEILING = 0; /** * Rounding mode to round towards negative infinity. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const ROUND_FLOOR = 1; + public const ROUND_FLOOR = 1; /** * Rounding mode to round towards zero. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const ROUND_DOWN = 2; + public const ROUND_DOWN = 2; /** * Rounding mode to round away from zero. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const ROUND_UP = 3; + public const ROUND_UP = 3; /** * Rounding mode to round towards the "nearest neighbor" unless both * neighbors are equidistant, in which case, round towards the even * neighbor. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const ROUND_HALFEVEN = 4; + public const ROUND_HALFEVEN = 4; /** * Rounding mode to round towards "nearest neighbor" unless both neighbors * are equidistant, in which case round down. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const ROUND_HALFDOWN = 5; + public const ROUND_HALFDOWN = 5; /** * Rounding mode to round towards "nearest neighbor" unless both neighbors * are equidistant, in which case round up. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const ROUND_HALFUP = 6; + public const ROUND_HALFUP = 6; /** * Pad characters inserted before the prefix. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PAD_BEFORE_PREFIX = 0; + public const PAD_BEFORE_PREFIX = 0; /** * Pad characters inserted after the prefix. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PAD_AFTER_PREFIX = 1; + public const PAD_AFTER_PREFIX = 1; /** * Pad characters inserted before the suffix. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PAD_BEFORE_SUFFIX = 2; + public const PAD_BEFORE_SUFFIX = 2; /** * Pad characters inserted after the suffix. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PAD_AFTER_SUFFIX = 3; + public const PAD_AFTER_SUFFIX = 3; /** * Parse integers only. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PARSE_INT_ONLY = 0; + public const PARSE_INT_ONLY = 0; /** * Use grouping separator. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const GROUPING_USED = 1; + public const GROUPING_USED = 1; /** * Always show decimal point. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const DECIMAL_ALWAYS_SHOWN = 2; + public const DECIMAL_ALWAYS_SHOWN = 2; /** * Maximum integer digits. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const MAX_INTEGER_DIGITS = 3; + public const MAX_INTEGER_DIGITS = 3; /** * Minimum integer digits. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const MIN_INTEGER_DIGITS = 4; + public const MIN_INTEGER_DIGITS = 4; /** * Integer digits. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const INTEGER_DIGITS = 5; + public const INTEGER_DIGITS = 5; /** * Maximum fraction digits. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const MAX_FRACTION_DIGITS = 6; + public const MAX_FRACTION_DIGITS = 6; /** * Minimum fraction digits. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const MIN_FRACTION_DIGITS = 7; + public const MIN_FRACTION_DIGITS = 7; /** * Fraction digits. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const FRACTION_DIGITS = 8; + public const FRACTION_DIGITS = 8; /** * Multiplier. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const MULTIPLIER = 9; + public const MULTIPLIER = 9; /** * Grouping size. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const GROUPING_SIZE = 10; + public const GROUPING_SIZE = 10; /** * Rounding Mode. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const ROUNDING_MODE = 11; + public const ROUNDING_MODE = 11; /** * Rounding increment. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const ROUNDING_INCREMENT = 12; + public const ROUNDING_INCREMENT = 12; /** * The width to which the output of format() is padded. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const FORMAT_WIDTH = 13; + public const FORMAT_WIDTH = 13; /** * The position at which padding will take place. See pad position * constants for possible argument values. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PADDING_POSITION = 14; + public const PADDING_POSITION = 14; /** * Secondary grouping size. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const SECONDARY_GROUPING_SIZE = 15; + public const SECONDARY_GROUPING_SIZE = 15; /** * Use significant digits. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const SIGNIFICANT_DIGITS_USED = 16; + public const SIGNIFICANT_DIGITS_USED = 16; /** * Minimum significant digits. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const MIN_SIGNIFICANT_DIGITS = 17; + public const MIN_SIGNIFICANT_DIGITS = 17; /** * Maximum significant digits. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const MAX_SIGNIFICANT_DIGITS = 18; + public const MAX_SIGNIFICANT_DIGITS = 18; /** * Lenient parse mode used by rule-based formats. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const LENIENT_PARSE = 19; + public const LENIENT_PARSE = 19; /** * Positive prefix. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const POSITIVE_PREFIX = 0; + public const POSITIVE_PREFIX = 0; /** * Positive suffix. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const POSITIVE_SUFFIX = 1; + public const POSITIVE_SUFFIX = 1; /** * Negative prefix. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const NEGATIVE_PREFIX = 2; + public const NEGATIVE_PREFIX = 2; /** * Negative suffix. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const NEGATIVE_SUFFIX = 3; + public const NEGATIVE_SUFFIX = 3; /** * The character used to pad to the format width. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PADDING_CHARACTER = 4; + public const PADDING_CHARACTER = 4; /** * The ISO currency code. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const CURRENCY_CODE = 5; + public const CURRENCY_CODE = 5; /** * The default rule set. This is only available with rule-based * formatters. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const DEFAULT_RULESET = 6; + public const DEFAULT_RULESET = 6; /** * The public rule sets. This is only available with rule-based * formatters. This is a read-only attribute. The public rulesets are * returned as a single string, with each ruleset name delimited by ';' * (semicolon). - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PUBLIC_RULESETS = 7; + public const PUBLIC_RULESETS = 7; /** * The decimal separator. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const DECIMAL_SEPARATOR_SYMBOL = 0; + public const DECIMAL_SEPARATOR_SYMBOL = 0; /** * The grouping separator. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const GROUPING_SEPARATOR_SYMBOL = 1; + public const GROUPING_SEPARATOR_SYMBOL = 1; /** * The pattern separator. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PATTERN_SEPARATOR_SYMBOL = 2; + public const PATTERN_SEPARATOR_SYMBOL = 2; /** * The percent sign. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PERCENT_SYMBOL = 3; + public const PERCENT_SYMBOL = 3; /** * Zero. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const ZERO_DIGIT_SYMBOL = 4; + public const ZERO_DIGIT_SYMBOL = 4; /** * Character representing a digit in the pattern. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const DIGIT_SYMBOL = 5; + public const DIGIT_SYMBOL = 5; /** * The minus sign. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const MINUS_SIGN_SYMBOL = 6; + public const MINUS_SIGN_SYMBOL = 6; /** * The plus sign. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PLUS_SIGN_SYMBOL = 7; + public const PLUS_SIGN_SYMBOL = 7; /** * The currency symbol. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const CURRENCY_SYMBOL = 8; + public const CURRENCY_SYMBOL = 8; /** * The international currency symbol. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const INTL_CURRENCY_SYMBOL = 9; + public const INTL_CURRENCY_SYMBOL = 9; /** * The monetary separator. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const MONETARY_SEPARATOR_SYMBOL = 10; + public const MONETARY_SEPARATOR_SYMBOL = 10; /** * The exponential symbol. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const EXPONENTIAL_SYMBOL = 11; + public const EXPONENTIAL_SYMBOL = 11; /** * Per mill symbol. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PERMILL_SYMBOL = 12; + public const PERMILL_SYMBOL = 12; /** * Escape padding character. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PAD_ESCAPE_SYMBOL = 13; + public const PAD_ESCAPE_SYMBOL = 13; /** * Infinity symbol. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const INFINITY_SYMBOL = 14; + public const INFINITY_SYMBOL = 14; /** * Not-a-number symbol. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const NAN_SYMBOL = 15; + public const NAN_SYMBOL = 15; /** * Significant digit symbol. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const SIGNIFICANT_DIGIT_SYMBOL = 16; + public const SIGNIFICANT_DIGIT_SYMBOL = 16; /** * The monetary grouping separator. - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17; + public const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17; /** * Derive the type from variable type - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const TYPE_DEFAULT = 0; + public const TYPE_DEFAULT = 0; /** * Format/parse as 32-bit integer - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const TYPE_INT32 = 1; + public const TYPE_INT32 = 1; /** * Format/parse as 64-bit integer - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const TYPE_INT64 = 2; + public const TYPE_INT64 = 2; /** * Format/parse as floating point value - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const TYPE_DOUBLE = 3; + public const TYPE_DOUBLE = 3; /** * Format/parse as currency value - * @link https://php.net/manual/en/intl.numberformatter-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants + * @deprecated 8.3 + */ + public const TYPE_CURRENCY = 4; + + /** + * @since 8.4 */ - const TYPE_CURRENCY = 4; + public const ROUND_TOWARD_ZERO = 2; + /** + * @since 8.4 + */ + public const ROUND_AWAY_FROM_ZERO = 3; /** - * @param $locale - * @param $style - * @param $pattern [optional] + * @since 8.4 + */ + public const ROUND_HALFODD = 8; + + /** + * @link https://www.php.net/manual/en/class.numberformatter.php + * @param string $locale + * @param int $style + * @param string $pattern [optional] */ - public function __construct($locale, $style, $pattern = null) { } + public function __construct( + string $locale, + int $style, + string|null $pattern = null + ) {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -901,13 +943,17 @@ class NumberFormatter { * </p> * @return NumberFormatter|false <b>NumberFormatter</b> object or <b>FALSE</b> on error. */ - public static function create($locale, $style, $pattern = null) { } + public static function create( + string $locale, + int $style, + string|null $pattern = null + ): ?NumberFormatter {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Format a number * @link https://php.net/manual/en/numberformatter.format.php - * @param int|float $value <p> + * @param int|float $num <p> * The value to format. Can be integer or float, * other values will be converted to a numeric value. * </p> @@ -917,62 +963,72 @@ class NumberFormatter { * </p> * @return string|false the string containing formatted value, or <b>FALSE</b> on error. */ - public function format($value, $type = null) { } + public function format( + int|float $num, + int $type = 0 + ): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Parse a number * @link https://php.net/manual/en/numberformatter.parse.php - * @param string $value + * @param string $string * @param int $type [optional] <p> * The * formatting type to use. By default, * <b>NumberFormatter::TYPE_DOUBLE</b> is used. * </p> - * @param int $position [optional] <p> + * @param int &$offset [optional] <p> * Offset in the string at which to begin parsing. On return, this value * will hold the offset at which parsing ended. * </p> * @return mixed The value of the parsed number or <b>FALSE</b> on error. */ - public function parse($value, $type = null, &$position = null) { } + public function parse( + string $string, + int $type = NumberFormatter::TYPE_DOUBLE, + &$offset = null + ): int|float|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Format a currency value * @link https://php.net/manual/en/numberformatter.formatcurrency.php - * @param float $value <p> + * @param float $amount <p> * The numeric currency value. * </p> * @param string $currency <p> * The 3-letter ISO 4217 currency code indicating the currency to use. * </p> - * @return string String representing the formatted currency value. + * @return string|false String representing the formatted currency value. */ - public function formatCurrency($value, $currency) { } + public function formatCurrency( + float $amount, + string $currency + ): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Parse a currency number * @link https://php.net/manual/en/numberformatter.parsecurrency.php - * @param string $value - * @param string $currency <p> + * @param string $string + * @param string &$currency <p> * Parameter to receive the currency name (3-letter ISO 4217 currency * code). * </p> - * @param int $position [optional] <p> + * @param int &$offset [optional] <p> * Offset in the string at which to begin parsing. On return, this value * will hold the offset at which parsing ended. * </p> * @return float|false The parsed numeric value or <b>FALSE</b> on error. */ - public function parseCurrency($value, &$currency, &$position = null) { } + public function parseCurrency(string $string, &$currency, &$offset = null): float|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Set an attribute * @link https://php.net/manual/en/numberformatter.setattribute.php - * @param int $attr <p> + * @param int $attribute <p> * Attribute specifier - one of the * numeric attribute constants. * </p> @@ -981,25 +1037,28 @@ class NumberFormatter { * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public function setAttribute($attr, $value) { } + public function setAttribute( + int $attribute, + int|float $value + ): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get an attribute * @link https://php.net/manual/en/numberformatter.getattribute.php - * @param int $attr <p> + * @param int $attribute <p> * Attribute specifier - one of the * numeric attribute constants. * </p> - * @return int|false Return attribute value on success, or <b>FALSE</b> on error. + * @return int|float|false Return attribute value on success, or <b>FALSE</b> on error. */ - public function getAttribute($attr) { } + public function getAttribute(int $attribute): int|float|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Set a text attribute * @link https://php.net/manual/en/numberformatter.settextattribute.php - * @param int $attr <p> + * @param int $attribute <p> * Attribute specifier - one of the * text attribute * constants. @@ -1009,25 +1068,28 @@ class NumberFormatter { * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public function setTextAttribute($attr, $value) { } + public function setTextAttribute( + int $attribute, + string $value + ): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get a text attribute * @link https://php.net/manual/en/numberformatter.gettextattribute.php - * @param int $attr <p> + * @param int $attribute <p> * Attribute specifier - one of the * text attribute constants. * </p> * @return string|false Return attribute value on success, or <b>FALSE</b> on error. */ - public function getTextAttribute($attr) { } + public function getTextAttribute(int $attribute): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Set a symbol value * @link https://php.net/manual/en/numberformatter.setsymbol.php - * @param int $attr <p> + * @param int $symbol <p> * Symbol specifier, one of the * format symbol constants. * </p> @@ -1036,19 +1098,22 @@ class NumberFormatter { * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public function setSymbol($attr, $value) { } + public function setSymbol( + int $symbol, + string $value + ): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get a symbol value * @link https://php.net/manual/en/numberformatter.getsymbol.php - * @param int $attr <p> + * @param int $symbol <p> * Symbol specifier, one of the * format symbol constants. * </p> * @return string|false The symbol string or <b>FALSE</b> on error. */ - public function getSymbol($attr) { } + public function getSymbol(int $symbol): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1061,7 +1126,7 @@ class NumberFormatter { * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public function setPattern($pattern) { } + public function setPattern(string $pattern): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1069,7 +1134,7 @@ class NumberFormatter { * @link https://php.net/manual/en/numberformatter.getpattern.php * @return string|false Pattern string that is used by the formatter, or <b>FALSE</b> if an error happens. */ - public function getPattern() { } + public function getPattern(): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1081,9 +1146,11 @@ class NumberFormatter { * <b>Locale::ACTUAL_LOCALE</b>, * respectively). The default is the actual locale. * </p> - * @return string The locale name used to create the formatter. + * @return string|false The locale name used to create the formatter. */ - public function getLocale($type = null) { } + public function getLocale( + int $type = 0 + ): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1091,7 +1158,7 @@ class NumberFormatter { * @link https://php.net/manual/en/numberformatter.geterrorcode.php * @return int error code from last formatter call. */ - public function getErrorCode() { } + public function getErrorCode(): int {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1099,142 +1166,155 @@ class NumberFormatter { * @link https://php.net/manual/en/numberformatter.geterrormessage.php * @return string error message from last formatter call. */ - public function getErrorMessage() { } + public function getErrorMessage(): string {} } -class Normalizer { +class Normalizer +{ + public const NFKC_CF = 48; + public const FORM_KC_CF = 48; /** * Default normalization options - * @link https://www.php.net/manual/en/class.normalizer.php - */ - const OPTION_DEFAULT = ""; - - /** - * No decomposition/composition - * @link https://www.php.net/manual/en/class.normalizer.php - * @removed 8.0 + * @link https://secure.php.net/manual/en/class.normalizer.php */ - const NONE = "1"; + public const OPTION_DEFAULT = ""; /** * Normalization Form D (NFD) - Canonical Decomposition - * @link https://www.php.net/manual/en/class.normalizer.php + * @link https://secure.php.net/manual/en/class.normalizer.php */ - const FORM_D = "2"; - const NFD = 2; + public const FORM_D = 4; + public const NFD = 4; /** * Normalization Form KD (NFKD) - Compatibility Decomposition - * @link https://www.php.net/manual/en/class.normalizer.php + * @link https://secure.php.net/manual/en/class.normalizer.php */ - const FORM_KD = "3"; - const NFKD = 3; + public const FORM_KD = 8; + public const NFKD = 8; /** * Normalization Form C (NFC) - Canonical Decomposition followed by * Canonical Composition - * @link https://www.php.net/manual/en/class.normalizer.php + * @link https://secure.php.net/manual/en/class.normalizer.php */ - const FORM_C = "4"; - const NFC = 4; + public const FORM_C = 16; + public const NFC = 16; /** * Normalization Form KC (NFKC) - Compatibility Decomposition, followed by * Canonical Composition - * @link https://www.php.net/manual/en/class.normalizer.php + * @link https://secure.php.net/manual/en/class.normalizer.php */ - const FORM_KC = "5"; - const NFKC = 5; - + public const FORM_KC = 32; + public const NFKC = 32; /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Normalizes the input provided and returns the normalized string * @link https://php.net/manual/en/normalizer.normalize.php - * @param string $input <p>The input string to normalize</p> - * @param string $form [optional] <p>One of the normalization forms.</p> - * @return string The normalized string or <b>NULL</b> if an error occurred. + * @param string $string <p>The input string to normalize</p> + * @param int $form <p>One of the normalization forms.</p> + * @return string|false The normalized string or <b>FALSE</b> if an error occurred. */ - public static function normalize($input, $form = Normalizer::FORM_C) { } + public static function normalize( + string $string, + int $form = Normalizer::FORM_C, + ): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Checks if the provided string is already in the specified normalization form. * @link https://php.net/manual/en/normalizer.isnormalized.php - * @param string $input <p>The input string to normalize</p> - * @param string $form [optional] <p> + * @param string $string <p>The input string to normalize</p> + * @param int $form <p> * One of the normalization forms. * </p> * @return bool <b>TRUE</b> if normalized, <b>FALSE</b> otherwise or if there an error */ - public static function isNormalized($input, $form = Normalizer::FORM_C) { } -} + public static function isNormalized( + string $string, + int $form = Normalizer::FORM_C, + ): bool {} -class Locale { + /** + * @param string $string <p>The input string to normalize</p> + * @param int $form + * @return string|null <p>Returns a string containing the Decomposition_Mapping property, if present in the UCD. + * Returns null if there is no Decomposition_Mapping property for the character.</p> + * @link https://www.php.net/manual/en/normalizer.getrawdecomposition.php + * @since 7.3 + */ + public static function getRawDecomposition( + string $string, + int $form = 16 + ): ?string {} +} +class Locale +{ /** * This is locale the data actually comes from. - * @link https://php.net/manual/en/intl.locale-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const ACTUAL_LOCALE = 0; + public const ACTUAL_LOCALE = 0; /** * This is the most specific locale supported by ICU. - * @link https://php.net/manual/en/intl.locale-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const VALID_LOCALE = 1; + public const VALID_LOCALE = 1; /** * Used as locale parameter with the methods of the various locale affected classes, * such as NumberFormatter. This constant would make the methods to use default * locale. - * @link https://php.net/manual/en/intl.locale-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const DEFAULT_LOCALE = null; + public const DEFAULT_LOCALE = null; /** * Language subtag - * @link https://php.net/manual/en/intl.locale-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const LANG_TAG = "language"; + public const LANG_TAG = "language"; /** * Extended language subtag - * @link https://php.net/manual/en/intl.locale-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const EXTLANG_TAG = "extlang"; + public const EXTLANG_TAG = "extlang"; /** * Script subtag - * @link https://php.net/manual/en/intl.locale-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const SCRIPT_TAG = "script"; + public const SCRIPT_TAG = "script"; /** * Region subtag - * @link https://php.net/manual/en/intl.locale-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const REGION_TAG = "region"; + public const REGION_TAG = "region"; /** * Variant subtag - * @link https://php.net/manual/en/intl.locale-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const VARIANT_TAG = "variant"; + public const VARIANT_TAG = "variant"; /** * Grandfathered Language subtag - * @link https://php.net/manual/en/intl.locale-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const GRANDFATHERED_LANG_TAG = "grandfathered"; + public const GRANDFATHERED_LANG_TAG = "grandfathered"; /** * Private subtag - * @link https://php.net/manual/en/intl.locale-constants.php + * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants */ - const PRIVATE_TAG = "private"; - + public const PRIVATE_TAG = "private"; /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1242,7 +1322,7 @@ class Locale { * @link https://php.net/manual/en/locale.getdefault.php * @return string The current runtime locale */ - public static function getDefault() { } + public static function getDefault(): string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1253,7 +1333,7 @@ class Locale { * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public static function setDefault($locale) { } + public static function setDefault(string $locale): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1262,9 +1342,9 @@ class Locale { * @param string $locale <p> * The locale to extract the primary language code from * </p> - * @return string The language code associated with the language or <b>NULL</b> in case of error. + * @return string|null The language code associated with the language or <b>NULL</b> in case of error. */ - public static function getPrimaryLanguage($locale) { } + public static function getPrimaryLanguage(string $locale): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1273,9 +1353,9 @@ class Locale { * @param string $locale <p> * The locale to extract the script code from * </p> - * @return string The script subtag for the locale or <b>NULL</b> if not present + * @return string|null The script subtag for the locale or <b>NULL</b> if not present */ - public static function getScript($locale) { } + public static function getScript(string $locale): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1284,9 +1364,9 @@ class Locale { * @param string $locale <p> * The locale to extract the region code from * </p> - * @return string The region subtag for the locale or <b>NULL</b> if not present + * @return string|null The region subtag for the locale or <b>NULL</b> if not present */ - public static function getRegion($locale) { } + public static function getRegion(string $locale): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1295,9 +1375,9 @@ class Locale { * @param string $locale <p> * The locale to extract the keywords from * </p> - * @return array Associative array containing the keyword-value pairs for this locale + * @return array|false|null Associative array containing the keyword-value pairs for this locale */ - public static function getKeywords($locale) { } + public static function getKeywords(string $locale): array|false|null {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1306,13 +1386,16 @@ class Locale { * @param string $locale <p> * The locale to return a display script for * </p> - * @param string $in_locale [optional] <p> + * @param string $displayLocale <p> * Optional format locale to use to display the script name * </p> - * @return string Display name of the script for the $locale in the format appropriate for + * @return string|false Display name of the script for the $locale in the format appropriate for * $in_locale. */ - public static function getDisplayScript($locale, $in_locale = null) { } + public static function getDisplayScript( + string $locale, + string|null $displayLocale = null + ): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1321,13 +1404,16 @@ class Locale { * @param string $locale <p> * The locale to return a display region for. * </p> - * @param string $in_locale [optional] <p> + * @param string $displayLocale <p> * Optional format locale to use to display the region name * </p> - * @return string display name of the region for the $locale in the format appropriate for + * @return string|false display name of the region for the $locale in the format appropriate for * $in_locale. */ - public static function getDisplayRegion($locale, $in_locale = null) { } + public static function getDisplayRegion( + string $locale, + string|null $displayLocale = null + ): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1336,10 +1422,13 @@ class Locale { * @param string $locale <p> * The locale to return a display name for. * </p> - * @param string $in_locale [optional] <p>optional format locale</p> - * @return string Display name of the locale in the format appropriate for $in_locale. + * @param string $displayLocale <p>optional format locale</p> + * @return string|false Display name of the locale in the format appropriate for $in_locale. */ - public static function getDisplayName($locale, $in_locale = null) { } + public static function getDisplayName( + string $locale, + string|null $displayLocale = null + ): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1348,13 +1437,16 @@ class Locale { * @param string $locale <p> * The locale to return a display language for * </p> - * @param string $in_locale [optional] <p> + * @param string $displayLocale <p> * Optional format locale to use to display the language name * </p> - * @return string display name of the language for the $locale in the format appropriate for + * @return string|false display name of the language for the $locale in the format appropriate for * $in_locale. */ - public static function getDisplayLanguage($locale, $in_locale = null) { } + public static function getDisplayLanguage( + string $locale, + string|null $displayLocale = null + ): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1363,13 +1455,16 @@ class Locale { * @param string $locale <p> * The locale to return a display variant for * </p> - * @param string $in_locale [optional] <p> + * @param string $displayLocale <p> * Optional format locale to use to display the variant name * </p> - * @return string Display name of the variant for the $locale in the format appropriate for + * @return string|false Display name of the variant for the $locale in the format appropriate for * $in_locale. */ - public static function getDisplayVariant($locale, $in_locale = null) { } + public static function getDisplayVariant( + string $locale, + string|null $displayLocale = null + ): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1393,9 +1488,9 @@ class Locale { * (e.g. 'variant0', 'variant1', etc.). * </p> * </p> - * @return string The corresponding locale identifier. + * @return string|false The corresponding locale identifier. */ - public static function composeLocale(array $subtags) { } + public static function composeLocale(array $subtags): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1406,14 +1501,14 @@ class Locale { * 'private' subtags can take maximum 15 values whereas 'extlang' can take * maximum 3 values. * </p> - * @return array an array containing a list of key-value pairs, where the keys + * @return array|null an array containing a list of key-value pairs, where the keys * identify the particular locale ID subtags, and the values are the * associated subtag values. The array will be ordered as the locale id * subtags e.g. in the locale id if variants are '-varX-varY-varZ' then the * returned array will have variant0=>varX , variant1=>varY , * variant2=>varZ */ - public static function parseLocale($locale) { } + public static function parseLocale(string $locale): ?array {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1422,57 +1517,66 @@ class Locale { * @param string $locale <p> * The locale to extract the variants from * </p> - * @return array The array containing the list of all variants subtag for the locale + * @return array|null The array containing the list of all variants subtag for the locale * or <b>NULL</b> if not present */ - public static function getAllVariants($locale) { } + public static function getAllVariants(string $locale): ?array {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Checks if a language tag filter matches with locale * @link https://php.net/manual/en/locale.filtermatches.php - * @param string $langtag <p> + * @param string $languageTag <p> * The language tag to check * </p> * @param string $locale <p> * The language range to check against * </p> - * @param bool $canonicalize [optional] <p> + * @param bool $canonicalize <p> * If true, the arguments will be converted to canonical form before * matching. * </p> - * @return bool <b>TRUE</b> if $locale matches $langtag <b>FALSE</b> otherwise. + * @return bool|null <b>TRUE</b> if $locale matches $langtag <b>FALSE</b> otherwise. */ - public static function filterMatches($langtag, $locale, $canonicalize = false) { } + public static function filterMatches( + string $languageTag, + string $locale, + bool $canonicalize = false + ): ?bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Searches the language tag list for the best match to the language * @link https://php.net/manual/en/locale.lookup.php - * @param array $langtag <p> + * @param array $languageTag <p> * An array containing a list of language tags to compare to * <i>locale</i>. Maximum 100 items allowed. * </p> * @param string $locale <p> * The locale to use as the language range when matching. * </p> - * @param bool $canonicalize [optional] <p> + * @param bool $canonicalize <p> * If true, the arguments will be converted to canonical form before * matching. * </p> - * @param string $default [optional] <p> + * @param string $defaultLocale <p> * The locale to use if no match is found. * </p> - * @return string The closest matching language tag or default value. + * @return string|null The closest matching language tag or default value. */ - public static function lookup(array $langtag, $locale, $canonicalize = false, $default = null) { } + public static function lookup( + array $languageTag, + string $locale, + bool $canonicalize = false, + string|null $defaultLocale = null + ): ?string {} /** * @link https://php.net/manual/en/locale.canonicalize.php * @param string $locale - * @return string + * @return string|null */ - public static function canonicalize($locale) { } + public static function canonicalize(string $locale): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1481,13 +1585,13 @@ class Locale { * @param string $header <p> * The string containing the "Accept-Language" header according to format in RFC 2616. * </p> - * @return string The corresponding locale identifier. + * @return string|false The corresponding locale identifier. */ - public static function acceptFromHttp($header) { } + public static function acceptFromHttp(string $header): string|false {} } -class MessageFormatter { - +class MessageFormatter +{ /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Constructs a new Message Formatter @@ -1501,8 +1605,12 @@ class MessageFormatter { * umsg_autoQuoteApostrophe * before being interpreted. * </p> + * @throws IntlException on failure. */ - public function __construct($locale, $pattern) { } + public function __construct( + string $locale, + string $pattern + ) {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1517,20 +1625,23 @@ class MessageFormatter { * umsg_autoQuoteApostrophe * before being interpreted. * </p> - * @return MessageFormatter The formatter object + * @return MessageFormatter|null The formatter object */ - public static function create($locale, $pattern) { } + public static function create( + string $locale, + string $pattern + ): ?MessageFormatter {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Format the message * @link https://php.net/manual/en/messageformatter.format.php - * @param array $args <p> + * @param array $values <p> * Arguments to insert into the format string * </p> * @return string|false The formatted string, or <b>FALSE</b> if an error occurred */ - public function format(array $args) { } + public function format(array $values): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1545,23 +1656,27 @@ class MessageFormatter { * umsg_autoQuoteApostrophe * before being interpreted. * </p> - * @param array $args <p> + * @param array $values <p> * The array of values to insert into the format string * </p> * @return string|false The formatted pattern string or <b>FALSE</b> if an error occurred */ - public static function formatMessage($locale, $pattern, array $args) { } + public static function formatMessage( + string $locale, + string $pattern, + array $values + ): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Parse input string according to pattern * @link https://php.net/manual/en/messageformatter.parse.php - * @param string $value <p> + * @param string $string <p> * The string to parse * </p> * @return array|false An array containing the items extracted, or <b>FALSE</b> on error */ - public function parse($value) { } + public function parse(string $string): array|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1573,12 +1688,16 @@ class MessageFormatter { * @param string $pattern <p> * The pattern with which to parse the <i>value</i>. * </p> - * @param string $source <p> + * @param string $message <p> * The string to parse, conforming to the <i>pattern</i>. * </p> * @return array|false An array containing items extracted, or <b>FALSE</b> on error */ - public static function parseMessage($locale, $pattern, $source) { } + public static function parseMessage( + string $locale, + string $pattern, + string $message + ): array|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1592,15 +1711,15 @@ class MessageFormatter { * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public function setPattern($pattern) { } + public function setPattern(string $pattern): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the pattern used by the formatter * @link https://php.net/manual/en/messageformatter.getpattern.php - * @return string The pattern string for this message formatter + * @return string|false The pattern string for this message formatter */ - public function getPattern() { } + public function getPattern(): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1608,7 +1727,7 @@ class MessageFormatter { * @link https://php.net/manual/en/messageformatter.getlocale.php * @return string The locale name */ - public function getLocale() { } + public function getLocale(): string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1616,7 +1735,7 @@ class MessageFormatter { * @link https://php.net/manual/en/messageformatter.geterrorcode.php * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR. */ - public function getErrorCode() { } + public function getErrorCode(): int {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1624,68 +1743,74 @@ class MessageFormatter { * @link https://php.net/manual/en/messageformatter.geterrormessage.php * @return string Description of the last error. */ - public function getErrorMessage() { } + public function getErrorMessage(): string {} } -class IntlDateFormatter { - +class IntlDateFormatter +{ /** * Completely specified style (Tuesday, April 12, 1952 AD or 3:30:42pm PST) * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants */ - const FULL = 0; + public const FULL = 0; /** * Long style (January 12, 1952 or 3:30:32pm) * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants */ - const LONG = 1; + public const LONG = 1; /** * Medium style (Jan 12, 1952) * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants */ - const MEDIUM = 2; + public const MEDIUM = 2; /** * Most abbreviated style, only essential data (12/13/52 or 3:30pm) * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants */ - const SHORT = 3; + public const SHORT = 3; /** * Do not include this element * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants */ - const NONE = -1; + public const NONE = -1; /** * Gregorian Calendar * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants */ - const GREGORIAN = 1; + public const GREGORIAN = 1; /** * Non-Gregorian Calendar * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants */ - const TRADITIONAL = 0; - - const RELATIVE_FULL = 0; - const RELATIVE_LONG = 1; - const RELATIVE_MEDIUM = 2; - const RELATIVE_SHORT = 3; - + public const TRADITIONAL = 0; + public const RELATIVE_FULL = 128; + public const RELATIVE_LONG = 129; + public const RELATIVE_MEDIUM = 130; + public const RELATIVE_SHORT = 131; + public const PATTERN = -2; /** * @param string|null $locale - * @param int $datetype - * @param int $timetype + * @param int $dateType + * @param int $timeType * @param mixed|null $timezone [optional] * @param mixed|null $calendar [optional] * @param string $pattern [optional] */ - public function __construct($locale, $datetype, $timetype, $timezone = null, $calendar = null, $pattern = '') { } + public function __construct( + string|null $locale, + int $dateType = 0, + int $timeType = 0, + $timezone = null, + $calendar = null, + string|null $pattern = null + ) {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1694,14 +1819,14 @@ class IntlDateFormatter { * @param string $locale <p> * Locale to use when formatting or parsing; default is specified in the ini setting intl.default_locale. * </p> - * @param int $datetype <p> + * @param int $dateType <p> * Date type to use (<b>none</b>, * <b>short</b>, <b>medium</b>, * <b>long</b>, <b>full</b>). * This is one of the * IntlDateFormatter constants. * </p> - * @param int $timetype <p> + * @param int $timeType <p> * Time type to use (<b>none</b>, * <b>short</b>, <b>medium</b>, * <b>long</b>, <b>full</b>). @@ -1720,123 +1845,116 @@ class IntlDateFormatter { * Optional pattern to use when formatting or parsing. * Possible patterns are documented at http://userguide.icu-project.org/formatparse/datetime. * </p> - * @return IntlDateFormatter + * @return IntlDateFormatter|null */ - public static function create($locale, $datetype, $timetype, $timezone = null, $calendar = null, $pattern = '') { } + public static function create( + string|null $locale, + int $dateType = 0, + int $timeType = 0, + $timezone = null, + IntlCalendar|int|null $calendar = null, + string|null $pattern = null + ): ?IntlDateFormatter {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the datetype used for the IntlDateFormatter * @link https://php.net/manual/en/intldateformatter.getdatetype.php - * @return int The current date type value of the formatter. + * @return int|false The current date type value of the formatter. */ - public function getDateType() { } + public function getDateType(): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the timetype used for the IntlDateFormatter * @link https://php.net/manual/en/intldateformatter.gettimetype.php - * @return int The current date type value of the formatter. + * @return int|false The current date type value of the formatter. */ - public function getTimeType() { } + public function getTimeType(): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the calendar used for the IntlDateFormatter * @link https://php.net/manual/en/intldateformatter.getcalendar.php - * @return int The calendar being used by the formatter. + * @return int|false The calendar being used by the formatter. */ - public function getCalendar() { } + public function getCalendar(): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * sets the calendar used to the appropriate calendar, which must be * @link https://php.net/manual/en/intldateformatter.setcalendar.php - * @param int $which <p> + * @param int $calendar <p> * The calendar to use. * Default is <b>IntlDateFormatter::GREGORIAN</b>. * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public function setCalendar($which) { } + public function setCalendar(IntlCalendar|int|null $calendar): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the timezone-id used for the IntlDateFormatter * @link https://php.net/manual/en/intldateformatter.gettimezoneid.php - * @return string ID string for the time zone used by this formatter. + * @return string|false ID string for the time zone used by this formatter. */ - public function getTimeZoneId() { } + public function getTimeZoneId(): string|false {} /** * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)<br/> * Get copy of formatter's calendar object - * @link https://www.php.net/manual/en/intldateformatter.getcalendarobject.php - * @return IntlCalendar A copy of the internal calendar object used by this formatter. + * @link https://secure.php.net/manual/en/intldateformatter.getcalendarobject.php + * @return IntlCalendar|false|null A copy of the internal calendar object used by this formatter. */ - public function getCalendarObject() { } + public function getCalendarObject(): IntlCalendar|false|null {} /** * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)<br/> * Get formatter's timezone - * @link https://www.php.net/manual/en/intldateformatter.gettimezone.php + * @link https://secure.php.net/manual/en/intldateformatter.gettimezone.php * @return IntlTimeZone|false The associated IntlTimeZone object or FALSE on failure. */ - public function getTimeZone() { } - - /** - * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> - * Sets the time zone to use - * @link https://php.net/manual/en/intldateformatter.settimezoneid.php - * @param string $zone <p> - * The time zone ID string of the time zone to use. - * If <b>NULL</b> or the empty string, the default time zone for the runtime is used. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * @deprecated 5.5 https://www.php.net/manual/en/migration55.deprecated.php - * @removed 7.0 - */ - public function setTimeZoneId($zone) { } + public function getTimeZone(): IntlTimeZone|false {} /** * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)<br/> * Sets formatter's timezone * @link https://php.net/manual/en/intldateformatter.settimezone.php - * @param mixed $zone <p> + * @param mixed $timezone <p> * The timezone to use for this formatter. This can be specified in the * following forms: * <ul> * <li> * <p> * <b>NULL</b>, in which case the default timezone will be used, as specified in - * the ini setting {@link "https://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone" date.timezone} or - * through the function {@link "https://www.php.net/manual/en/function.date-default-timezone-set.php" date_default_timezone_set()} and as - * returned by {@link "https://www.php.net/manual/en/function.date-default-timezone-get.php" date_default_timezone_get()}. + * the ini setting {@link "https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone" date.timezone} or + * through the function {@link "https://secure.php.net/manual/en/function.date-default-timezone-set.php" date_default_timezone_set()} and as + * returned by {@link "https://secure.php.net/manual/en/function.date-default-timezone-get.php" date_default_timezone_get()}. * </p> * </li> * <li> * <p> - * An {@link "https://www.php.net/manual/en/class.intltimezone.php" IntlTimeZone}, which will be used directly. + * An {@link "https://secure.php.net/manual/en/class.intltimezone.php" IntlTimeZone}, which will be used directly. * </p> * </li> * <li> * <p> - * A {@link "https://www.php.net/manual/en/class.datetimezone.php" DateTimeZone}. Its identifier will be extracted + * A {@link "https://secure.php.net/manual/en/class.datetimezone.php" DateTimeZone}. Its identifier will be extracted * and an ICU timezone object will be created; the timezone will be backed * by ICU's database, not PHP's. * </p> * </li> - *<li> + * <li> * <p> - * A {@link "https://www.php.net/manual/en/language.types.string.php" string}, which should be a valid ICU timezone identifier. + * A {@link "https://secure.php.net/manual/en/language.types.string.php" string}, which should be a valid ICU timezone identifier. * See <b>IntlTimeZone::createTimeZoneIDEnumeration()</b>. Raw offsets such as <em>"GMT+08:30"</em> are also accepted. * </p> * </li> * </ul> * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. + * @return bool|null <b>TRUE</b> on success (since 8.3 - previously null) or <b>FALSE</b> on failure. */ - public function setTimeZone($zone) { } + public function setTimeZone($timezone): ?bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1849,24 +1967,26 @@ class IntlDateFormatter { * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. * Bad formatstrings are usually the cause of the failure. */ - public function setPattern($pattern) { } + public function setPattern(string $pattern): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the pattern used for the IntlDateFormatter * @link https://php.net/manual/en/intldateformatter.getpattern.php - * @return string The pattern string being used to format/parse. + * @return string|false The pattern string being used to format/parse. */ - public function getPattern() { } + public function getPattern(): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the locale used by formatter * @link https://php.net/manual/en/intldateformatter.getlocale.php - * @param int $which [optional] + * @param int $type [optional] * @return string|false the locale of this formatter or 'false' if error */ - public function getLocale($which = null) { } + public function getLocale( + int $type = 0 + ): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1875,9 +1995,9 @@ class IntlDateFormatter { * @param bool $lenient <p> * Sets whether the parser is lenient or not, default is <b>TRUE</b> (lenient). * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. + * @return void */ - public function setLenient($lenient) { } + public function setLenient(bool $lenient): void {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1885,13 +2005,13 @@ class IntlDateFormatter { * @link https://php.net/manual/en/intldateformatter.islenient.php * @return bool <b>TRUE</b> if parser is lenient, <b>FALSE</b> if parser is strict. By default the parser is lenient. */ - public function isLenient() { } + public function isLenient(): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Format the date/time value as a string * @link https://php.net/manual/en/intldateformatter.format.php - * @param mixed $value <p> + * @param mixed $datetime <p> * Value to format. This may be a <b>DateTime</b> object, * an integer representing a Unix timestamp value (seconds * since epoch, UTC) or an array in the format output by @@ -1899,17 +2019,19 @@ class IntlDateFormatter { * </p> * @return string|false The formatted string or, if an error occurred, <b>FALSE</b>. */ - public function format($value) { } + public function format( + $datetime, + ): string|false {} /** * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)<br/> * Formats an object - * @link https://www.php.net/manual/en/intldateformatter.formatobject.php - * @param object $object <p> - * An object of type {@link "https://www.php.net/manual/en/class.intlcalendar.php" IntlCalendar} or {@link "https://www.php.net/manual/en/class.datetime.php" DateTime}. The timezone information in the object will be used. + * @link https://secure.php.net/manual/en/intldateformatter.formatobject.php + * @param object $datetime <p> + * An object of type {@link "https://secure.php.net/manual/en/class.intlcalendar.php" IntlCalendar} or {@link "https://secure.php.net/manual/en/class.datetime.php" DateTime}. The timezone information in the object will be used. * </p> * @param mixed $format [optional] <p> - * How to format the date/time. This can either be an {@link "https://www.php.net/manual/en/language.types.array.php" array} with + * How to format the date/time. This can either be an {@link "https://secure.php.net/manual/en/language.types.array.php" array} with * two elements (first the date style, then the time style, these being one * of the constants <b>IntlDateFormatter::NONE</b>, * <b>IntlDateFormatter::SHORT</b>, @@ -1917,50 +2039,50 @@ class IntlDateFormatter { * <b>IntlDateFormatter::LONG</b>, * <b>IntlDateFormatter::FULL</b>), a long with * the value of one of these constants (in which case it will be used both - * for the time and the date) or a {@link "https://www.php.net/manual/en/language.types.string.php" string} with the format + * for the time and the date) or a {@link "https://secure.php.net/manual/en/language.types.string.php" string} with the format * described in {@link "http://www.icu-project.org/apiref/icu4c/classSimpleDateFormat.html#details" the ICU documentation}. - * If <br>NULL</br>, the default style will be used. + * If <b>NULL</b>, the default style will be used. * </p> - * @param string $locale [optional] <p> - * The locale to use, or <b>NULL</b> to use the {@link "https://www.php.net/manual/en/intl.configuration.php#ini.intl.default-locale"default one}.</p> + * @param string|null $locale [optional] <p> + * The locale to use, or <b>NULL</b> to use the {@link "https://secure.php.net/manual/en/intl.configuration.php#ini.intl.default-locale" default one}.</p> * @return string|false A string with result or <b>FALSE</b> on failure. */ - public static function formatObject($object, $format = null, $locale = null) { } + public static function formatObject($datetime, $format = null, string|null $locale = null): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Parse string to a timestamp value * @link https://php.net/manual/en/intldateformatter.parse.php - * @param string $value <p> + * @param string $string <p> * string to convert to a time * </p> - * @param int $position [optional] <p> + * @param int &$offset [optional] <p> * Position at which to start the parsing in $value (zero-based). * If no error occurs before $value is consumed, $parse_pos will contain -1 * otherwise it will contain the position at which parsing ended (and the error occurred). * This variable will contain the end position if the parse fails. * If $parse_pos > strlen($value), the parse fails immediately. * </p> - * @return int timestamp parsed value + * @return int|float|false timestamp parsed value */ - public function parse($value, &$position = null) { } + public function parse(string $string, &$offset = null): int|float|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Parse string to a field-based time value * @link https://php.net/manual/en/intldateformatter.localtime.php - * @param string $value <p> + * @param string $string <p> * string to convert to a time * </p> - * @param int $position [optional] <p> + * @param int &$offset [optional] <p> * Position at which to start the parsing in $value (zero-based). * If no error occurs before $value is consumed, $parse_pos will contain -1 * otherwise it will contain the position at which parsing ended . * If $parse_pos > strlen($value), the parse fails immediately. * </p> - * @return array Localtime compatible array of integers : contains 24 hour clock value in tm_hour field + * @return array|false Localtime compatible array of integers : contains 24 hour clock value in tm_hour field */ - public function localtime($value, &$position = null) { } + public function localtime(string $string, &$offset = null): array|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1968,7 +2090,7 @@ class IntlDateFormatter { * @link https://php.net/manual/en/intldateformatter.geterrorcode.php * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR. */ - public function getErrorCode() { } + public function getErrorCode(): int {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -1976,17 +2098,27 @@ class IntlDateFormatter { * @link https://php.net/manual/en/intldateformatter.geterrormessage.php * @return string Description of the last error. */ - public function getErrorMessage() { } -} + public function getErrorMessage(): string {} -class ResourceBundle implements IteratorAggregate { + /** + * @since 8.4 + */ + public function parseToCalendar(string $string, &$offset = null): int|float|false {} +} +class ResourceBundle implements IteratorAggregate, Countable +{ /** - * @param $locale - * @param $bundlename - * @param $fallback [optional] + * @link https://www.php.net/manual/en/resourcebundle.create.php + * @param string $locale <p>Locale for which the resources should be loaded (locale name, e.g. en_CA).</p> + * @param string $bundle <p>The directory where the data is stored or the name of the .dat file.</p> + * @param bool $fallback [optional] <p>Whether locale should match exactly or fallback to parent locale is allowed.</p> */ - public function __construct($locale, $bundlename, $fallback) { } + public function __construct( + string|null $locale, + string|null $bundle, + bool $fallback = true + ) {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> @@ -1995,15 +2127,19 @@ class ResourceBundle implements IteratorAggregate { * @param string $locale <p> * Locale for which the resources should be loaded (locale name, e.g. en_CA). * </p> - * @param string $bundlename <p> + * @param string $bundle <p> * The directory where the data is stored or the name of the .dat file. * </p> * @param bool $fallback [optional] <p> * Whether locale should match exactly or fallback to parent locale is allowed. * </p> - * @return ResourceBundle|false <b>ResourceBundle</b> object or <b>FALSE</b> on error. + * @return ResourceBundle|null <b>ResourceBundle</b> object or <b>null</b> on error. */ - public static function create($locale, $bundlename, $fallback = null) { } + public static function create( + string|null $locale, + string|null $bundle, + bool $fallback = true + ): ?ResourceBundle {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> @@ -2012,31 +2148,32 @@ class ResourceBundle implements IteratorAggregate { * @param string|int $index <p> * Data index, must be string or integer. * </p> + * @param bool $fallback * @return mixed the data located at the index or <b>NULL</b> on error. Strings, integers and binary data strings * are returned as corresponding PHP types, integer array is returned as PHP array. Complex types are * returned as <b>ResourceBundle</b> object. */ - public function get($index) { } + public function get($index, bool $fallback = true): mixed {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> * Get number of elements in the bundle * @link https://php.net/manual/en/resourcebundle.count.php - * @return int number of elements in the bundle. + * @return int<0,max> number of elements in the bundle. */ - public function count() { } + public function count(): int {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> * Get supported locales * @link https://php.net/manual/en/resourcebundle.locales.php - * @param string $bundlename <p> + * @param string $bundle <p> * Path of ResourceBundle for which to get available locales, or * empty string for default locales list. * </p> - * @return array the list of locales supported by the bundle. + * @return array|false the list of locales supported by the bundle. */ - public static function getLocales($bundlename) { } + public static function getLocales(string $bundle): array|false {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> @@ -2044,7 +2181,7 @@ class ResourceBundle implements IteratorAggregate { * @link https://php.net/manual/en/resourcebundle.geterrorcode.php * @return int error code from last bundle object call. */ - public function getErrorCode() { } + public function getErrorCode(): int {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> @@ -2052,30 +2189,34 @@ class ResourceBundle implements IteratorAggregate { * @link https://php.net/manual/en/resourcebundle.geterrormessage.php * @return string error message from last bundle object's call. */ - public function getErrorMessage() { } + public function getErrorMessage(): string {} /** + * @return Iterator * @since 8.0 */ - public function getIterator(){} + public function getIterator(): Iterator {} } /** * @since 5.4 */ -class Transliterator { - const FORWARD = 0; - const REVERSE = 1; - - public $id; +class Transliterator +{ + public const FORWARD = 0; + public const REVERSE = 1; + /** + * Starting 8.2 $id is readonly to unlock subclassing it + */ + public string $id; /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Private constructor to deny instantiation * @link https://php.net/manual/en/transliterator.construct.php */ - final private function __construct() { } + final private function __construct() {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> @@ -2086,14 +2227,17 @@ class Transliterator { * </p> * @param int $direction [optional] <p> * The direction, defaults to - * >Transliterator::FORWARD. + * Transliterator::FORWARD. * May also be set to * Transliterator::REVERSE. * </p> - * @return Transliterator a <b>Transliterator</b> object on success, + * @return Transliterator|null a <b>Transliterator</b> object on success, * or <b>NULL</b> on failure. */ - public static function create($id, $direction = null) { } + public static function create( + string $id, + int $direction = 0 + ): ?Transliterator {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> @@ -2102,40 +2246,43 @@ class Transliterator { * @param string $rules <p> * The rules. * </p> - * @param string $direction [optional] <p> + * @param int $direction [optional] <p> * The direction, defaults to - * >Transliterator::FORWARD. + * {@see Transliterator::FORWARD}. * May also be set to - * Transliterator::REVERSE. + * {@see Transliterator::REVERSE}. * </p> - * @return Transliterator a <b>Transliterator</b> object on success, + * @return Transliterator|null a <b>Transliterator</b> object on success, * or <b>NULL</b> on failure. */ - public static function createFromRules($rules, $direction = null) { } + public static function createFromRules( + string $rules, + int $direction = 0 + ): ?Transliterator {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Create an inverse transliterator * @link https://php.net/manual/en/transliterator.createinverse.php - * @return Transliterator a <b>Transliterator</b> object on success, + * @return Transliterator|null a <b>Transliterator</b> object on success, * or <b>NULL</b> on failure */ - public function createInverse() { } + public function createInverse(): ?Transliterator {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Get transliterator IDs * @link https://php.net/manual/en/transliterator.listids.php - * @return array An array of registered transliterator IDs on success, + * @return array|false An array of registered transliterator IDs on success, * or <b>FALSE</b> on failure. */ - public static function listIDs() { } + public static function listIDs(): array|false {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Transliterate a string * @link https://php.net/manual/en/transliterator.transliterate.php - * @param string $subject <p> + * @param string $string <p> * The string to be transformed. * </p> * @param int $start [optional] <p> @@ -2150,240 +2297,308 @@ class Transliterator { * </p> * @return string|false The transfomed string on success, or <b>FALSE</b> on failure. */ - public function transliterate($subject, $start = null, $end = null) { } + public function transliterate( + string $string, + int $start = 0, + int $end = -1 + ): string|false {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Get last error code * @link https://php.net/manual/en/transliterator.geterrorcode.php - * @return int The error code on success, + * @return int|false The error code on success, * or <b>FALSE</b> if none exists, or on failure. */ - public function getErrorCode() { } + public function getErrorCode(): int|false {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Get last error message * @link https://php.net/manual/en/transliterator.geterrormessage.php - * @return string The error code on success, + * @return string|false The error code on success, * or <b>FALSE</b> if none exists, or on failure. */ - public function getErrorMessage() { } + public function getErrorMessage(): string|false {} } /** * @link https://php.net/manual/en/class.spoofchecker.php */ -class Spoofchecker { - const SINGLE_SCRIPT_CONFUSABLE = 1; - const MIXED_SCRIPT_CONFUSABLE = 2; - const WHOLE_SCRIPT_CONFUSABLE = 4; - const ANY_CASE = 8; - const SINGLE_SCRIPT = 16; - const INVISIBLE = 32; - const CHAR_LIMIT = 64; +class Spoofchecker +{ + public const SINGLE_SCRIPT_CONFUSABLE = 1; + public const MIXED_SCRIPT_CONFUSABLE = 2; + public const WHOLE_SCRIPT_CONFUSABLE = 4; + public const ANY_CASE = 8; + public const SINGLE_SCRIPT = 16; + public const INVISIBLE = 32; + public const CHAR_LIMIT = 64; + public const ASCII = 268435456; + public const HIGHLY_RESTRICTIVE = 805306368; + public const MODERATELY_RESTRICTIVE = 1073741824; + public const MINIMALLY_RESTRICTIVE = 1342177280; + public const UNRESTRICTIVE = 1610612736; + public const SINGLE_SCRIPT_RESTRICTIVE = 536870912; + public const MIXED_NUMBERS = 1; + public const HIDDEN_OVERLAY = 2; + + /** + * @since 8.4 + */ + public const IGNORE_SPACE = 1; + /** + * @since 8.4 + */ + public const CASE_INSENSITIVE = 2; + + /** + * @since 8.4 + */ + public const ADD_CASE_MAPPINGS = 4; + + /** + * @since 8.4 + */ + public const SIMPLE_CASE_INSENSITIVE = 6; /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Constructor * @link https://php.net/manual/en/spoofchecker.construct.php */ - public function __construct() { } + public function __construct() {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Checks if a given text contains any suspicious characters * @link https://php.net/manual/en/spoofchecker.issuspicious.php - * @param string $text <p> + * @param string $string <p> * </p> - * @param string $error [optional] <p> + * @param string &$errorCode [optional] <p> * </p> * @return bool */ - public function isSuspicious($text, &$error = null) { } + public function isSuspicious(string $string, &$errorCode = null): bool {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Checks if a given text contains any confusable characters * @link https://php.net/manual/en/spoofchecker.areconfusable.php - * @param string $s1 <p> + * @param string $string1 <p> * </p> - * @param string $s2 <p> + * @param string $string2 <p> * </p> - * @param string $error [optional] <p> + * @param int &$errorCode [optional] <p> * </p> * @return bool */ - public function areConfusable($s1, $s2, &$error = null) { } + public function areConfusable( + string $string1, + string $string2, + &$errorCode = null + ): bool {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Locales to use when running checks * @link https://php.net/manual/en/spoofchecker.setallowedlocales.php - * @param string $locale_list <p> + * @param string $locales <p> * </p> * @return void */ - public function setAllowedLocales($locale_list) { } + public function setAllowedLocales(string $locales): void {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Set the checks to run * @link https://php.net/manual/en/spoofchecker.setchecks.php - * @param string $checks <p> + * @param int $checks <p> * </p> * @return void */ - public function setChecks($checks) { } + public function setChecks(int $checks): void {} + + /** + * @param int $level + */ + public function setRestrictionLevel(int $level): void {} + + /** + * @since 8.4 + */ + public function setAllowedChars(string $pattern, int $patternOptions = 0): void {} } /** * @since 5.5 */ -class IntlGregorianCalendar extends IntlCalendar { +class IntlGregorianCalendar extends IntlCalendar +{ + /** + * @link https://www.php.net/manual/en/intlgregoriancalendar.construct + * @param int $timezoneOrYear [optional] + * @param int $localeOrMonth [optional] + * @param int $day [optional] + * @param int $hour [optional] + * @param int $minute [optional] + * @param int $second [optional] + */ + public function __construct($timezoneOrYear, $localeOrMonth, $day, $hour, $minute, $second) {} + /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * @param mixed $timeZone * @param string $locale * @return IntlGregorianCalendar */ - public static function createInstance($timeZone = null, $locale = null) { } + public static function createInstance($timeZone = null, $locale = null) {} /** - * @param double $change - * + * @param float $timestamp */ - public function setGregorianChange($change) { } + public function setGregorianChange(float $timestamp): bool {} /** - * @return double $change + * @return float */ - public function getGregorianChange() { } + public function getGregorianChange(): float {} /** * @param int $year * @return bool */ - public function isLeapYear($year) { } + public function isLeapYear(int $year): bool {} + + /** + * @since 8.3 + */ + public static function createFromDate(int $year, int $month, int $dayOfMonth): static {} + + /** + * @since 8.3 + */ + public static function createFromDateTime(int $year, int $month, int $dayOfMonth, int $hour, int $minute, ?int $second = null): static {} } /** * @since 5.5 */ -class IntlCalendar { +class IntlCalendar +{ /* Constants */ - const FIELD_ERA = 0; - const FIELD_YEAR = 1; - const FIELD_MONTH = 2; - const FIELD_WEEK_OF_YEAR = 3; - const FIELD_WEEK_OF_MONTH = 4; - const FIELD_DATE = 5; - const FIELD_DAY_OF_YEAR = 6; - const FIELD_DAY_OF_WEEK = 7; - const FIELD_DAY_OF_WEEK_IN_MONTH = 8; - const FIELD_AM_PM = 9; - const FIELD_HOUR = 10; - const FIELD_HOUR_OF_DAY = 11; - const FIELD_MINUTE = 12; - const FIELD_SECOND = 13; - const FIELD_MILLISECOND = 14; - const FIELD_ZONE_OFFSET = 15; - const FIELD_DST_OFFSET = 16; - const FIELD_YEAR_WOY = 17; - const FIELD_DOW_LOCAL = 18; - const FIELD_EXTENDED_YEAR = 19; - const FIELD_JULIAN_DAY = 20; - const FIELD_MILLISECONDS_IN_DAY = 21; - const FIELD_IS_LEAP_MONTH = 22; - const FIELD_FIELD_COUNT = 23; - const FIELD_DAY_OF_MONTH = 5; - const DOW_SUNDAY = 1; - const DOW_MONDAY = 2; - const DOW_TUESDAY = 3; - const DOW_WEDNESDAY = 4; - const DOW_THURSDAY = 5; - const DOW_FRIDAY = 6; - const DOW_SATURDAY = 7; - const DOW_TYPE_WEEKDAY = 0; - const DOW_TYPE_WEEKEND = 1; - const DOW_TYPE_WEEKEND_OFFSET = 2; - const DOW_TYPE_WEEKEND_CEASE = 3; - const WALLTIME_FIRST = 1; - const WALLTIME_LAST = 0; - const WALLTIME_NEXT_VALID = 2; + public const FIELD_ERA = 0; + public const FIELD_YEAR = 1; + public const FIELD_MONTH = 2; + public const FIELD_WEEK_OF_YEAR = 3; + public const FIELD_WEEK_OF_MONTH = 4; + public const FIELD_DATE = 5; + public const FIELD_DAY_OF_YEAR = 6; + public const FIELD_DAY_OF_WEEK = 7; + public const FIELD_DAY_OF_WEEK_IN_MONTH = 8; + public const FIELD_AM_PM = 9; + public const FIELD_HOUR = 10; + public const FIELD_HOUR_OF_DAY = 11; + public const FIELD_MINUTE = 12; + public const FIELD_SECOND = 13; + public const FIELD_MILLISECOND = 14; + public const FIELD_ZONE_OFFSET = 15; + public const FIELD_DST_OFFSET = 16; + public const FIELD_YEAR_WOY = 17; + public const FIELD_DOW_LOCAL = 18; + public const FIELD_EXTENDED_YEAR = 19; + public const FIELD_JULIAN_DAY = 20; + public const FIELD_MILLISECONDS_IN_DAY = 21; + public const FIELD_IS_LEAP_MONTH = 22; + public const FIELD_FIELD_COUNT = 23; + public const FIELD_DAY_OF_MONTH = 5; + public const DOW_SUNDAY = 1; + public const DOW_MONDAY = 2; + public const DOW_TUESDAY = 3; + public const DOW_WEDNESDAY = 4; + public const DOW_THURSDAY = 5; + public const DOW_FRIDAY = 6; + public const DOW_SATURDAY = 7; + public const DOW_TYPE_WEEKDAY = 0; + public const DOW_TYPE_WEEKEND = 1; + public const DOW_TYPE_WEEKEND_OFFSET = 2; + public const DOW_TYPE_WEEKEND_CEASE = 3; + public const WALLTIME_FIRST = 1; + public const WALLTIME_LAST = 0; + public const WALLTIME_NEXT_VALID = 2; /* Methods */ /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Add a (signed) amount of time to a field - * @link https://www.php.net/manual/en/intlcalendar.add.php + * @link https://secure.php.net/manual/en/intlcalendar.add.php * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. * These are integer values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @param int $amount <p>The signed amount to add to the current field. If the amount is positive, the instant will be moved forward; if it is negative, the instant wil be moved into the past. The unit is implicit to the field type. + * @param int $value <p>The signed amount to add to the current field. If the amount is positive, the instant will be moved forward; if it is negative, the instant wil be moved into the past. The unit is implicit to the field type. * For instance, hours for <b>IntlCalendar::FIELD_HOUR_OF_DAY</b>.</p> * @return bool Returns TRUE on success or FALSE on failure. */ - public function add($field, $amount) { } + public function add( + int $field, + int $value + ): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether this object's time is after that of the passed object - * https://www.php.net/manual/en/intlcalendar.after.php - * @param IntlCalendar $calendar <p>The calendar whose time will be checked against this object's time.</p> + * https://secure.php.net/manual/en/intlcalendar.after.php + * @param IntlCalendar $other <p>The calendar whose time will be checked against this object's time.</p> * @return bool * Returns <b>TRUE</b> if this object's current time is after that of the * <em>calendar</em> argument's time. Returns <b>FALSE</b> otherwise. - * Also returns <b>FALSE</b> on failure. You can use {@link https://www.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or - * {@link https://www.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions. + * Also returns <b>FALSE</b> on failure. You can use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or + * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions. */ - public function after(IntlCalendar $calendar) { } + public function after(IntlCalendar $other): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether this object's time is before that of the passed object - * @link https://www.php.net/manual/en/intlcalendar.before.php - * @param IntlCalendar $calendar <p> The calendar whose time will be checked against this object's time.</p> + * @link https://secure.php.net/manual/en/intlcalendar.before.php + * @param IntlCalendar $other <p> The calendar whose time will be checked against this object's time.</p> * @return bool * Returns <b>TRUE</B> if this object's current time is before that of the * <em>calendar</em> argument's time. Returns <b>FALSE</b> otherwise. - * Also returns <b>FALSE</b> on failure. You can use {@link https://www.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or - * {@link https://www.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions. - * </p> + * Also returns <b>FALSE</b> on failure. You can use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or + * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions. */ - public function before(IntlCalendar $calendar) { } + public function before(IntlCalendar $other): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Clear a field or all fields - * @link https://www.php.net/manual/en/intlcalendar.clear.php + * @link https://secure.php.net/manual/en/intlcalendar.clear.php * @param int $field [optional] <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. Failure can only occur is invalid arguments are provided. */ - public function clear($field = null) { } + public function clear(int|null $field = null): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Private constructor for disallowing instantiation - * @link https://www.php.net/manual/en/intlcalendar.construct.php - * + * @link https://secure.php.net/manual/en/intlcalendar.construct.php */ - private function __construct() { } - + private function __construct() {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Create a new IntlCalendar - * @link https://www.php.net/manual/en/intlcalendar.createinstance.php - * @param mixed $timeZone [optional] <p> <p> + * @link https://secure.php.net/manual/en/intlcalendar.createinstance.php + * @param mixed $timezone [optional] <p> <p> * The timezone to use. * </p> * @@ -2391,61 +2606,61 @@ class IntlCalendar { * <li> * <p> * <b>NULL</b>, in which case the default timezone will be used, as specified in - * the ini setting {@link https://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or - * through the function {@link https://www.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as - * returned by {@link https://www.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}. + * the ini setting {@link https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or + * through the function {@link https://secure.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as + * returned by {@link https://secure.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}. * </p> * </li> * <li> * <p> - * An {@link https://www.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly. + * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly. * </p> * </li> * <li> * <p> - * A {@link https://www.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted + * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted * and an ICU timezone object will be created; the timezone will be backed * by ICU's database, not PHP's. * </p> * </li> * <li> * <p> - * A {@link https://www.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier. + * A {@link https://secure.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier. * See <b>IntlTimeZone::createTimeZoneIDEnumeration()</b>. Raw * offsets such as <em>"GMT+08:30"</em> are also accepted. * </p> * </li> * </ul> * </p> - * @param string $locale [optional] <p> - * A locale to use or <b>NULL</b> to use {@link https://www.php.net/manual/en/intl.configuration.php#ini.intl.default-locale the default locale}. + * @param string|null $locale [optional] <p> + * A locale to use or <b>NULL</b> to use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.default-locale the default locale}. * </p> - * @return IntlCalendar - * The created {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} instance or <b>NULL</b> on + * @return IntlCalendar|null + * The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} instance or <b>NULL</b> on * failure. */ - public static function createInstance($timeZone = null, $locale = null) { } + public static function createInstance($timezone = null, string|null $locale = null): ?IntlCalendar {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Compare time of two IntlCalendar objects for equality - * @link https://www.php.net/manual/en/intlcalendar.equals.php - * @param IntlCalendar $calendar + * @link https://secure.php.net/manual/en/intlcalendar.equals.php + * @param IntlCalendar $other * @return bool <p> * Returns <b>TRUE</b> if the current time of both this and the passed in - * {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} object are the same, or <b>FALSE</b> + * {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} object are the same, or <b>FALSE</b> * otherwise. The value <b>FALSE</b> can also be returned on failure. This can only * happen if bad arguments are passed in. In any case, the two cases can be - * distinguished by calling {@link https://www.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()}. + * distinguished by calling {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()}. * </p> */ - public function equals($calendar) { } + public function equals(IntlCalendar $other): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Calculate difference between given time and this object's time - * @link https://www.php.net/manual/en/intlcalendar.fielddifference.php - * @param float $when <p> + * @link https://secure.php.net/manual/en/intlcalendar.fielddifference.php + * @param float $timestamp <p> * The time against which to compare the quantity represented by the * <em>field</em>. For the result to be positive, the time * given for this parameter must be ahead of the time of the object the @@ -2456,82 +2671,87 @@ class IntlCalendar { * </p> * * <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @return int Returns a (signed) difference of time in the unit associated with the + * @return int|false Returns a (signed) difference of time in the unit associated with the * specified field or <b>FALSE</b> on failure. - * */ - public function fieldDifference($when, $field) { } + public function fieldDifference( + float $timestamp, + int $field + ): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a2)<br/> * Create an IntlCalendar from a DateTime object or string - * @link https://www.php.net/manual/en/intlcalendar.fromdatetime.php - * @param mixed $dateTime <p> - * A {@link https://www.php.net/manual/en/class.datetime.php DateTime} object or a {@link https://www.php.net/manual/en/language.types.string.php string} that - * can be passed to {@link https://www.php.net/manual/en/datetime.construct.php DateTime::__construct()}. + * @link https://secure.php.net/manual/en/intlcalendar.fromdatetime.php + * @param mixed $datetime <p> + * A {@link https://secure.php.net/manual/en/class.datetime.php DateTime} object or a {@link https://secure.php.net/manual/en/language.types.string.php string} that + * can be passed to {@link https://secure.php.net/manual/en/datetime.construct.php DateTime::__construct()}. * </p> - * @return IntlCalendar - * The created {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} object or <b>NULL</b> in case of - * failure. If a {@link https://www.php.net/manual/en/language.types.string.php string} is passed, any exception that occurs - * inside the {@link https://www.php.net/manual/en/class.datetime.php DateTime} constructor is propagated. + * @param $locale [optional] + * @return IntlCalendar|null + * The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} object or <b>NULL</b> in case of + * failure. If a {@link https://secure.php.net/manual/en/language.types.string.php string} is passed, any exception that occurs + * inside the {@link https://secure.php.net/manual/en/class.datetime.php DateTime} constructor is propagated. */ - public static function fromDateTime($dateTime) { } + public static function fromDateTime( + DateTime|string $datetime, + string|null $locale + ): ?IntlCalendar {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the value for a field - * @link https://www.php.net/manual/en/intlcalendar.get.php + * @link https://secure.php.net/manual/en/intlcalendar.get.php * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @return int An integer with the value of the time field. + * @return int|false An integer with the value of the time field. */ - public function get($field) { } + public function get(int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * The maximum value for a field, considering the object's current time - * @link https://www.php.net/manual/en/intlcalendar.getactualmaximum.php + * @link https://secure.php.net/manual/en/intlcalendar.getactualmaximum.php * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @return int - * An {@link https://www.php.net/manual/en/language.types.integer.php int} representing the maximum value in the units associated + * @return int|false + * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing the maximum value in the units associated * with the given <em>field</em> or <b>FALSE</b> on failure. */ - public function getActualMaximum($field) { } + public function getActualMaximum(int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * The minimum value for a field, considering the object's current time - * @link https://www.php.net/manual/en/intlcalendar.getactualminimum.php + * @link https://secure.php.net/manual/en/intlcalendar.getactualminimum.php * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. * These are integer values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @return int - * An {@link https://www.php.net/manual/en/language.types.integer.php int} representing the minimum value in the field's + * @return int|false + * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing the minimum value in the field's * unit or <b>FALSE</b> on failure. */ - public function getActualMinimum($field) { } + public function getActualMinimum(int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get array of locales for which there is data - * @link https://www.php.net/manual/en/intlcalendar.getavailablelocales.php - * @return array An array of strings, one for which locale. + * @link https://secure.php.net/manual/en/intlcalendar.getavailablelocales.php + * @return string[] An array of strings, one for which locale. */ - - public static function getAvailableLocales() { } + public static function getAvailableLocales(): array {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> @@ -2541,98 +2761,98 @@ class IntlCalendar { * <b>IntlCalendar::DOW_MONDAY</b>, ..., * <b>IntlCalendar::DOW_SATURDAY</b>. * </p> - * @return int + * @return int|false * Returns one of the constants * <b>IntlCalendar::DOW_TYPE_WEEKDAY</b>, * <b>IntlCalendar::DOW_TYPE_WEEKEND</b>, * <b>IntlCalendar::DOW_TYPE_WEEKEND_OFFSET</b> or * <b>IntlCalendar::DOW_TYPE_WEEKEND_CEASE</b> or <b>FALSE</b> on failure. - * */ - public function getDayOfWeekType($dayOfWeek) { } + public function getDayOfWeekType(int $dayOfWeek): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get last error code on the object - * @link https://www.php.net/manual/en/intlcalendar.geterrorcode.php - * @return int An ICU error code indicating either success, failure or a warning. - * + * @link https://secure.php.net/manual/en/intlcalendar.geterrorcode.php + * @return int|false An ICU error code indicating either success, failure or a warning. */ - public function getErrorCode() { } + public function getErrorCode(): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get last error message on the object - * @link https://www.php.net/manual/en/intlcalendar.geterrormessage.php - * @return string The error message associated with last error that occurred in a function call on this object, or a string indicating the non-existance of an error. + * @link https://secure.php.net/manual/en/intlcalendar.geterrormessage.php + * @return string|false The error message associated with last error that occurred in a function call on this object, or a string indicating the non-existance of an error. */ - public function getErrorMessage() { } + public function getErrorMessage(): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the first day of the week for the calendar's locale - * @link https://www.php.net/manual/en/intlcalendar.getfirstdayofweek.php - * @return int + * @link https://secure.php.net/manual/en/intlcalendar.getfirstdayofweek.php + * @return int|false * One of the constants <b>IntlCalendar::DOW_SUNDAY</b>, * <b>IntlCalendar::DOW_MONDAY</b>, ..., * <b>IntlCalendar::DOW_SATURDAY</b> or <b>FALSE</b> on failure. - * */ - public function getFirstDayOfWeek() { } + public function getFirstDayOfWeek(): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the largest local minimum value for a field - * @link https://www.php.net/manual/en/intlcalendar.getgreatestminimum.php - * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * @link https://secure.php.net/manual/en/intlcalendar.getgreatestminimum.php + * @param int $field + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. - * @return int - * An {@link https://www.php.net/manual/en/language.types.integer.php int} representing a field value, in the field's + * @return int|false + * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing a field value, in the field's * unit, or <b>FALSE</b> on failure. */ - public function getGreatestMinimum($field) { } + public function getGreatestMinimum(int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get set of locale keyword values - * @param string $key <p> + * @param string $keyword <p> * The locale keyword for which relevant values are to be queried. Only * <em>'calendar'</em> is supported. * </p> * @param string $locale <p> * The locale onto which the keyword/value pair are to be appended. * </p> - * @param bool $commonlyUsed + * @param bool $onlyCommon * <p> * Whether to show only the values commonly used for the specified locale. * </p> * @return Iterator|false An iterator that yields strings with the locale keyword values or <b>FALSE</b> on failure. */ - public static function getKeywordValuesForLocale($key, $locale, $commonlyUsed) { } + public static function getKeywordValuesForLocale( + string $keyword, + string $locale, + bool $onlyCommon + ): IntlIterator|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the smallest local maximum for a field - * @link https://www.php.net/manual/en/intlcalendar.getleastmaximum.php + * @link https://secure.php.net/manual/en/intlcalendar.getleastmaximum.php * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @return int - * An {@link https://www.php.net/manual/en/language.types.integer.ph int} representing a field value in the field's + * @return int|false + * An {@link https://secure.php.net/manual/en/language.types.integer.ph int} representing a field value in the field's * unit or <b>FALSE</b> on failure. - * </p> */ - public function getLeastMaximum($field) { } + public function getLeastMaximum(int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the locale associated with the object - * @link https://www.php.net/manual/en/intlcalendar.getlocale.php - * @param int $localeType <p> + * @link https://secure.php.net/manual/en/intlcalendar.getlocale.php + * @param int $type <p> * Whether to fetch the actual locale (the locale from which the calendar * data originates, with <b>Locale::ACTUAL_LOCALE</b>) or the * valid locale, i.e., the most specific locale supported by ICU relatively @@ -2640,213 +2860,208 @@ class IntlCalendar { * From the most general to the most specific, the locales are ordered in * this fashion – actual locale, valid locale, requested locale. * </p> - * @return string - * A locale string or <b>FALSE</b> on failure. - * + * @return string|false */ - public function getLocale($localeType) { } + public function getLocale(int $type): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the global maximum value for a field - * @link https://www.php.net/manual/en/intlcalendar.getmaximum.php + * @link https://secure.php.net/manual/en/intlcalendar.getmaximum.php * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @return string - * A locale string or <b>FALSE</b> on failure. + * @return int|false */ - public function getMaximum($field) { } + public function getMaximum(int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get minimal number of days the first week in a year or month can have - * @link https://www.php.net/manual/en/intlcalendar.getminimaldaysinfirstweek.php - * @return int - * An {@link https://www.php.net/manual/en/language.types.integer.php int} representing a number of days or <b>FALSE</b> on failure. + * @link https://secure.php.net/manual/en/intlcalendar.getminimaldaysinfirstweek.php + * @return int|false + * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing a number of days or <b>FALSE</b> on failure. */ - public function getMinimalDaysInFirstWeek() { } + public function getMinimalDaysInFirstWeek(): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the global minimum value for a field - * @link https://www.php.net/manual/en/intlcalendar.getminimum.php + * @link https://secure.php.net/manual/en/intlcalendar.getminimum.php * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @return int + * @return int|false * An int representing a value for the given field in the field's unit or FALSE on failure. */ - public function getMinimum($field) { } + public function getMinimum(int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get number representing the current time * @return float A float representing a number of milliseconds since the epoch, not counting leap seconds. */ - public static function getNow() { } + public static function getNow(): float {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get behavior for handling repeating wall time - * @link https://www.php.net/manual/en/intlcalendar.getrepeatedwalltimeoption.php + * @link https://secure.php.net/manual/en/intlcalendar.getrepeatedwalltimeoption.php * @return int * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b> or * <b>IntlCalendar::WALLTIME_LAST</b>. - * */ - public function getRepeatedWallTimeOption() { } + public function getRepeatedWallTimeOption(): int {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get behavior for handling skipped wall time - * @link https://www.php.net/manual/en/intlcalendar.getskippedwalltimeoption.php + * @link https://secure.php.net/manual/en/intlcalendar.getskippedwalltimeoption.php * @return int * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b>, * <b>IntlCalendar::WALLTIME_LAST</b> or * <b>IntlCalendar::WALLTIME_NEXT_VALID</b>. */ - public function getSkippedWallTimeOption() { } + public function getSkippedWallTimeOption(): int {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get time currently represented by the object - * @return float - * A {@link https://www.php.net/manual/en/language.types.float.php float} representing the number of milliseconds elapsed since the + * @return float|false + * A {@link https://secure.php.net/manual/en/language.types.float.php float} representing the number of milliseconds elapsed since the * reference time (1 Jan 1970 00:00:00 UTC). */ - public function getTime() { } + public function getTime(): float|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the object's timezone - * @link https://www.php.net/manual/en/intlcalendar.gettimezone.php - * @return IntlTimeZone - * An {@link https://www.php.net/manual/en/class.intltimezone.php IntlTimeZone} object corresponding to the one used + * @link https://secure.php.net/manual/en/intlcalendar.gettimezone.php + * @return IntlTimeZone|false + * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone} object corresponding to the one used * internally in this object. */ - public function getTimeZone() { } + public function getTimeZone(): IntlTimeZone|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the calendar type - * @link https://www.php.net/manual/en/intlcalendar.gettype.php + * @link https://secure.php.net/manual/en/intlcalendar.gettype.php * @return string - * A {@link https://www.php.net/manual/en/language.types.string.php string} representing the calendar type, such as + * A {@link https://secure.php.net/manual/en/language.types.string.php string} representing the calendar type, such as * <em>'gregorian'</em>, <em>'islamic'</em>, etc. */ - public function getType() { } + public function getType(): string {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get time of the day at which weekend begins or ends - * @link https://www.php.net/manual/en/intlcalendar.getweekendtransition.php + * @link https://secure.php.net/manual/en/intlcalendar.getweekendtransition.php * @param string $dayOfWeek <p> * One of the constants <b>IntlCalendar::DOW_SUNDAY</b>, * <b>IntlCalendar::DOW_MONDAY</b>, ..., * <b>IntlCalendar::DOW_SATURDAY</b>. * </p> - * @return int + * @return int|false * The number of milliseconds into the day at which the the weekend begins or * ends or <b>FALSE</b> on failure. */ - public function getWeekendTransition($dayOfWeek) { } + public function getWeekendTransition(int $dayOfWeek): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether the object's time is in Daylight Savings Time - * @link https://www.php.net/manual/en/intlcalendar.indaylighttime.php + * @link https://secure.php.net/manual/en/intlcalendar.indaylighttime.php * @return bool * Returns <b>TRUE</b> if the date is in Daylight Savings Time, <b>FALSE</b> otherwise. * The value <b>FALSE</b> may also be returned on failure, for instance after - * specifying invalid field values on non-lenient mode; use {@link https://www.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query - * {@link https://www.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate. + * specifying invalid field values on non-lenient mode; use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query + * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate. */ - public function inDaylightTime() { } + public function inDaylightTime(): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether another calendar is equal but for a different time - * @link https://www.php.net/manual/en/intlcalendar.isequivalentto.php - * @param IntlCalendar $calendar The other calendar against which the comparison is to be made. + * @link https://secure.php.net/manual/en/intlcalendar.isequivalentto.php + * @param IntlCalendar $other The other calendar against which the comparison is to be made. * @return bool * Assuming there are no argument errors, returns <b>TRUE</b> iif the calendars are equivalent except possibly for their set time. */ - public function isEquivalentTo(IntlCalendar $calendar) { } + public function isEquivalentTo(IntlCalendar $other): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether date/time interpretation is in lenient mode - * @link https://www.php.net/manual/en/intlcalendar.islenient.php + * @link https://secure.php.net/manual/en/intlcalendar.islenient.php * @return bool - * A {@link https://www.php.net/manual/en/language.types.boolean.php bool} representing whether the calendar is set to lenient mode. + * A {@link https://secure.php.net/manual/en/language.types.boolean.php bool} representing whether the calendar is set to lenient mode. */ - public function isLenient() { } + public function isLenient(): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether a certain date/time is in the weekend - * @link https://www.php.net/manual/en/intlcalendar.isweekend.php - * @param float|null $date [optional] <p> + * @link https://secure.php.net/manual/en/intlcalendar.isweekend.php + * @param float|null $timestamp [optional] <p> * An optional timestamp representing the number of milliseconds since the * epoch, excluding leap seconds. If <b>NULL</b>, this object's current time is * used instead. * </p> * @return bool - * <p> A {@link https://www.php.net/manual/en/language.types.boolean.php bool} indicating whether the given or this object's time occurs + * <p> A {@link https://secure.php.net/manual/en/language.types.boolean.php bool} indicating whether the given or this object's time occurs * in a weekend. * </p> * <p> * The value <b>FALSE</b> may also be returned on failure, for instance after giving - * a date out of bounds on non-lenient mode; use {@link https://www.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query - * {@link https://www.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.</p> + * a date out of bounds on non-lenient mode; use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query + * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.</p> */ - public function isWeekend($date = null) { } + public function isWeekend(float|null $timestamp = null): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Add value to field without carrying into more significant fields - * @link https://www.php.net/manual/en/intlcalendar.roll.php + * @link https://secure.php.net/manual/en/intlcalendar.roll.php * @param int $field - * <p>One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time - * {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * <p>One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time + * {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @param mixed $amountOrUpOrDown <p> + * @param mixed $value <p> * The (signed) amount to add to the field, <b>TRUE</b> for rolling up (adding * <em>1</em>), or <b>FALSE</b> for rolling down (subtracting * <em>1</em>). * </p> * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. */ - public function roll($field, $amountOrUpOrDown) { } - + public function roll(int $field, $value): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether a field is set - * @link https://www.php.net/manual/en/intlcalendar.isset.php + * @link https://secure.php.net/manual/en/intlcalendar.isset.php * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time - * {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time + * {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. * These are integer values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> * @return bool Assuming there are no argument errors, returns <b>TRUE</b> iif the field is set. */ - public function PS_UNRESERVE_PREFIX_isSet($field) { } + public function PS_UNRESERVE_PREFIX_isSet(int $field): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set a time field or several common fields at once - * @link https://www.php.net/manual/en/intlcalendar.set.php + * @link https://secure.php.net/manual/en/intlcalendar.set.php * @param int $year <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> @@ -2869,26 +3084,26 @@ class IntlCalendar { * </p> * @param int $second [optional] <p> * The new value for <b>IntlCalendar::FIELD_SECOND</b>. - *</p> + * </p> * @return bool Returns <b>TRUE</b> on success and <b>FALSE</b> on failure. */ - public function set($year, $month, $dayOfMonth = null, $hour = null, $minute = null, $second = null) { } + public function set($year, $month, $dayOfMonth = null, $hour = null, $minute = null, $second = null) {} /** - * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> + * (PHP 5 >= 5.5.0 PECL intl >= 3.0.0a1)<br/> * Set a time field or several common fields at once - * @link https://www.php.net/manual/en/intlcalendar.set.php + * @link https://secure.php.net/manual/en/intlcalendar.set.php * @param int $field One of the IntlCalendar date/time field constants. These are integer values between 0 and IntlCalendar::FIELD_COUNT. * @param int $value The new value of the given field. * @return bool Returns <b>TRUE</b> on success and <b>FALSE</b> on failure. * @since 5.5 */ - public function set($field, $value) { } + public function set($field, $value) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set the day on which the week is deemed to start - * @link https://www.php.net/manual/en/intlcalendar.setfirstdayofweek.php + * @link https://secure.php.net/manual/en/intlcalendar.setfirstdayofweek.php * @param int $dayOfWeek <p> * One of the constants <b>IntlCalendar::DOW_SUNDAY</b>, * <b>IntlCalendar::DOW_MONDAY</b>, ..., @@ -2896,38 +3111,37 @@ class IntlCalendar { * </p> * @return bool Returns TRUE on success. Failure can only happen due to invalid parameters. */ - public function setFirstDayOfWeek($dayOfWeek) { } + public function setFirstDayOfWeek(int $dayOfWeek): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set whether date/time interpretation is to be lenient - * @link https://www.php.net/manual/en/intlcalendar.setlenient.php - * @param string $isLenient <p> + * @link https://secure.php.net/manual/en/intlcalendar.setlenient.php + * @param bool $lenient <p> * Use <b>TRUE</b> to activate the lenient mode; <b>FALSE</b> otherwise. * </p> * @return bool Returns <b>TRUE</b> on success. Failure can only happen due to invalid parameters. */ - public function setLenient($isLenient) { } + public function setLenient(bool $lenient): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set behavior for handling repeating wall times at negative timezone offset transitions - * @link https://www.php.net/manual/en/intlcalendar.setrepeatedwalltimeoption.php - * @param int $wallTimeOption <p> + * @link https://secure.php.net/manual/en/intlcalendar.setrepeatedwalltimeoption.php + * @param int $option <p> * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b> or * <b>IntlCalendar::WALLTIME_LAST</b>. * </p> * @return bool * Returns <b>TRUE</b> on success. Failure can only happen due to invalid parameters. - * */ - public function setRepeatedWallTimeOption($wallTimeOption) { } + public function setRepeatedWallTimeOption(int $option): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set behavior for handling skipped wall times at positive timezone offset transitions - * @link https://www.php.net/manual/en/intlcalendar.setskippedwalltimeoption.php - * @param int $wallTimeOption <p> + * @link https://secure.php.net/manual/en/intlcalendar.setskippedwalltimeoption.php + * @param int $option <p> * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b>, * <b>IntlCalendar::WALLTIME_LAST</b> or * <b>IntlCalendar::WALLTIME_NEXT_VALID</b>. @@ -2937,26 +3151,26 @@ class IntlCalendar { * Returns <b>TRUE</b> on success. Failure can only happen due to invalid parameters. * </p> */ - public function setSkippedWallTimeOption($wallTimeOption) { } + public function setSkippedWallTimeOption(int $option): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set the calendar time in milliseconds since the epoch - * @link https://www.php.net/manual/en/intlcalendar.settime.php - * @param float $date <p> + * @link https://secure.php.net/manual/en/intlcalendar.settime.php + * @param float $timestamp <p> * An instant represented by the number of number of milliseconds between * such instant and the epoch, ignoring leap seconds. * </p> * @return bool * Returns <b>TRUE</b> on success and <b>FALSE</b> on failure. */ - public function setTime($date) { } + public function setTime(float $timestamp): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set the timezone used by this calendar - * @link https://www.php.net/manual/en/intlcalendar.settimezone.php - * @param mixed $timeZone <p> + * @link https://secure.php.net/manual/en/intlcalendar.settimezone.php + * @param mixed $timezone <p> * The new timezone to be used by this calendar. It can be specified in the * following ways: * @@ -2964,26 +3178,26 @@ class IntlCalendar { * <li> * <p> * <b>NULL</b>, in which case the default timezone will be used, as specified in - * the ini setting {@link https://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or - * through the function {@link https://www.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as - * returned by {@link https://www.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}. + * the ini setting {@link https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or + * through the function {@link https://secure.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as + * returned by {@link https://secure.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}. * </p> * </li> * <li> * <p> - * An {@link https://www.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly. + * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly. * </p> * </li> * <li> * <p> - * A {@link https://www.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted + * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted * and an ICU timezone object will be created; the timezone will be backed * by ICU's database, not PHP's. * </p> * </li> * <li> * <p> - * A {@link https://www.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier. + * A {@link https://secure.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier. * See b>IntlTimeZone::createTimeZoneIDEnumeration()</b>. Raw * offsets such as <em>"GMT+08:30"</em> are also accepted. * </p> @@ -2991,183 +3205,221 @@ class IntlCalendar { * </ul> * @return bool Returns <b>TRUE</b> on success and <b>FALSE</b> on failure. */ - public function setTimeZone($timeZone) { } + public function setTimeZone($timezone): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a2)<br/> * Convert an IntlCalendar into a DateTime object - * @link https://www.php.net/manual/en/intlcalendar.todatetime.php + * @link https://secure.php.net/manual/en/intlcalendar.todatetime.php * @return DateTime|false - * A {@link https://www.php.net/manual/en/class.datetime.php DateTime} object with the same timezone as this + * A {@link https://secure.php.net/manual/en/class.datetime.php DateTime} object with the same timezone as this * object (though using PHP's database instead of ICU's) and the same time, * except for the smaller precision (second precision instead of millisecond). * Returns <b>FALSE</b> on failure. */ - public function toDateTime() { } + public function toDateTime(): DateTime|false {} + + /** + * @link https://www.php.net/manual/en/intlcalendar.setminimaldaysinfirstweek.php + * @param int $days + * @return bool + */ + public function setMinimalDaysInFirstWeek(int $days): bool {} + + /** + * @since 8.3 + */ + public function setDate(int $year, int $month, int $dayOfMonth): void {} + + /** + * @since 8.3 + */ + public function setDateTime(int $year, int $month, int $dayOfMonth, int $hour, int $minute, ?int $second = null): void {} } /** * @since 5.5 */ -class IntlIterator implements Iterator { - - public function current() { } +class IntlIterator implements Iterator +{ + public function current(): mixed {} - public function key() { } + public function key(): mixed {} - public function next() { } + public function next(): void {} - public function rewind() { } + public function rewind(): void {} - public function valid() { } + public function valid(): bool {} } /** * @since 5.5 */ -class IntlException extends Exception { - -} +class IntlException extends Exception {} /** * @since 5.5 */ -class IntlTimeZone { +class IntlTimeZone +{ /* Constants */ - const DISPLAY_SHORT = 1; - const DISPLAY_LONG = 2; + public const DISPLAY_SHORT = 1; + public const DISPLAY_LONG = 2; + public const DISPLAY_SHORT_GENERIC = 3; + public const DISPLAY_LONG_GENERIC = 4; + public const DISPLAY_SHORT_GMT = 5; + public const DISPLAY_LONG_GMT = 6; + public const DISPLAY_SHORT_COMMONLY_USED = 7; + public const DISPLAY_GENERIC_LOCATION = 8; + public const TYPE_ANY = 0; + public const TYPE_CANONICAL = 1; + public const TYPE_CANONICAL_LOCATION = 2; /* Methods */ + private function __construct() {} + /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the number of IDs in the equivalency group that includes the given ID - * @link https://www.php.net/manual/en/intltimezone.countequivalentids.php - * @param string $zoneId + * @link https://secure.php.net/manual/en/intltimezone.countequivalentids.php + * @param string $timezoneId * @return int|false number of IDs or <b>FALSE</b> on failure */ - public static function countEquivalentIDs($zoneId) { } + public static function countEquivalentIDs(string $timezoneId): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Create a new copy of the default timezone for this host - * @link https://www.php.net/manual/en/intltimezone.createdefault.php + * @link https://secure.php.net/manual/en/intltimezone.createdefault.php * @return IntlTimeZone */ - public static function createDefault() { } + public static function createDefault(): IntlTimeZone {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get an enumeration over time zone IDs associated with the given country or offset - * @link https://www.php.net/manual/en/intltimezone.createenumeration.php + * @link https://secure.php.net/manual/en/intltimezone.createenumeration.php * @param mixed $countryOrRawOffset [optional] * @return IntlIterator|false an iterator or <b>FALSE</b> on failure */ - public static function createEnumeration($countryOrRawOffset) { } + public static function createEnumeration($countryOrRawOffset): IntlIterator|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Create a timezone object for the given ID - * @link https://www.php.net/manual/en/intltimezone.createtimezone.php - * @param string $zoneId + * @link https://secure.php.net/manual/en/intltimezone.createtimezone.php + * @param string $timezoneId * @return IntlTimeZone|null a timezone object or <b>NULL</b> on failure */ - public static function createTimeZone($zoneId) { } + public static function createTimeZone(string $timezoneId): ?IntlTimeZone {} /** * (PHP 5 >=5.5.0)<br/> * Get an enumeration over system time zone IDs with the given filter conditions - * @link https://www.php.net/manual/en/intltimezone.createtimezoneidenumeration.php - * @param int $zoneType + * @link https://secure.php.net/manual/en/intltimezone.createtimezoneidenumeration.php + * @param int $type * @param string|null $region [optional] * @param int $rawOffset [optional] * @return IntlIterator|false an iterator or <b>FALSE</b> on failure */ - public static function createTimeZoneIDEnumeration($zoneType, $region = null, $rawOffset = 0) { } + public static function createTimeZoneIDEnumeration( + int $type, + string|null $region = null, + int|null $rawOffset = null + ): IntlIterator|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Create a timezone object from DateTimeZone - * @link https://www.php.net/manual/en/intltimezone.fromdatetimezone.php - * @param DateTimeZone $zoneId + * @link https://secure.php.net/manual/en/intltimezone.fromdatetimezone.php + * @param DateTimeZone $timezone * @return IntlTimeZone|null a timezone object or <b>NULL</b> on failure */ - public static function fromDateTimeZone($zoneId) { } + public static function fromDateTimeZone(DateTimeZone $timezone): ?IntlTimeZone {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID - * @link https://www.php.net/manual/en/intltimezone.getcanonicalid.php - * @param string $zoneId - * @param bool $isSystemID [optional] + * @link https://secure.php.net/manual/en/intltimezone.getcanonicalid.php + * @param string $timezoneId + * @param bool &$isSystemId [optional] * @return string|false the timezone ID or <b>FALSE</b> on failure */ - public static function getCanonicalID($zoneId, &$isSystemID) { } + public static function getCanonicalID(string $timezoneId, &$isSystemId): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get a name of this time zone suitable for presentation to the user - * @param bool $isDaylight [optional] + * @param bool $dst [optional] * @param int $style [optional] * @param string $locale [optional] * @return string|false the timezone name or <b>FALSE</b> on failure */ - public function getDisplayName($isDaylight, $style, $locale) { } + public function getDisplayName( + bool $dst = false, + int $style = 2, + string|null $locale + ): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the amount of time to be added to local standard time to get local wall clock time - * @link https://www.php.net/manual/en/intltimezone.getequivalentid.php + * @link https://secure.php.net/manual/en/intltimezone.getequivalentid.php * @return int */ - public function getDSTSavings() { } + public function getDSTSavings(): int {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get an ID in the equivalency group that includes the given ID - * @link https://www.php.net/manual/en/intltimezone.getequivalentid.php - * @param string $zoneId - * @param int $index + * @link https://secure.php.net/manual/en/intltimezone.getequivalentid.php + * @param string $timezoneId + * @param int $offset * @return string|false the time zone ID or <b>FALSE</b> on failure */ - public static function getEquivalentID($zoneId, $index) { } + public static function getEquivalentID( + string $timezoneId, + int $offset + ): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get last error code on the object - * @link https://www.php.net/manual/en/intltimezone.geterrorcode.php - * @return int + * @link https://secure.php.net/manual/en/intltimezone.geterrorcode.php + * @return int|false */ - public function getErrorCode() { } + public function getErrorCode(): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get last error message on the object - * @link https://www.php.net/manual/en/intltimezone.geterrormessage.php - * @return string + * @link https://secure.php.net/manual/en/intltimezone.geterrormessage.php + * @return string|false */ - public function getErrorMessage() { } + public function getErrorMessage(): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Create GMT (UTC) timezone - * @link https://www.php.net/manual/en/intltimezone.getgmt.php + * @link https://secure.php.net/manual/en/intltimezone.getgmt.php * @return IntlTimeZone */ - public static function getGMT() { } + public static function getGMT(): IntlTimeZone {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get timezone ID - * @return string + * @return string|false */ - public function getID() { } + public function getID(): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the time zone raw and GMT offset for the given moment in time - * @link https://www.php.net/manual/en/intltimezone.getoffset.php - * @param float $date + * @link https://secure.php.net/manual/en/intltimezone.getoffset.php + * @param float $timestamp * moment in time for which to return offsets, in units of milliseconds from * January 1, 1970 0:00 GMT, either GMT time or local wall time, depending on * `local'. @@ -3183,76 +3435,95 @@ class IntlTimeZone { * typically one hour. * @return bool boolean indication of success */ - public function getOffset($date, $local, &$rawOffset, &$dstOffset) { } + public function getOffset( + float $timestamp, + bool $local, + &$rawOffset, + &$dstOffset + ): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the raw GMT offset (before taking daylight savings time into account - * @link https://www.php.net/manual/en/intltimezone.getrawoffset.php + * @link https://secure.php.net/manual/en/intltimezone.getrawoffset.php * @return int */ - public function getRawOffset() { } + public function getRawOffset(): int {} /** * (PHP 5 >=5.5.0)<br/> * Get the region code associated with the given system time zone ID - * @link https://www.php.net/manual/en/intltimezone.getregion.php - * @param string $zoneId + * @link https://secure.php.net/manual/en/intltimezone.getregion.php + * @param string $timezoneId * @return string|false region or <b>FALSE</b> on failure */ - public static function getRegion($zoneId) { } + public static function getRegion(string $timezoneId): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the timezone data version currently used by ICU - * @link https://www.php.net/manual/en/intltimezone.gettzdataversion.php - * @return string + * @link https://secure.php.net/manual/en/intltimezone.gettzdataversion.php + * @return string|false */ - public static function getTZDataVersion() { } + public static function getTZDataVersion(): string|false {} /** * (PHP 5 >=5.5.0)<br/> * Get the "unknown" time zone - * @link https://www.php.net/manual/en/intltimezone.getunknown.php + * @link https://secure.php.net/manual/en/intltimezone.getunknown.php * @return IntlTimeZone */ - public static function getUnknown() { } + public static function getUnknown(): IntlTimeZone {} /** * (PHP 7 >=7.1.0)<br/> * Translates a system timezone (e.g. "America/Los_Angeles") into a Windows * timezone (e.g. "Pacific Standard Time"). - * @link https://www.php.net/manual/en/intltimezone.getwindowsid.php - * @param string $timezone + * @link https://secure.php.net/manual/en/intltimezone.getwindowsid.php + * @param string $timezoneId + * @return string|false the Windows timezone or <b>FALSE</b> on failure + * @since 7.1 + */ + public static function getWindowsID(string $timezoneId): string|false {} + + /** + * @link https://www.php.net/manual/en/intltimezone.getidforwindowsid.php + * @param string $timezoneId + * @param string|null $region * @return string|false the Windows timezone or <b>FALSE</b> on failure * @since 7.1 */ - public static function getWindowsID($timezone) { } + public static function getIDForWindowsID(string $timezoneId, ?string $region = null): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Check if this zone has the same rules and offset as another zone - * @link https://www.php.net/manual/en/intltimezone.hassamerules.php - * @param IntlTimeZone $otherTimeZone + * @link https://secure.php.net/manual/en/intltimezone.hassamerules.php + * @param IntlTimeZone $other * @return bool */ - public function hasSameRules(IntlTimeZone $otherTimeZone) { } + public function hasSameRules(IntlTimeZone $other): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Convert to DateTimeZone object - * @link https://www.php.net/manual/ru/intltimezone.todatetimezone.php + * @link https://secure.php.net/manual/en/intltimezone.todatetimezone.php * @return DateTimeZone|false the DateTimeZone object or <b>FALSE</b> on failure */ - public function toDateTimeZone() { } + public function toDateTimeZone(): DateTimeZone|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Check if this time zone uses daylight savings time - * @link https://www.php.net/manual/ru/intltimezone.usedaylighttime.php + * @link https://secure.php.net/manual/en/intltimezone.usedaylighttime.php * @return bool */ - public function useDaylightTime() { } + public function useDaylightTime(): bool {} + + /** + * @since 8.4 + */ + public static function getIanaID(string $timezoneId): string|false {} } /** @@ -3265,76 +3536,76 @@ class IntlTimeZone { * default locale collation rules will be used. If empty string ("") or * "root" are passed, UCA rules will be used. * </p> - * @return Collator Return new instance of <b>Collator</b> object, or <b>NULL</b> + * @return Collator|null Return new instance of <b>Collator</b> object, or <b>NULL</b> * on error. */ -function collator_create($locale) { } +function collator_create(string $locale): ?Collator {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Compare two Unicode strings * @link https://php.net/manual/en/collator.compare.php * @param Collator $object - * @param string $str1 <p> + * @param string $string1 <p> * The first string to compare. * </p> - * @param string $str2 <p> + * @param string $string2 <p> * The second string to compare. * </p> - * @return int Return comparison result:</p> + * @return int|false Return comparison result:</p> * <p> * <p> - * 1 if <i>str1</i> is greater than - * <i>str2</i> ; + * 1 if <i>string1</i> is greater than + * <i>string2</i> ; * </p> * <p> - * 0 if <i>str1</i> is equal to - * <i>str2</i>; + * 0 if <i>string1</i> is equal to + * <i>string2</i>; * </p> * <p> - * -1 if <i>str1</i> is less than - * <i>str2</i> . + * -1 if <i>string1</i> is less than + * <i>string2</i> . * </p> * On error * boolean * <b>FALSE</b> * is returned. */ -function collator_compare(Collator $object, $str1, $str2) { } +function collator_compare(Collator $object, string $string1, string $string2): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get collation attribute value * @link https://php.net/manual/en/collator.getattribute.php * @param Collator $object - * @param int $attr <p> + * @param int $attribute <p> * Attribute to get value for. * </p> * @return int|false Attribute value, or boolean <b>FALSE</b> on error. */ -function collator_get_attribute(Collator $object, $attr) { } +function collator_get_attribute(Collator $object, int $attribute): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Set collation attribute * @link https://php.net/manual/en/collator.setattribute.php * @param Collator $object - * @param int $attr <p>Attribute.</p> - * @param int $val <p> + * @param int $attribute <p>Attribute.</p> + * @param int $value <p> * Attribute value. * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function collator_set_attribute(Collator $object, $attr, $val) { } +function collator_set_attribute(Collator $object, int $attribute, int $value): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get current collation strength * @link https://php.net/manual/en/collator.getstrength.php * @param Collator $object - * @return int|false current collation strength, or boolean <b>FALSE</b> on error. + * @return int current collation strength */ -function collator_get_strength(Collator $object) { } +function collator_get_strength(Collator $object): int {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3344,105 +3615,108 @@ function collator_get_strength(Collator $object) { } * @param int $strength <p>Strength to set.</p> * <p> * Possible values are: - * <p> * <b>Collator::PRIMARY</b> * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function collator_set_strength(Collator $object, $strength) { } +function collator_set_strength(Collator $object, int $strength): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Sort array using specified collator * @link https://php.net/manual/en/collator.sort.php * @param Collator $object - * @param array $arr <p> + * @param string[] &$array <p> * Array of strings to sort. * </p> - * @param int $sort_flag [optional] <p> + * @param int $flags <p> * Optional sorting type, one of the following: * </p> * <p> - * <p> * <b>Collator::SORT_REGULAR</b> * - compare items normally (don't change types) * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function collator_sort(Collator $object, array &$arr, $sort_flag = null) { } +function collator_sort(Collator $object, array &$array, int $flags = 0): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Sort array using specified collator and sort keys * @link https://php.net/manual/en/collator.sortwithsortkeys.php * @param Collator $object - * @param array $arr <p>Array of strings to sort</p> + * @param string[] &$array <p>Array of strings to sort</p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function collator_sort_with_sort_keys(Collator $object, array &$arr) { } +function collator_sort_with_sort_keys( + Collator $object, + array &$array, +): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Sort array maintaining index association * @link https://php.net/manual/en/collator.asort.php * @param Collator $object - * @param array $arr <p>Array of strings to sort.</p> - * @param int $sort_flag [optional] <p> + * @param string[] &$array <p>Array of strings to sort.</p> + * @param int $flags <p> * Optional sorting type, one of the following: - * <p> * <b>Collator::SORT_REGULAR</b> * - compare items normally (don't change types) * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function collator_asort(Collator $object, array &$arr, $sort_flag = null) { } +function collator_asort(Collator $object, array &$array, int $flags = 0): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the locale name of the collator * @link https://php.net/manual/en/collator.getlocale.php * @param Collator $object - * @param int $type [optional] <p> + * @param int $type <p> * You can choose between valid and actual locale ( * <b>Locale::VALID_LOCALE</b> and * <b>Locale::ACTUAL_LOCALE</b>, * respectively). The default is the actual locale. * </p> - * @return string Real locale name from which the collation data comes. If the collator was + * @return string|false Real locale name from which the collation data comes. If the collator was * instantiated from rules or an error occurred, returns * boolean <b>FALSE</b>. */ -function collator_get_locale(Collator $object, $type = null) { } +function collator_get_locale(Collator $object, int $type): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get collator's last error code * @link https://php.net/manual/en/collator.geterrorcode.php * @param Collator $object - * @return int Error code returned by the last Collator API function call. + * @return int|false Error code returned by the last Collator API function call. */ -function collator_get_error_code(Collator $object) { } +function collator_get_error_code(Collator $object): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get text for collator's last error code * @link https://php.net/manual/en/collator.geterrormessage.php * @param Collator $object - * @return string Description of an error occurred in the last Collator API function call. + * @return string|false Description of an error occurred in the last Collator API function call. */ -function collator_get_error_message(Collator $object) { } +function collator_get_error_message(Collator $object): string|false {} /** - * (No version information available, might only be in SVN)<br/> + * (PHP 5 >= 5.3.2, PHP 7, PECL intl >= 1.0.3)<br/> * Get sorting key for a string * @link https://php.net/manual/en/collator.getsortkey.php * @param Collator $object - * @param string $str <p> + * @param string $string <p> * The string to produce the key from. * </p> - * @return string the collation key for the string. Collation keys can be compared directly instead of strings. + * @return string|false the collation key for the string. Collation keys can be compared directly instead of strings. */ -function collator_get_sort_key(Collator $object, $str) { } +function collator_get_sort_key( + Collator $object, + string $string, +): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3463,117 +3737,117 @@ function collator_get_sort_key(Collator $object, $str) { } * ICU RuleBasedNumberFormat * documentation, respectively. * </p> - * @param string $pattern [optional] <p> + * @param string|null $pattern [optional] <p> * Pattern string if the chosen style requires a pattern. * </p> - * @return NumberFormatter|false <b>NumberFormatter</b> object or <b>FALSE</b> on error. + * @return NumberFormatter|null <b>NumberFormatter</b> object or <b>NULL</b> on error. */ -function numfmt_create($locale, $style, $pattern = null) { } +function numfmt_create(string $locale, int $style, ?string $pattern = null): ?NumberFormatter {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Format a number * @link https://php.net/manual/en/numberformatter.format.php - * @param NumberFormatter $fmt - * @param int|float $value <p> + * @param NumberFormatter $formatter + * @param int|float $num <p> * The value to format. Can be integer or float, * other values will be converted to a numeric value. * </p> - * @param int $type [optional] <p> + * @param int $type <p> * The * formatting type to use. * </p> * @return string|false the string containing formatted value, or <b>FALSE</b> on error. */ -function numfmt_format(NumberFormatter $fmt, $value, $type = null) { } +function numfmt_format(NumberFormatter $formatter, int|float $num, int $type = 0): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Parse a number * @link https://php.net/manual/en/numberformatter.parse.php - * @param NumberFormatter $fmt - * @param string $value + * @param NumberFormatter $formatter + * @param string $string * @param int $type [optional] <p> * The * formatting type to use. By default, * <b>NumberFormatter::TYPE_DOUBLE</b> is used. * </p> - * @param int $position [optional] <p> + * @param int &$offset [optional] <p> * Offset in the string at which to begin parsing. On return, this value * will hold the offset at which parsing ended. * </p> - * @return mixed The value of the parsed number or <b>FALSE</b> on error. + * @return int|float|false The value of the parsed number or <b>FALSE</b> on error. */ -function numfmt_parse(NumberFormatter $fmt, $value, $type = null, &$position = null) { } +function numfmt_parse(NumberFormatter $formatter, string $string, int $type = NumberFormatter::TYPE_DOUBLE, &$offset = null): int|float|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Format a currency value * @link https://php.net/manual/en/numberformatter.formatcurrency.php - * @param NumberFormatter $fmt - * @param float $value <p> + * @param NumberFormatter $formatter + * @param float $amount <p> * The numeric currency value. * </p> * @param string $currency <p> * The 3-letter ISO 4217 currency code indicating the currency to use. * </p> - * @return string String representing the formatted currency value. + * @return string|false String representing the formatted currency value. */ -function numfmt_format_currency(NumberFormatter $fmt, $value, $currency) { } +function numfmt_format_currency(NumberFormatter $formatter, float $amount, string $currency): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Parse a currency number * @link https://php.net/manual/en/numberformatter.parsecurrency.php - * @param NumberFormatter $fmt - * @param string $value - * @param string $currency <p> + * @param NumberFormatter $formatter + * @param string $string + * @param string &$currency <p> * Parameter to receive the currency name (3-letter ISO 4217 currency * code). * </p> - * @param int $position [optional] <p> + * @param int &$offset [optional] <p> * Offset in the string at which to begin parsing. On return, this value * will hold the offset at which parsing ended. * </p> * @return float|false The parsed numeric value or <b>FALSE</b> on error. */ -function numfmt_parse_currency(NumberFormatter $fmt, $value, &$currency, &$position = null) { } +function numfmt_parse_currency(NumberFormatter $formatter, string $string, &$currency, &$offset = null): float|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Set an attribute * @link https://php.net/manual/en/numberformatter.setattribute.php - * @param NumberFormatter $fmt - * @param int $attr <p> + * @param NumberFormatter $formatter + * @param int $attribute <p> * Attribute specifier - one of the * numeric attribute constants. * </p> - * @param int $value <p> + * @param int|float $value <p> * The attribute value. * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function numfmt_set_attribute(NumberFormatter $fmt, $attr, $value) { } +function numfmt_set_attribute(NumberFormatter $formatter, int $attribute, int|float $value): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get an attribute * @link https://php.net/manual/en/numberformatter.getattribute.php - * @param NumberFormatter $fmt - * @param int $attr <p> + * @param NumberFormatter $formatter + * @param int $attribute <p> * Attribute specifier - one of the * numeric attribute constants. * </p> - * @return int|false Return attribute value on success, or <b>FALSE</b> on error. + * @return int|float|false Return attribute value on success, or <b>FALSE</b> on error. */ -function numfmt_get_attribute(NumberFormatter $fmt, $attr) { } +function numfmt_get_attribute(NumberFormatter $formatter, int $attribute): int|float|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Set a text attribute * @link https://php.net/manual/en/numberformatter.settextattribute.php - * @param NumberFormatter $fmt - * @param int $attr <p> + * @param NumberFormatter $formatter + * @param int $attribute <p> * Attribute specifier - one of the * text attribute * constants. @@ -3583,27 +3857,27 @@ function numfmt_get_attribute(NumberFormatter $fmt, $attr) { } * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function numfmt_set_text_attribute(NumberFormatter $fmt, $attr, $value) { } +function numfmt_set_text_attribute(NumberFormatter $formatter, int $attribute, string $value): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get a text attribute * @link https://php.net/manual/en/numberformatter.gettextattribute.php - * @param NumberFormatter $fmt - * @param int $attr <p> + * @param NumberFormatter $formatter + * @param int $attribute <p> * Attribute specifier - one of the * text attribute constants. * </p> * @return string|false Return attribute value on success, or <b>FALSE</b> on error. */ -function numfmt_get_text_attribute(NumberFormatter $fmt, $attr) { } +function numfmt_get_text_attribute(NumberFormatter $formatter, int $attribute): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Set a symbol value * @link https://php.net/manual/en/numberformatter.setsymbol.php - * @param NumberFormatter $fmt - * @param int $attr <p> + * @param NumberFormatter $formatter + * @param int $symbol <p> * Symbol specifier, one of the * format symbol constants. * </p> @@ -3612,26 +3886,26 @@ function numfmt_get_text_attribute(NumberFormatter $fmt, $attr) { } * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function numfmt_set_symbol(NumberFormatter $fmt, $attr, $value) { } +function numfmt_set_symbol(NumberFormatter $formatter, int $symbol, string $value): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get a symbol value * @link https://php.net/manual/en/numberformatter.getsymbol.php - * @param NumberFormatter $fmt - * @param int $attr <p> + * @param NumberFormatter $formatter + * @param int $symbol <p> * Symbol specifier, one of the * format symbol constants. * </p> * @return string|false The symbol string or <b>FALSE</b> on error. */ -function numfmt_get_symbol(NumberFormatter $fmt, $attr) { } +function numfmt_get_symbol(NumberFormatter $formatter, int $symbol): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Set formatter pattern * @link https://php.net/manual/en/numberformatter.setpattern.php - * @param NumberFormatter $fmt + * @param NumberFormatter $formatter * @param string $pattern <p> * Pattern in syntax described in * ICU DecimalFormat @@ -3639,94 +3913,91 @@ function numfmt_get_symbol(NumberFormatter $fmt, $attr) { } * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function numfmt_set_pattern(NumberFormatter $fmt, $pattern) { } +function numfmt_set_pattern(NumberFormatter $formatter, string $pattern): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get formatter pattern * @link https://php.net/manual/en/numberformatter.getpattern.php - * @param NumberFormatter $fmt - * @param $nf + * @param NumberFormatter $formatter * @return string|false Pattern string that is used by the formatter, or <b>FALSE</b> if an error happens. */ -function numfmt_get_pattern(NumberFormatter $fmt, $nf) { } +function numfmt_get_pattern(NumberFormatter $formatter): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get formatter locale * @link https://php.net/manual/en/numberformatter.getlocale.php - * @param NumberFormatter $fmt - * @param int $type [optional] <p> + * @param NumberFormatter $formatter + * @param int $type <p> * You can choose between valid and actual locale ( * <b>Locale::VALID_LOCALE</b>, * <b>Locale::ACTUAL_LOCALE</b>, * respectively). The default is the actual locale. * </p> - * @return string The locale name used to create the formatter. + * @return string|false The locale name used to create the formatter. */ -function numfmt_get_locale(NumberFormatter $fmt, $type = null) { } +function numfmt_get_locale(NumberFormatter $formatter, int $type = 0): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get formatter's last error code. * @link https://php.net/manual/en/numberformatter.geterrorcode.php - * @param NumberFormatter $fmt - * @param $nf + * @param NumberFormatter $formatter * @return int error code from last formatter call. */ -function numfmt_get_error_code(NumberFormatter $fmt, $nf) { } +function numfmt_get_error_code(NumberFormatter $formatter): int {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get formatter's last error message. * @link https://php.net/manual/en/numberformatter.geterrormessage.php - * @param NumberFormatter $fmt - * @param $nf + * @param NumberFormatter $formatter * @return string error message from last formatter call. */ -function numfmt_get_error_message(NumberFormatter $fmt, $nf) { } +function numfmt_get_error_message(NumberFormatter $formatter): string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Normalizes the input provided and returns the normalized string * @link https://php.net/manual/en/normalizer.normalize.php - * @param string $input <p>The input string to normalize</p> - * @param string $form [optional] <p>One of the normalization forms.</p> - * @return string The normalized string or <b>NULL</b> if an error occurred. + * @param string $string <p>The input string to normalize</p> + * @param int $form [optional] <p>One of the normalization forms.</p> + * @return string|false The normalized string or <b>FALSE</b> if an error occurred. */ -function normalizer_normalize($input, $form = Normalizer::FORM_C) { } +function normalizer_normalize(string $string, int $form = Normalizer::FORM_C): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Checks if the provided string is already in the specified normalization -form. + * form. * @link https://php.net/manual/en/normalizer.isnormalized.php - * @param string $input <p>The input string to normalize</p> - * @param string $form [optional] <p> + * @param string $string <p>The input string to normalize</p> + * @param int $form [optional] <p> * One of the normalization forms. * </p> * @return bool <b>TRUE</b> if normalized, <b>FALSE</b> otherwise or if there an error */ -function normalizer_is_normalized($input, $form = Normalizer::FORM_C) { } +function normalizer_is_normalized(string $string, int $form = Normalizer::FORM_C): bool {} /** - * Get the default Locale + * Gets the default locale value from the intl global 'default_locale' * @link https://php.net/manual/en/function.locale-get-default.php * @return string a string with the current Locale. */ -function locale_get_default() { } +function locale_get_default(): string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> - * Set the default Locale + * Set the default runtime Locale * @link https://php.net/manual/en/function.locale-set-default.php - * @param string $name <p> + * @param string $locale <p> * The new Locale name. A comprehensive list of the supported locales is * available at . * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function locale_set_default($name) { } +function locale_set_default(string $locale): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3735,9 +4006,9 @@ function locale_set_default($name) { } * @param string $locale <p> * The locale to extract the primary language code from * </p> - * @return string The language code associated with the language or <b>NULL</b> in case of error. + * @return string|null The language code associated with the language or <b>NULL</b> in case of error. */ -function locale_get_primary_language($locale) { } +function locale_get_primary_language(string $locale): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3746,9 +4017,9 @@ function locale_get_primary_language($locale) { } * @param string $locale <p> * The locale to extract the script code from * </p> - * @return string The script subtag for the locale or <b>NULL</b> if not present + * @return string|null The script subtag for the locale or <b>NULL</b> if not present */ -function locale_get_script($locale) { } +function locale_get_script(string $locale): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3757,9 +4028,9 @@ function locale_get_script($locale) { } * @param string $locale <p> * The locale to extract the region code from * </p> - * @return string The region subtag for the locale or <b>NULL</b> if not present + * @return string|null The region subtag for the locale or <b>NULL</b> if not present */ -function locale_get_region($locale) { } +function locale_get_region(string $locale): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3768,9 +4039,9 @@ function locale_get_region($locale) { } * @param string $locale <p> * The locale to extract the keywords from * </p> - * @return array Associative array containing the keyword-value pairs for this locale + * @return array|false|null Associative array containing the keyword-value pairs for this locale */ -function locale_get_keywords($locale) { } +function locale_get_keywords(string $locale): array|false|null {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3779,13 +4050,16 @@ function locale_get_keywords($locale) { } * @param string $locale <p> * The locale to return a display script for * </p> - * @param string $in_locale [optional] <p> + * @param string|null $displayLocale <p> * Optional format locale to use to display the script name * </p> - * @return string Display name of the script for the $locale in the format appropriate for + * @return string|false Display name of the script for the $locale in the format appropriate for * $in_locale. */ -function locale_get_display_script($locale, $in_locale = null) { } +function locale_get_display_script( + string $locale, + ?string $displayLocale = null +): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3794,13 +4068,16 @@ function locale_get_display_script($locale, $in_locale = null) { } * @param string $locale <p> * The locale to return a display region for. * </p> - * @param string $in_locale [optional] <p> + * @param string|null $displayLocale <p> * Optional format locale to use to display the region name * </p> - * @return string display name of the region for the $locale in the format appropriate for + * @return string|false display name of the region for the $locale in the format appropriate for * $in_locale. */ -function locale_get_display_region($locale, $in_locale = null) { } +function locale_get_display_region( + string $locale, + ?string $displayLocale = null +): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3809,10 +4086,13 @@ function locale_get_display_region($locale, $in_locale = null) { } * @param string $locale <p> * The locale to return a display name for. * </p> - * @param string $in_locale [optional] <p>optional format locale</p> - * @return string Display name of the locale in the format appropriate for $in_locale. + * @param string|null $displayLocale <p>optional format locale</p> + * @return string|false Display name of the locale in the format appropriate for $in_locale. */ -function locale_get_display_name($locale, $in_locale = null) { } +function locale_get_display_name( + string $locale, + ?string $displayLocale = null +): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3821,13 +4101,16 @@ function locale_get_display_name($locale, $in_locale = null) { } * @param string $locale <p> * The locale to return a display language for * </p> - * @param string $in_locale [optional] <p> + * @param string|null $displayLocale <p> * Optional format locale to use to display the language name * </p> - * @return string display name of the language for the $locale in the format appropriate for + * @return string|false display name of the language for the $locale in the format appropriate for * $in_locale. */ -function locale_get_display_language($locale, $in_locale = null) { } +function locale_get_display_language( + string $locale, + ?string $displayLocale = null +): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3836,19 +4119,22 @@ function locale_get_display_language($locale, $in_locale = null) { } * @param string $locale <p> * The locale to return a display variant for * </p> - * @param string $in_locale [optional] <p> + * @param string|null $displayLocale <p> * Optional format locale to use to display the variant name * </p> - * @return string Display name of the variant for the $locale in the format appropriate for + * @return string|false Display name of the variant for the $locale in the format appropriate for * $in_locale. */ -function locale_get_display_variant($locale, $in_locale = null) { } +function locale_get_display_variant( + string $locale, + ?string $displayLocale = null +): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Returns a correctly ordered and delimited locale ID * @link https://php.net/manual/en/locale.composelocale.php - * @param array $subtags <p> + * @param string[] $subtags <p> * an array containing a list of key-value pairs, where the keys identify * the particular locale ID subtags, and the values are the associated * subtag values. @@ -3866,9 +4152,9 @@ function locale_get_display_variant($locale, $in_locale = null) { } * (e.g. 'variant0', 'variant1', etc.). * </p> * </p> - * @return string The corresponding locale identifier. + * @return string|false The corresponding locale identifier. */ -function locale_compose(array $subtags) { } +function locale_compose(array $subtags): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3879,14 +4165,14 @@ function locale_compose(array $subtags) { } * 'private' subtags can take maximum 15 values whereas 'extlang' can take * maximum 3 values. * </p> - * @return array an array containing a list of key-value pairs, where the keys + * @return string[]|null an array containing a list of key-value pairs, where the keys * identify the particular locale ID subtags, and the values are the * associated subtag values. The array will be ordered as the locale id * subtags e.g. in the locale id if variants are '-varX-varY-varZ' then the * returned array will have variant0=>varX , variant1=>varY , * variant2=>varZ */ -function locale_parse($locale) { } +function locale_parse(string $locale): ?array {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3895,55 +4181,67 @@ function locale_parse($locale) { } * @param string $locale <p> * The locale to extract the variants from * </p> - * @return array The array containing the list of all variants subtag for the locale + * @return array|null The array containing the list of all variants subtag for the locale * or <b>NULL</b> if not present */ -function locale_get_all_variants($locale) { } +function locale_get_all_variants(string $locale): ?array {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Checks if a language tag filter matches with locale * @link https://php.net/manual/en/locale.filtermatches.php - * @param string $langtag <p> + * @param string $languageTag <p> * The language tag to check * </p> * @param string $locale <p> * The language range to check against * </p> - * @param bool $canonicalize [optional] <p> + * @param bool $canonicalize <p> * If true, the arguments will be converted to canonical form before * matching. * </p> - * @return bool <b>TRUE</b> if $locale matches $langtag <b>FALSE</b> otherwise. + * @return bool|null <b>TRUE</b> if $locale matches $langtag <b>FALSE</b> otherwise. */ -function locale_filter_matches($langtag, $locale, $canonicalize = false) { } +function locale_filter_matches( + string $languageTag, + string $locale, + bool $canonicalize = false +): ?bool {} /** - * @param $arg1 + * Canonicalize the locale string + * @param string $locale + * + * @return null|string */ -function locale_canonicalize($arg1) { } +function locale_canonicalize(string $locale): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Searches the language tag list for the best match to the language * @link https://php.net/manual/en/locale.lookup.php - * @param array $langtag <p> + * @param string[] $languageTag <p> * An array containing a list of language tags to compare to * <i>locale</i>. Maximum 100 items allowed. * </p> * @param string $locale <p> * The locale to use as the language range when matching. * </p> - * @param bool $canonicalize [optional] <p> + * @param bool $canonicalize <p> * If true, the arguments will be converted to canonical form before * matching. * </p> - * @param string $default [optional] <p> + * @param string|null $defaultLocale <p> * The locale to use if no match is found. * </p> - * @return string The closest matching language tag or default value. + * @return string|null The closest matching language tag or default value. */ -function locale_lookup(array $langtag, $locale, $canonicalize = false, $default = null) { } +function locale_lookup( + array $languageTag, + string $locale, + bool $canonicalize = false, + ?string $defaultLocale = null, +): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3952,27 +4250,29 @@ function locale_lookup(array $langtag, $locale, $canonicalize = false, $default * @param string $header <p> * The string containing the "Accept-Language" header according to format in RFC 2616. * </p> - * @return string The corresponding locale identifier. + * @return string|false The corresponding locale identifier. */ -function locale_accept_from_http($header) { } +function locale_accept_from_http(string $header): string|false {} /** - * @param $locale - * @param $pattern + * Constructs a new message formatter + * @param string $locale + * @param string $pattern + * @return MessageFormatter|null */ -function msgfmt_create($locale, $pattern) { } +function msgfmt_create(string $locale, string $pattern): ?MessageFormatter {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Format the message * @link https://php.net/manual/en/messageformatter.format.php - * @param MessageFormatter $fmt - * @param array $args <p> + * @param MessageFormatter $formatter + * @param array $values <p> * Arguments to insert into the format string * </p> * @return string|false The formatted string, or <b>FALSE</b> if an error occurred */ -function msgfmt_format(MessageFormatter $fmt, array $args) { } +function msgfmt_format(MessageFormatter $formatter, array $values): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -3987,48 +4287,47 @@ function msgfmt_format(MessageFormatter $fmt, array $args) { } * umsg_autoQuoteApostrophe * before being interpreted. * </p> - * @param array $args <p> + * @param array $values <p> * The array of values to insert into the format string * </p> * @return string|false The formatted pattern string or <b>FALSE</b> if an error occurred */ -function msgfmt_format_message(string $locale, string $pattern, array $args) { } +function msgfmt_format_message(string $locale, string $pattern, array $values): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Parse input string according to pattern * @link https://php.net/manual/en/messageformatter.parse.php - * @param MessageFormatter $fmt - * @param string $value <p> + * @param MessageFormatter $formatter + * @param string $string <p> * The string to parse * </p> * @return array|false An array containing the items extracted, or <b>FALSE</b> on error */ -function msgfmt_parse(MessageFormatter $fmt, $value) { } +function msgfmt_parse(MessageFormatter $formatter, string $string): array|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Quick parse input string * @link https://php.net/manual/en/messageformatter.parsemessage.php - * @param MessageFormatter $fmt * @param string $locale <p> * The locale to use for parsing locale-dependent parts * </p> * @param string $pattern <p> * The pattern with which to parse the <i>value</i>. * </p> - * @param string $source <p> + * @param string $message <p> * The string to parse, conforming to the <i>pattern</i>. * </p> * @return array|false An array containing items extracted, or <b>FALSE</b> on error */ -function msgfmt_parse_message(MessageFormatter $fmt, $locale, $pattern, $source) { } +function msgfmt_parse_message(string $locale, string $pattern, string $message): array|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Set the pattern used by the formatter * @link https://php.net/manual/en/messageformatter.setpattern.php - * @param MessageFormatter $fmt + * @param MessageFormatter $formatter * @param string $pattern <p> * The pattern string to use in this message formatter. * The pattern uses an 'apostrophe-friendly' syntax; it is run through @@ -4037,47 +4336,43 @@ function msgfmt_parse_message(MessageFormatter $fmt, $locale, $pattern, $source) * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function msgfmt_set_pattern(MessageFormatter $fmt, $pattern) { } +function msgfmt_set_pattern(MessageFormatter $formatter, string $pattern): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the pattern used by the formatter * @link https://php.net/manual/en/messageformatter.getpattern.php - * @param MessageFormatter $fmt - * @param $mf - * @return string The pattern string for this message formatter + * @param MessageFormatter $formatter + * @return string|false The pattern string for this message formatter */ -function msgfmt_get_pattern(MessageFormatter $fmt, $mf) { } +function msgfmt_get_pattern(MessageFormatter $formatter): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the locale for which the formatter was created. * @link https://php.net/manual/en/messageformatter.getlocale.php - * @param MessageFormatter $fmt - * @param $mf + * @param MessageFormatter $formatter * @return string The locale name */ -function msgfmt_get_locale(MessageFormatter $fmt, $mf) { } +function msgfmt_get_locale(MessageFormatter $formatter): string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the error code from last operation * @link https://php.net/manual/en/messageformatter.geterrorcode.php - * @param MessageFormatter $fmt - * @param $nf + * @param MessageFormatter $formatter * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR. */ -function msgfmt_get_error_code(MessageFormatter $fmt, $nf) { } +function msgfmt_get_error_code(MessageFormatter $formatter): int {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the error text from the last operation * @link https://php.net/manual/en/messageformatter.geterrormessage.php - * @param MessageFormatter $fmt - * @param $coll + * @param MessageFormatter $formatter * @return string Description of the last error. */ -function msgfmt_get_error_message(MessageFormatter $fmt, $coll) { } +function msgfmt_get_error_message(MessageFormatter $formatter): string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -4086,14 +4381,14 @@ function msgfmt_get_error_message(MessageFormatter $fmt, $coll) { } * @param string|null $locale <p> * Locale to use when formatting or parsing. * </p> - * @param int $datetype <p> + * @param int $dateType <p> * Date type to use (<b>none</b>, * <b>short</b>, <b>medium</b>, * <b>long</b>, <b>full</b>). * This is one of the * IntlDateFormatter constants. * </p> - * @param int $timetype <p> + * @param int $timeType <p> * Time type to use (<b>none</b>, * <b>short</b>, <b>medium</b>, * <b>long</b>, <b>full</b>). @@ -4103,164 +4398,160 @@ function msgfmt_get_error_message(MessageFormatter $fmt, $coll) { } * @param string|null $timezone [optional] <p> * Time zone ID, default is system default. * </p> - * @param int|null $calendar [optional] <p> + * @param IntlCalendar|int|null $calendar [optional] <p> * Calendar to use for formatting or parsing; default is Gregorian. * This is one of the * IntlDateFormatter calendar constants. * </p> - * @param string $pattern [optional] <p> + * @param string|null $pattern [optional] <p> * Optional pattern to use when formatting or parsing. * Possible patterns are documented at http://userguide.icu-project.org/formatparse/datetime. * </p> - * @return IntlDateFormatter + * @return IntlDateFormatter|null */ -function datefmt_create($locale, $datetype, $timetype, $timezone = null, $calendar = null, $pattern = '') { } +function datefmt_create( + ?string $locale, + int $dateType = 0, + int $timeType = 0, + $timezone = null, + IntlCalendar|int|null $calendar = null, + string|null $pattern = null +): ?IntlDateFormatter {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the datetype used for the IntlDateFormatter * @link https://php.net/manual/en/intldateformatter.getdatetype.php - * @param $mf - * @return int The current date type value of the formatter. + * @param IntlDateFormatter $formatter + * @return int|false The current date type value of the formatter. */ -function datefmt_get_datetype(MessageFormatter $mf) { } +function datefmt_get_datetype(IntlDateFormatter $formatter): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the timetype used for the IntlDateFormatter * @link https://php.net/manual/en/intldateformatter.gettimetype.php - * @param $mf - * @return int The current date type value of the formatter. + * @param IntlDateFormatter $formatter + * @return int|false The current date type value of the formatter. */ -function datefmt_get_timetype(MessageFormatter $mf) { } +function datefmt_get_timetype(IntlDateFormatter $formatter): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> - * Get the calendar used for the IntlDateFormatter + * Get the calendar type used for the IntlDateFormatter * @link https://php.net/manual/en/intldateformatter.getcalendar.php - * @param $mf - * @return int The calendar being used by the formatter. + * @param IntlDateFormatter $formatter + * @return int|false The calendar being used by the formatter. */ -function datefmt_get_calendar(MessageFormatter $mf) { } +function datefmt_get_calendar(IntlDateFormatter $formatter): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * sets the calendar used to the appropriate calendar, which must be * @link https://php.net/manual/en/intldateformatter.setcalendar.php - * @param MessageFormatter $mf - * @param int $which <p> + * @param IntlDateFormatter $formatter $mf + * @param IntlCalendar|int|null $calendar <p> * The calendar to use. * Default is <b>IntlDateFormatter::GREGORIAN</b>. * </p> * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function datefmt_set_calendar(MessageFormatter $mf, $which) { } +function datefmt_set_calendar(IntlDateFormatter $formatter, IntlCalendar|int|null $calendar): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the locale used by formatter * @link https://php.net/manual/en/intldateformatter.getlocale.php - * @param MessageFormatter $mf - * @param int $which [optional] + * @param IntlDateFormatter $formatter + * @param int $type [optional] * @return string|false the locale of this formatter or 'false' if error */ -function datefmt_get_locale(MessageFormatter $mf, $which = null) { } +function datefmt_get_locale( + IntlDateFormatter $formatter, + int $type = ULOC_ACTUAL_LOCALE +): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the timezone-id used for the IntlDateFormatter * @link https://php.net/manual/en/intldateformatter.gettimezoneid.php - * @param $mf - * @return string ID string for the time zone used by this formatter. + * @param IntlDateFormatter $formatter + * @return string|false ID string for the time zone used by this formatter. */ -function datefmt_get_timezone_id(MessageFormatter $mf) { } +function datefmt_get_timezone_id(IntlDateFormatter $formatter): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 3.0.0)<br/> * Get copy of formatter's calendar object - * @link https://www.php.net/manual/en/intldateformatter.getcalendarobject.php - * @return IntlCalendar A copy of the internal calendar object used by this formatter. + * @link https://secure.php.net/manual/en/intldateformatter.getcalendarobject.php + * @param IntlDateFormatter $formatter + * @return IntlCalendar|false|null A copy of the internal calendar object used by this formatter. */ -function datefmt_get_calendar_object() { } +function datefmt_get_calendar_object(IntlDateFormatter $formatter): IntlCalendar|false|null {} /** * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)<br/> * Get formatter's timezone - * @link https://www.php.net/manual/en/intldateformatter.gettimezone.php + * @link https://secure.php.net/manual/en/intldateformatter.gettimezone.php + * @param IntlDateFormatter $formatter * @return IntlTimeZone|false The associated IntlTimeZone object or FALSE on failure. */ -function datefmt_get_timezone() { } - -/** - * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> - * Sets the time zone to use - * @link https://php.net/manual/en/intldateformatter.settimezoneid.php - * @param MessageFormatter $mf - * @param string $zone <p> - * The time zone ID string of the time zone to use. - * If <b>NULL</b> or the empty string, the default time zone for the runtime is used. - * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. - * @deprecated 5.5 https://www.php.net/manual/en/migration55.deprecated.php - * @removed 7.0 - */ -function datefmt_set_timezone_id(MessageFormatter $mf, $zone) { } - +function datefmt_get_timezone(IntlDateFormatter $formatter): IntlTimeZone|false {} /** * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)<br/> * Sets formatter's timezone * @link https://php.net/manual/en/intldateformatter.settimezone.php - * @param MessageFormatter $mf - * @param mixed $zone <p> + * @param IntlDateFormatter $formatter + * @param IntlTimeZone|DateTimeZone|string|null $timezone <p> * The timezone to use for this formatter. This can be specified in the * following forms: * <ul> * <li> * <p> * <b>NULL</b>, in which case the default timezone will be used, as specified in - * the ini setting {@link "https://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone" date.timezone} or - * through the function {@link "https://www.php.net/manual/en/function.date-default-timezone-set.php" date_default_timezone_set()} and as - * returned by {@link "https://www.php.net/manual/en/function.date-default-timezone-get.php" date_default_timezone_get()}. + * the ini setting {@link "https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone" date.timezone} or + * through the function {@link "https://secure.php.net/manual/en/function.date-default-timezone-set.php" date_default_timezone_set()} and as + * returned by {@link "https://secure.php.net/manual/en/function.date-default-timezone-get.php" date_default_timezone_get()}. * </p> * </li> * <li> * <p> - * An {@link "https://www.php.net/manual/en/class.intltimezone.php" IntlTimeZone}, which will be used directly. + * An {@link "https://secure.php.net/manual/en/class.intltimezone.php" IntlTimeZone}, which will be used directly. * </p> * </li> * <li> * <p> - * A {@link "https://www.php.net/manual/en/class.datetimezone.php" DateTimeZone}. Its identifier will be extracted + * A {@link "https://secure.php.net/manual/en/class.datetimezone.php" DateTimeZone}. Its identifier will be extracted * and an ICU timezone object will be created; the timezone will be backed * by ICU's database, not PHP's. * </p> * </li> * <li> * <p> - * A {@link "https://www.php.net/manual/en/language.types.string.php" string}, which should be a valid ICU timezone identifier. + * A {@link "https://secure.php.net/manual/en/language.types.string.php" string}, which should be a valid ICU timezone identifier. * See <b>IntlTimeZone::createTimeZoneIDEnumeration()</b>. Raw offsets such as <em>"GMT+08:30"</em> are also accepted. * </p> * </li> * </ul> * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. + * @return bool|null <b>TRUE</b> on success or <b>FALSE</b> on failure. */ -function datefmt_set_timezone(MessageFormatter $mf, $zone) { } +function datefmt_set_timezone(IntlDateFormatter $formatter, $timezone): bool|null {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the pattern used for the IntlDateFormatter * @link https://php.net/manual/en/intldateformatter.getpattern.php - * @param $mf - * @return string The pattern string being used to format/parse. + * @param IntlDateFormatter $formatter + * @return string|false The pattern string being used to format/parse. */ -function datefmt_get_pattern(MessageFormatter $mf) { } +function datefmt_get_pattern(IntlDateFormatter $formatter): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Set the pattern used for the IntlDateFormatter * @link https://php.net/manual/en/intldateformatter.setpattern.php - * @param MessageFormatter $mf + * @param IntlDateFormatter $formatter * @param string $pattern <p> * New pattern string to use. * Possible patterns are documented at http://userguide.icu-project.org/formatparse/datetime. @@ -4268,35 +4559,38 @@ function datefmt_get_pattern(MessageFormatter $mf) { } * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. * Bad formatstrings are usually the cause of the failure. */ -function datefmt_set_pattern(MessageFormatter $mf, $pattern) { } +function datefmt_set_pattern(IntlDateFormatter $formatter, string $pattern): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the lenient used for the IntlDateFormatter * @link https://php.net/manual/en/intldateformatter.islenient.php - * @param $mf + * @param IntlDateFormatter $formatter * @return bool <b>TRUE</b> if parser is lenient, <b>FALSE</b> if parser is strict. By default the parser is lenient. */ -function datefmt_is_lenient(MessageFormatter $mf) { } +function datefmt_is_lenient(IntlDateFormatter $formatter): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Set the leniency of the parser * @link https://php.net/manual/en/intldateformatter.setlenient.php - * @param MessageFormatter $mf + * @param IntlDateFormatter $formatter * @param bool $lenient <p> * Sets whether the parser is lenient or not, default is <b>TRUE</b> (lenient). * </p> - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. + * @return void */ -function datefmt_set_lenient(MessageFormatter $mf, $lenient) { } +function datefmt_set_lenient( + IntlDateFormatter $formatter, + bool $lenient +): void {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Format the date/time value as a string * @link https://php.net/manual/en/intldateformatter.format.php - * @param MessageFormatter $mf - * @param mixed $value <p> + * @param IntlDateFormatter $formatter + * @param object|array|string|int|float $datetime <p> * Value to format. This may be a <b>DateTime</b> object, * an integer representing a Unix timestamp value (seconds * since epoch, UTC) or an array in the format output by @@ -4304,17 +4598,20 @@ function datefmt_set_lenient(MessageFormatter $mf, $lenient) { } * </p> * @return string|false The formatted string or, if an error occurred, <b>FALSE</b>. */ -function datefmt_format(MessageFormatter $mf, $value) { } +function datefmt_format( + IntlDateFormatter $formatter, + $datetime +): string|false {} /** * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)<br/> * Formats an object - * @link https://www.php.net/manual/en/intldateformatter.formatobject.php - * @param object $object <p> + * @link https://secure.php.net/manual/en/intldateformatter.formatobject.php + * @param IntlCalendar|DateTimeInterface $datetime <p> * An object of type IntlCalendar or DateTime. The timezone information in the object will be used. * </p> - * @param mixed $format [optional] <p> - * How to format the date/time. This can either be an {https://www.php.net/manual/en/language.types.array.php array} with + * @param array|int|string|null $format [optional] <p> + * How to format the date/time. This can either be an {https://secure.php.net/manual/en/language.types.array.php array} with * two elements (first the date style, then the time style, these being one * of the constants <b>IntlDateFormatter::NONE</b>, * <b>IntlDateFormatter::SHORT</b>, @@ -4322,7 +4619,7 @@ function datefmt_format(MessageFormatter $mf, $value) { } * <b>IntlDateFormatter::LONG</b>, * <b>IntlDateFormatter::FULL</b>), a long with * the value of one of these constants (in which case it will be used both - * for the time and the date) or a {@link https://www.php.net/manual/en/language.types.string.php} with the format + * for the time and the date) or a {@link https://secure.php.net/manual/en/language.types.string.php} with the format * described in {@link http://www.icu-project.org/apiref/icu4c/classSimpleDateFormat.html#details the ICU documentation} * documentation. If <b>NULL</b>, the default style will be used. * </p> @@ -4330,74 +4627,73 @@ function datefmt_format(MessageFormatter $mf, $value) { } * The locale to use, or NULL to use the default one.</p> * @return string|false The formatted string or, if an error occurred, <b>FALSE</b>. */ -function datefmt_format_object($object, $format = null, $locale = null) { } +function datefmt_format_object($datetime, $format = null, ?string $locale = null): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Parse string to a timestamp value * @link https://php.net/manual/en/intldateformatter.parse.php - * @param MessageFormatter $mf - * @param string $value <p> + * @param IntlDateFormatter $formatter + * @param string $string <p> * string to convert to a time * </p> - * @param int $position [optional] <p> + * @param int &$offset [optional] <p> * Position at which to start the parsing in $value (zero-based). * If no error occurs before $value is consumed, $parse_pos will contain -1 * otherwise it will contain the position at which parsing ended (and the error occurred). * This variable will contain the end position if the parse fails. * If $parse_pos > strlen($value), the parse fails immediately. * </p> - * @return int timestamp parsed value + * @return int|float|false timestamp parsed value */ -function datefmt_parse(MessageFormatter $mf, $value, &$position = null) { } +function datefmt_parse(IntlDateFormatter $formatter, string $string, &$offset = null): int|float|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Parse string to a field-based time value * @link https://php.net/manual/en/intldateformatter.localtime.php - * @param MessageFormatter $mf - * @param string $value <p> + * @param IntlDateFormatter $formatter + * @param string $string <p> * string to convert to a time * </p> - * @param int $position [optional] <p> + * @param int &$offset [optional] <p> * Position at which to start the parsing in $value (zero-based). * If no error occurs before $value is consumed, $parse_pos will contain -1 * otherwise it will contain the position at which parsing ended . * If $parse_pos > strlen($value), the parse fails immediately. * </p> - * @return array Localtime compatible array of integers : contains 24 hour clock value in tm_hour field + * @return array|false Localtime compatible array of integers : contains 24 hour clock value in tm_hour field */ -function datefmt_localtime(MessageFormatter $mf, $value, &$position = null) { } +function datefmt_localtime(IntlDateFormatter $formatter, string $string, &$offset = null): array|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the error code from last operation * @link https://php.net/manual/en/intldateformatter.geterrorcode.php - * @param MessageFormatter $mf + * @param IntlDateFormatter $formatter * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR. */ -function datefmt_get_error_code(MessageFormatter $mf) { } +function datefmt_get_error_code(IntlDateFormatter $formatter): int {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get the error text from the last operation. * @link https://php.net/manual/en/intldateformatter.geterrormessage.php - * @param MessageFormatter $mf - * @param $coll + * @param IntlDateFormatter $formatter * @return string Description of the last error. */ -function datefmt_get_error_message(MessageFormatter $mf, $coll) { } +function datefmt_get_error_message(IntlDateFormatter $formatter): string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get string length in grapheme units * @link https://php.net/manual/en/function.grapheme-strlen.php - * @param string $input <p> + * @param string $string <p> * The string being measured for length. It must be a valid UTF-8 string. * </p> * @return int|false|null The length of the string on success, and 0 if the string is empty. */ -function grapheme_strlen($input) { } +function grapheme_strlen(string $string): int|false|null {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -4417,7 +4713,7 @@ function grapheme_strlen($input) { } * </p> * @return int|false the position as an integer. If needle is not found, strpos() will return boolean FALSE. */ -function grapheme_strpos($haystack, $needle, $offset = 0) { } +function grapheme_strpos(string $haystack, string $needle, int $offset = 0): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -4437,7 +4733,7 @@ function grapheme_strpos($haystack, $needle, $offset = 0) { } * </p> * @return int|false the position as an integer. If needle is not found, grapheme_stripos() will return boolean FALSE. */ -function grapheme_stripos($haystack, $needle, $offset = 0) { } +function grapheme_stripos(string $haystack, string $needle, int $offset = 0): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -4457,7 +4753,7 @@ function grapheme_stripos($haystack, $needle, $offset = 0) { } * </p> * @return int|false the position as an integer. If needle is not found, grapheme_strrpos() will return boolean FALSE. */ -function grapheme_strrpos($haystack, $needle, $offset = 0) { } +function grapheme_strrpos(string $haystack, string $needle, int $offset = 0): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -4477,7 +4773,7 @@ function grapheme_strrpos($haystack, $needle, $offset = 0) { } * </p> * @return int|false the position as an integer. If needle is not found, grapheme_strripos() will return boolean FALSE. */ -function grapheme_strripos($haystack, $needle, $offset = 0) { } +function grapheme_strripos(string $haystack, string $needle, int $offset = 0): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -4486,14 +4782,14 @@ function grapheme_strripos($haystack, $needle, $offset = 0) { } * @param string $string <p> * The input string. Must be valid UTF-8. * </p> - * @param int $start <p> + * @param int $offset <p> * Start position in default grapheme units. * If $start is non-negative, the returned string will start at the * $start'th position in $string, counting from zero. If $start is negative, * the returned string will start at the $start'th grapheme unit from the * end of string. * </p> - * @param int $length [optional] <p> + * @param int|null $length [optional] <p> * Length in grapheme units. * If $length is given and is positive, the string returned will contain * at most $length grapheme units beginning from $start (depending on the @@ -4503,10 +4799,10 @@ function grapheme_strripos($haystack, $needle, $offset = 0) { } * denotes a position beyond this truncation, <b>FALSE</b> will be returned. * </p> * @return string|false <p>the extracted part of $string,<br /> - or <strong>FALSE</strong> if $length is negative and $start denotes a position beyond truncation $length,<br /> - or also <strong>FALSE</strong> if $start denotes a position beyond $string length</p> + * or <strong>FALSE</strong> if $length is negative and $start denotes a position beyond truncation $length,<br /> + * or also <strong>FALSE</strong> if $start denotes a position beyond $string length</p> */ -function grapheme_substr($string, $start, $length = null) { } +function grapheme_substr(string $string, int $offset, ?int $length = null): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -4518,13 +4814,13 @@ function grapheme_substr($string, $start, $length = null) { } * @param string $needle <p> * The string to look for. Must be valid UTF-8. * </p> - * @param bool $before_needle [optional] <p> + * @param bool $beforeNeedle [optional] <p> * If <b>TRUE</b>, grapheme_strstr() returns the part of the * haystack before the first occurrence of the needle (excluding the needle). * </p> * @return string|false the portion of string, or FALSE if needle is not found. */ -function grapheme_strstr($haystack, $needle, $before_needle = false) { } +function grapheme_strstr(string $haystack, string $needle, bool $beforeNeedle = false): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -4536,13 +4832,13 @@ function grapheme_strstr($haystack, $needle, $before_needle = false) { } * @param string $needle <p> * The string to look for. Must be valid UTF-8. * </p> - * @param bool $before_needle [optional] <p> + * @param bool $beforeNeedle [optional] <p> * If <b>TRUE</b>, grapheme_strstr() returns the part of the * haystack before the first occurrence of the needle (excluding needle). * </p> * @return string|false the portion of $haystack, or FALSE if $needle is not found. */ -function grapheme_stristr($haystack, $needle, $before_needle = false) { } +function grapheme_stristr(string $haystack, string $needle, bool $beforeNeedle = false): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -4554,7 +4850,7 @@ function grapheme_stristr($haystack, $needle, $before_needle = false) { } * @param int $size <p> * Maximum number items - based on the $extract_type - to return. * </p> - * @param int $extract_type [optional] <p> + * @param int $type <p> * Defines the type of units referred to by the $size parameter: * </p> * <p> @@ -4565,20 +4861,20 @@ function grapheme_stristr($haystack, $needle, $before_needle = false) { } * GRAPHEME_EXTR_MAXCHARS - $size is the maximum number of UTF-8 * characters returned. * </p> - * @param int $start [optional] <p> + * @param int $offset [optional] <p> * Starting position in $haystack in bytes - if given, it must be zero or a * positive value that is less than or equal to the length of $haystack in * bytes. If $start does not point to the first byte of a UTF-8 * character, the start position is moved to the next character boundary. * </p> - * @param int $next [optional] <p> + * @param int &$next [optional] <p> * Reference to a value that will be set to the next starting position. * When the call returns, this may point to the first byte position past the end of the string. * </p> * @return string|false A string starting at offset $start and ending on a default grapheme cluster * boundary that conforms to the $size and $extract_type specified. */ -function grapheme_extract($haystack, $size, $extract_type = null, $start = 0, &$next = null) { } +function grapheme_extract(string $haystack, int $size, int $type = 0, int $offset = 0, &$next = null): string|false {} /** * (PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.2, PHP 7, PECL idn >= 0.1)<br/> @@ -4590,13 +4886,13 @@ function grapheme_extract($haystack, $size, $extract_type = null, $start = 0, &$ * passed it will be converted into an ACE encoded "xn--" string. * It will not be the one you expected though! * </p> - * @param int $options [optional] <p> + * @param int $flags [optional] <p> * Conversion options - combination of IDNA_* constants (except IDNA_ERROR_* constants). * </p> * @param int $variant [optional] <p> * Either INTL_IDNA_VARIANT_2003 for IDNA 2003 or INTL_IDNA_VARIANT_UTS46 for UTS #46. * </p> - * @param array $idna_info [optional] <p> + * @param array &$idna_info [optional] <p> * This parameter can be used only if INTL_IDNA_VARIANT_UTS46 was used for variant. * In that case, it will be filled with an array with the keys 'result', * the possibly illegal result of the transformation, 'isTransitionalDifferent', @@ -4606,7 +4902,7 @@ function grapheme_extract($haystack, $size, $extract_type = null, $start = 0, &$ * </p> * @return string|false The ACE encoded version of the domain name or <b>FALSE</b> on failure. */ -function idn_to_ascii($domain, $options = 0, $variant = INTL_IDNA_VARIANT_2003, array &$idna_info = null) { } +function idn_to_ascii(string $domain, int $flags = 0, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info): string|false {} /** * (PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.2, PHP 7, PECL idn >= 0.1)<br/> @@ -4616,13 +4912,13 @@ function idn_to_ascii($domain, $options = 0, $variant = INTL_IDNA_VARIANT_2003, * Domain to convert in IDNA ASCII-compatible format. * The ASCII encoded domain name. Looks like "xn--..." if the it originally contained non-ASCII characters. * </p> - * @param int $options [optional] <p> + * @param int $flags [optional] <p> * Conversion options - combination of IDNA_* constants (except IDNA_ERROR_* constants). * </p> * @param int $variant [optional] <p> * Either INTL_IDNA_VARIANT_2003 for IDNA 2003 or INTL_IDNA_VARIANT_UTS46 for UTS #46. * </p> - * @param int &$idna_info [optional] <p> + * @param array &$idna_info [optional] <p> * This parameter can be used only if INTL_IDNA_VARIANT_UTS46 was used for variant. * In that case, it will be filled with an array with the keys 'result', * the possibly illegal result of the transformation, 'isTransitionalDifferent', @@ -4634,13 +4930,18 @@ function idn_to_ascii($domain, $options = 0, $variant = INTL_IDNA_VARIANT_2003, * RFC 3490 4.2 states though "ToUnicode never fails. If any step fails, then the original input * sequence is returned immediately in that step." */ -function idn_to_utf8($domain, $options = 0, $variant = INTL_IDNA_VARIANT_2003, array &$idna_info) { } +function idn_to_utf8( + string $domain, + int $flags = 0, + int $variant = INTL_IDNA_VARIANT_UTS46, + &$idna_info = null, +): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Create a new IntlCalendar - * @link https://www.php.net/manual/en/intlcalendar.createinstance.php - * @param mixed $timeZone [optional] <p> <p> + * @link https://secure.php.net/manual/en/intlcalendar.createinstance.php + * @param IntlTimeZone|DateTimeZone|string|null $timezone [optional] <p> <p> * The timezone to use. * </p> * @@ -4648,113 +4949,115 @@ function idn_to_utf8($domain, $options = 0, $variant = INTL_IDNA_VARIANT_2003, a * <li> * <p> * <b>NULL</b>, in which case the default timezone will be used, as specified in - * the ini setting {@link https://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or - * through the function {@link https://www.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as - * returned by {@link https://www.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}. + * the ini setting {@link https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or + * through the function {@link https://secure.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as + * returned by {@link https://secure.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}. * </p> * </li> * <li> * <p> - * An {@link https://www.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly. + * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly. * </p> * </li> * <li> * <p> - * A {@link https://www.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted + * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted * and an ICU timezone object will be created; the timezone will be backed * by ICU's database, not PHP's. * </p> * </li> * <li> * <p> - * A {@link https://www.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier. + * A {@link https://secure.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier. * See <b>IntlTimeZone::createTimeZoneIDEnumeration()</b>. Raw * offsets such as <em>"GMT+08:30"</em> are also accepted. * </p> * </li> * </ul> * </p> - * @param string $locale [optional] <p> - * A locale to use or <b>NULL</b> to use {@link https://www.php.net/manual/en/intl.configuration.php#ini.intl.default-locale the default locale}. + * @param string|null $locale [optional] <p> + * A locale to use or <b>NULL</b> to use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.default-locale the default locale}. * </p> - * @return IntlCalendar - * The created {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} instance or <b>NULL</b> on + * @return IntlCalendar|null + * The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} instance or <b>NULL</b> on * failure. * @since 5.5 */ -function intlcal_create_instance($timeZone = null, $locale = null) { } +function intlcal_create_instance($timezone = null, ?string $locale = null): ?IntlCalendar {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get set of locale keyword values - * @param string $key <p> + * @param string $keyword <p> * The locale keyword for which relevant values are to be queried. Only * <em>'calendar'</em> is supported. * </p> * @param string $locale <p> * The locale onto which the keyword/value pair are to be appended. * </p> - * @param bool $commonlyUsed + * @param bool $onlyCommon * <p> * Whether to show only the values commonly used for the specified locale. * </p> - * @return Iterator|false An iterator that yields strings with the locale keyword values or <b>FALSE</b> on failure. + * @return IntlIterator|false An iterator that yields strings with the locale keyword values or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_get_keyword_values_for_locale($key, $locale, $commonlyUsed) { } +function intlcal_get_keyword_values_for_locale(string $keyword, string $locale, bool $onlyCommon): IntlIterator|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get number representing the current time - * @link https://www.php.net/manual/en/intlcalendar.getnow.php + * @link https://secure.php.net/manual/en/intlcalendar.getnow.php * @return float A float representing a number of milliseconds since the epoch, not counting leap seconds. * @since 5.5 */ -function intlcal_get_now() { } +function intlcal_get_now(): float {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get array of locales for which there is data - * @link https://www.php.net/manual/en/intlcalendar.getavailablelocales.php - * @return array An array of strings, one for which locale. + * @link https://secure.php.net/manual/en/intlcalendar.getavailablelocales.php + * @return string[] An array of strings, one for which locale. * @since 5.5 */ - -function intlcal_get_available_locales() { } +function intlcal_get_available_locales(): array {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the value for a field - * @link https://www.php.net/manual/en/intlcalendar.get.php + * @link https://secure.php.net/manual/en/intlcalendar.get.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> * @return int An integer with the value of the time field. * @since 5.5 */ -function intl_get($calendar, $field) { } +function intl_get($calendar, $field) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get time currently represented by the object * @param IntlCalendar $calendar <p>The calendar whose time will be checked against this object's time.</p> * @return float - * A {@link https://www.php.net/manual/en/language.types.float.php float} representing the number of milliseconds elapsed since the + * A {@link https://secure.php.net/manual/en/language.types.float.php float} representing the number of milliseconds elapsed since the * reference time (1 Jan 1970 00:00:00 UTC). * @since 5.5 */ -function intlcal_get_time($calendar) { } +function intlcal_get_time(IntlCalendar $calendar): float|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set the calendar time in milliseconds since the epoch - * @link https://www.php.net/manual/en/intlcalendar.settime.php - * @param float $date <p> + * @link https://secure.php.net/manual/en/intlcalendar.settime.php + * @param IntlCalendar $calendar <p> + * The IntlCalendar resource. + * </p> + * @param float $timestamp <p> * An instant represented by the number of number of milliseconds between * such instant and the epoch, ignoring leap seconds. * </p> @@ -4762,35 +5065,35 @@ function intlcal_get_time($calendar) { } * Returns <b>TRUE</b> on success and <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_set_time($date) { } +function intlcal_set_time(IntlCalendar $calendar, float $timestamp): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Add a (signed) amount of time to a field - * @link https://www.php.net/manual/en/intlcalendar.add.php + * @link https://secure.php.net/manual/en/intlcalendar.add.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. * These are integer values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @param int $amount <p>The signed amount to add to the current field. If the amount is positive, the instant will be moved forward; if it is negative, the instant wil be moved into the past. The unit is implicit to the field type. + * @param int $value <p>The signed amount to add to the current field. If the amount is positive, the instant will be moved forward; if it is negative, the instant wil be moved into the past. The unit is implicit to the field type. * For instance, hours for IntlCalendar::FIELD_HOUR_OF_DAY.</p> * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_add($calendar, $field, $amount) { } +function intlcal_add(IntlCalendar $calendar, int $field, int $value): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set the timezone used by this calendar - * @link https://www.php.net/manual/en/intlcalendar.settimezone.php + * @link https://secure.php.net/manual/en/intlcalendar.settimezone.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param mixed $timeZone <p> + * @param IntlTimeZone|DateTimeZone|string|null $timezone <p> * The new timezone to be used by this calendar. It can be specified in the * following ways: * @@ -4798,26 +5101,26 @@ function intlcal_add($calendar, $field, $amount) { } * <li> * <p> * <b>NULL</b>, in which case the default timezone will be used, as specified in - * the ini setting {@link https://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or - * through the function {@link https://www.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as - * returned by {@link https://www.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}. + * the ini setting {@link https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or + * through the function {@link https://secure.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as + * returned by {@link https://secure.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}. * </p> * </li> * <li> * <p> - * An {@link https://www.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly. + * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly. * </p> * </li> * <li> * <p> - * A {@link https://www.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted + * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted * and an ICU timezone object will be created; the timezone will be backed * by ICU's database, not PHP's. * </p> * </li> * <li> * <p> - * A {@link https://www.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier. + * A {@link https://secure.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier. * See <b>IntlTimeZone::createTimeZoneIDEnumeration()</b>. Raw * offsets such as <em>"GMT+08:30"</em> are also accepted. * </p> @@ -4826,53 +5129,53 @@ function intlcal_add($calendar, $field, $amount) { } * @return bool Returns <b>TRUE</b> on success and <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_set_time_zone($calendar, $timeZone) { } +function intlcal_set_time_zone(IntlCalendar $calendar, $timezone): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether this object's time is after that of the passed object - * https://www.php.net/manual/en/intlcalendar.after.php - * @param IntlCalendar $calendarObject <p> + * https://secure.php.net/manual/en/intlcalendar.after.php + * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param IntlCalendar $calendar <p>The calendar whose time will be checked against this object's time.</p> + * @param IntlCalendar $other <p>The calendar whose time will be checked against this object's time.</p> * @return bool * Returns <b>TRUE</b> if this object's current time is after that of the * <em>calendar</em> argument's time. Returns <b>FALSE</b> otherwise. - * Also returns <b>FALSE</b> on failure. You can use {@link https://www.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or - * {@link https://www.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions. + * Also returns <b>FALSE</b> on failure. You can use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or + * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions. * @since 5.5 */ -function intlcal_after(IntlCalendar $calendarObject, IntlCalendar $calendar) { } +function intlcal_after(IntlCalendar $calendar, IntlCalendar $other): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether this object's time is before that of the passed object - * @link https://www.php.net/manual/en/intlcalendar.before.php - * @param IntlCalendar $calendarObject <p> + * @link https://secure.php.net/manual/en/intlcalendar.before.php + * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param IntlCalendar $calendar <p> The calendar whose time will be checked against this object's time.</p> + * @param IntlCalendar $other <p> The calendar whose time will be checked against this object's time.</p> * @return bool + * <p> * Returns <b>TRUE</B> if this object's current time is before that of the * <em>calendar</em> argument's time. Returns <b>FALSE</b> otherwise. - * Also returns <b>FALSE</b> on failure. You can use {@link https://www.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or - * {@link https://www.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions. + * Also returns <b>FALSE</b> on failure. You can use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or + * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions. * </p> * @since 5.5 */ -function intlcal_before(IntlCalendar $calendarObject, IntlCalendar $calendar) { } - +function intlcal_before(IntlCalendar $calendar, IntlCalendar $other): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set a time field or several common fields at once - * @link https://www.php.net/manual/en/intlcalendar.set.php + * @link https://secure.php.net/manual/en/intlcalendar.set.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $year <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> @@ -4895,26 +5198,26 @@ function intlcal_before(IntlCalendar $calendarObject, IntlCalendar $calendar) { * </p> * @param int $second [optional] <p> * The new value for <b>IntlCalendar::FIELD_SECOND</b>. - *</p> + * </p> * @return bool Returns <b>TRUE</b> on success and <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_set($calendar, $year, $month, $dayOfMonth = null, $hour = null, $minute = null, $second = null) { } +function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth, int $hour, int $minute, int $second): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Add value to field without carrying into more significant fields - * @link https://www.php.net/manual/en/intlcalendar.roll.php + * @link https://secure.php.net/manual/en/intlcalendar.roll.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $field <p>One of the - * {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time - * {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. + * {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time + * {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. * These are integer values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @param mixed $amountOrUpOrDown <p> + * @param int|bool $value <p> * The (signed) amount to add to the field, <b>TRUE</b> for rolling up (adding * <em>1</em>), or <b>FALSE</b> for rolling down (subtracting * <em>1</em>). @@ -4922,33 +5225,37 @@ function intlcal_set($calendar, $year, $month, $dayOfMonth = null, $hour = null, * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_roll($calendar, $field, $amountOrUpOrDown) { } +function intlcal_roll( + IntlCalendar $calendar, + int $field, + $value +): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Clear a field or all fields - * @link https://www.php.net/manual/en/intlcalendar.clear.php + * @link https://secure.php.net/manual/en/intlcalendar.clear.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param int $field [optional] <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * @param int|null $field [optional] <p> + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. Failure can only occur is invalid arguments are provided. * @since 5.5 */ -function intlcal_clear($calendar, $field = null) { } +function intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Calculate difference between given time and this object's time - * @link https://www.php.net/manual/en/intlcalendar.fielddifference.php + * @link https://secure.php.net/manual/en/intlcalendar.fielddifference.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param float $when <p> + * @param float $timestamp <p> * The time against which to compare the quantity represented by the * <em>field</em>. For the result to be positive, the time * given for this parameter must be ahead of the time of the object the @@ -4959,7 +5266,7 @@ function intlcal_clear($calendar, $field = null) { } * </p> * * <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> @@ -4967,50 +5274,49 @@ function intlcal_clear($calendar, $field = null) { } * specified field or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_field_difference($calendar, $when, $field) { } - +function intlcal_field_difference(IntlCalendar $calendar, float $timestamp, int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * The maximum value for a field, considering the object's current time - * @link https://www.php.net/manual/en/intlcalendar.getactualmaximum.php + * @link https://secure.php.net/manual/en/intlcalendar.getactualmaximum.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> * @return int - * An {@link https://www.php.net/manual/en/language.types.integer.php int} representing the maximum value in the units associated + * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing the maximum value in the units associated * with the given <em>field</em> or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_get_actual_maximum($calendar, $field) { } +function intlcal_get_actual_maximum(IntlCalendar $calendar, int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * The minimum value for a field, considering the object's current time - * @link https://www.php.net/manual/en/intlcalendar.getactualminimum.php + * @link https://secure.php.net/manual/en/intlcalendar.getactualminimum.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. * These are integer values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> * @return int - * An {@link https://www.php.net/manual/en/language.types.integer.php int} representing the minimum value in the field's + * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing the minimum value in the field's * unit or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_get_actual_minimum($calendar, $field) { } +function intlcal_get_actual_minimum(IntlCalendar $calendar, int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> - * @link https://www.php.net/manual/en/intlcalendar.getdayofweektype.php + * @link https://secure.php.net/manual/en/intlcalendar.getdayofweektype.php * Tell whether a day is a weekday, weekend or a day that has a transition between the two * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. @@ -5028,12 +5334,12 @@ function intlcal_get_actual_minimum($calendar, $field) { } * <b>IntlCalendar::DOW_TYPE_WEEKEND_CEASE</b> or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_get_day_of_week_type($calendar, $dayOfWeek) { } +function intlcal_get_day_of_week_type(IntlCalendar $calendar, int $dayOfWeek): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the first day of the week for the calendar's locale - * @link https://www.php.net/manual/en/intlcalendar.getfirstdayofweek.php + * @link https://secure.php.net/manual/en/intlcalendar.getfirstdayofweek.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> @@ -5043,88 +5349,86 @@ function intlcal_get_day_of_week_type($calendar, $dayOfWeek) { } * <b>IntlCalendar::DOW_SATURDAY</b> or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_get_first_day_of_week($calendar) { } +function intlcal_get_first_day_of_week(IntlCalendar $calendar): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the largest local minimum value for a field - * @link https://www.php.net/manual/en/intlcalendar.getgreatestminimum.php + * @link https://secure.php.net/manual/en/intlcalendar.getgreatestminimum.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and - * <b>IntlCalendar::FIELD_COUNT</b>. + * <b>IntlCalendar::FIELD_COUNT</b>.</p> * @return int - * An {@link https://www.php.net/manual/en/language.types.integer.php int} representing a field value, in the field's + * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing a field value, in the field's * unit, or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_greates_minimum($calendar, $field) { } +function intlcal_greates_minimum($calendar, $field) {} /** - * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> - * Get data from the bundle - * @link https://php.net/manual/en/resourcebundle.get.php + * (PHP >= 5.5.0, PECL intl >= 3.0.0a1)<br/> + * Gets the value for a specific field. + * @link https://www.php.net/manual/en/intlcalendar.get.php * @param IntlCalendar $calendar <p> - * The calendar object, on the procedural style interface. + * The IntlCalendar resource. * </p> - * @param string|int $index <p> - * Data index, must be string or integer. + * @param int $field <p> + * One of the IntlCalendar date/time field constants. These are integer values between 0 and IntlCalendar::FIELD_COUNT. * </p> - * @return mixed the data located at the index or <b>NULL</b> on error. Strings, integers and binary data strings - * are returned as corresponding PHP types, integer array is returned as PHP array. Complex types are - * returned as <b>ResourceBundle</b> object. + * @return int An integer with the value of the time field. */ -function intlcal_get($calendar, $index) { } +function intlcal_get(IntlCalendar $calendar, int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the smallest local maximum for a field - * @link https://www.php.net/manual/en/intlcalendar.getleastmaximum.php + * @link https://secure.php.net/manual/en/intlcalendar.getleastmaximum.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> * @return int - * An {@link https://www.php.net/manual/en/language.types.integer.ph int} representing a field value in the field's + * <p>An {@link https://secure.php.net/manual/en/language.types.integer.ph int} representing a field value in the field's * unit or <b>FALSE</b> on failure. * </p> * @since 5.5 */ -function intlcal_get_least_maximum($calendar, $field) { } +function intlcal_get_least_maximum(IntlCalendar $calendar, int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the largest local minimum value for a field - * @link https://www.php.net/manual/en/intlcalendar.getgreatestminimum.php + * @link https://secure.php.net/manual/en/intlcalendar.getgreatestminimum.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and - * <b>IntlCalendar::FIELD_COUNT</b>. + * <b>IntlCalendar::FIELD_COUNT</b>.</p> * @return int - * An {@link https://www.php.net/manual/en/language.types.integer.php int} representing a field value, in the field's + * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing a field value, in the field's * unit, or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_get_greatest_minimum($calendar, $field) { } +function intlcal_get_greatest_minimum(IntlCalendar $calendar, int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the locale associated with the object - * @link https://www.php.net/manual/en/intlcalendar.getlocale.php + * @link https://secure.php.net/manual/en/intlcalendar.getlocale.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param int $localeType <p> + * @param int $type <p> * Whether to fetch the actual locale (the locale from which the calendar * data originates, with <b>Locale::ACTUAL_LOCALE</b>) or the * valid locale, i.e., the most specific locale supported by ICU relatively @@ -5136,49 +5440,47 @@ function intlcal_get_greatest_minimum($calendar, $field) { } * A locale string or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_get_locale($calendar, $localeType) { } +function intlcal_get_locale(IntlCalendar $calendar, int $type): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the global maximum value for a field - * @link https://www.php.net/manual/en/intlcalendar.getmaximum.php + * @link https://secure.php.net/manual/en/intlcalendar.getmaximum.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @return string - * A locale string or <b>FALSE</b> on failure. + * @return int|false * @since 5.5 */ -function intcal_get_maximum($calendar, $field) { } - +function intcal_get_maximum($calendar, $field) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> - * @link https://www.php.net/manual/en/intlcalendar.getminimaldaysinfirstweek.php + * @link https://secure.php.net/manual/en/intlcalendar.getminimaldaysinfirstweek.php * Get minimal number of days the first week in a year or month can have * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @return int - * An {@link https://www.php.net/manual/en/language.types.integer.php int} representing a number of days or <b>FALSE</b> on failure. + * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing a number of days or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_get_minimal_days_in_first_week($calendar) { } +function intlcal_get_minimal_days_in_first_week(IntlCalendar $calendar): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the global minimum value for a field - * @link https://www.php.net/manual/en/intlcalendar.getminimum.php + * @link https://secure.php.net/manual/en/intlcalendar.getminimum.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> @@ -5186,44 +5488,44 @@ function intlcal_get_minimal_days_in_first_week($calendar) { } * An int representing a value for the given field in the field's unit or FALSE on failure. * @since 5.5 */ -function intlcal_get_minimum($calendar, $field) { } +function intlcal_get_minimum(IntlCalendar $calendar, int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the object's timezone - * @link https://www.php.net/manual/en/intlcalendar.gettimezone.php + * @link https://secure.php.net/manual/en/intlcalendar.gettimezone.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @return IntlTimeZone - * An {@link https://www.php.net/manual/en/class.intltimezone.php IntlTimeZone} object corresponding to the one used + * @return IntlTimeZone|false + * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone} object corresponding to the one used * internally in this object. * @since 5.5 */ -function intlcal_get_time_zone($calendar) { } +function intlcal_get_time_zone(IntlCalendar $calendar): IntlTimeZone|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the calendar type - * @link https://www.php.net/manual/en/intlcalendar.gettype.php + * @link https://secure.php.net/manual/en/intlcalendar.gettype.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @return string - * A {@link https://www.php.net/manual/en/language.types.string.php string} representing the calendar type, such as + * A {@link https://secure.php.net/manual/en/language.types.string.php string} representing the calendar type, such as * <em>'gregorian'</em>, <em>'islamic'</em>, etc. * @since 5.5 */ -function intlcal_get_type($calendar) { } +function intlcal_get_type(IntlCalendar $calendar): string {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get time of the day at which weekend begins or ends - * @link https://www.php.net/manual/en/intlcalendar.getweekendtransition.php + * @link https://secure.php.net/manual/en/intlcalendar.getweekendtransition.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param string $dayOfWeek <p> + * @param int $dayOfWeek <p> * One of the constants <b>IntlCalendar::DOW_SUNDAY</b>, * <b>IntlCalendar::DOW_MONDAY</b>, ..., * <b>IntlCalendar::DOW_SATURDAY</b>. @@ -5233,115 +5535,113 @@ function intlcal_get_type($calendar) { } * ends or <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_get_weekend_transition($calendar, $dayOfWeek) { } +function intlcal_get_weekend_transition(IntlCalendar $calendar, int $dayOfWeek): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether the object's time is in Daylight Savings Time - * @link https://www.php.net/manual/en/intlcalendar.indaylighttime.php + * @link https://secure.php.net/manual/en/intlcalendar.indaylighttime.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @return bool * Returns <b>TRUE</b> if the date is in Daylight Savings Time, <b>FALSE</b> otherwise. * The value <b>FALSE</b> may also be returned on failure, for instance after - * specifying invalid field values on non-lenient mode; use {@link https://www.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query - * {@link https://www.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate. + * specifying invalid field values on non-lenient mode; use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query + * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate. * @since 5.5 */ -function intlcal_in_daylight_time($calendar) { } +function intlcal_in_daylight_time(IntlCalendar $calendar): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether date/time interpretation is in lenient mode - * @link https://www.php.net/manual/en/intlcalendar.islenient.php + * @link https://secure.php.net/manual/en/intlcalendar.islenient.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @return bool - * A {@link https://www.php.net/manual/en/language.types.boolean.php bool} representing whether the calendar is set to lenient mode. + * A {@link https://secure.php.net/manual/en/language.types.boolean.php bool} representing whether the calendar is set to lenient mode. * @since 5.5 */ -function intlcal_is_lenient($calendar) { } +function intlcal_is_lenient(IntlCalendar $calendar): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether a field is set - * @link https://www.php.net/manual/en/intlcalendar.isset.php + * @link https://secure.php.net/manual/en/intlcalendar.isset.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> * @return bool Assuming there are no argument errors, returns <b>TRUE</b> iif the field is set. * @since 5.5 */ -function intlcal_is_set($calendar, $field) { } +function intlcal_is_set(IntlCalendar $calendar, int $field): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the global maximum value for a field - * @link https://www.php.net/manual/en/intlcalendar.getmaximum.php + * @link https://secure.php.net/manual/en/intlcalendar.getmaximum.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @param int $field <p> - * One of the {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://www.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer + * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer * values between <em>0</em> and * <b>IntlCalendar::FIELD_COUNT</b>. * </p> - * @return string - * A locale string or <b>FALSE</b> on failure. + * @return int|false * @since 5.5 */ -function intlcal_get_maximum($calendar, $field) { } +function intlcal_get_maximum(IntlCalendar $calendar, int $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether another calendar is equal but for a different time - * @link https://www.php.net/manual/en/intlcalendar.isequivalentto.php - * @param IntlCalendar $calendarObject <p> + * @link https://secure.php.net/manual/en/intlcalendar.isequivalentto.php + * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param IntlCalendar $calendar The other calendar against which the comparison is to be made. + * @param IntlCalendar $other The other calendar against which the comparison is to be made. * @return bool * Assuming there are no argument errors, returns <b>TRUE</b> iif the calendars are equivalent except possibly for their set time. * @since 5.5 */ -function intlcal_is_equivalent_to(IntlCalendar $calendarObject, IntlCalendar $calendar) { } +function intlcal_is_equivalent_to(IntlCalendar $calendar, IntlCalendar $other): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Whether a certain date/time is in the weekend - * @link https://www.php.net/manual/en/intlcalendar.isweekend.php + * @link https://secure.php.net/manual/en/intlcalendar.isweekend.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param float|null $date [optional] <p> + * @param float|null $timestamp [optional] <p> * An optional timestamp representing the number of milliseconds since the * epoch, excluding leap seconds. If <b>NULL</b>, this object's current time is * used instead. * </p> * @return bool - * <p> A {@link https://www.php.net/manual/en/language.types.boolean.php bool} indicating whether the given or this object's time occurs + * <p> A {@link https://secure.php.net/manual/en/language.types.boolean.php bool} indicating whether the given or this object's time occurs * in a weekend. * </p> * <p> * The value <b>FALSE</b> may also be returned on failure, for instance after giving - * a date out of bounds on non-lenient mode; use {@link https://www.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query - * {@link https://www.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.</p> + * a date out of bounds on non-lenient mode; use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query + * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.</p> * @since 5.5 */ -function intlcal_is_weekend($calendar, $date = null) { } - +function intlcal_is_weekend(IntlCalendar $calendar, ?float $timestamp = null): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set the day on which the week is deemed to start - * @link https://www.php.net/manual/en/intlcalendar.setfirstdayofweek.php + * @link https://secure.php.net/manual/en/intlcalendar.setfirstdayofweek.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> @@ -5353,28 +5653,27 @@ function intlcal_is_weekend($calendar, $date = null) { } * @return bool Returns TRUE on success. Failure can only happen due to invalid parameters. * @since 5.5 */ -function intlcal_set_first_day_of_week($calendar, $dayOfWeek) { } +function intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set whether date/time interpretation is to be lenient - * @link https://www.php.net/manual/en/intlcalendar.setlenient.php + * @link https://secure.php.net/manual/en/intlcalendar.setlenient.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param string $isLenient <p> + * @param bool $lenient <p> * Use <b>TRUE</b> to activate the lenient mode; <b>FALSE</b> otherwise. * </p> * @return bool Returns <b>TRUE</b> on success. Failure can only happen due to invalid parameters. * @since 5.5 */ -function intlcal_set_lenient($calendar, $isLenient) { } - +function intlcal_set_lenient(IntlCalendar $calendar, bool $lenient): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get behavior for handling repeating wall time - * @link https://www.php.net/manual/en/intlcalendar.getrepeatedwalltimeoption.php + * @link https://secure.php.net/manual/en/intlcalendar.getrepeatedwalltimeoption.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> @@ -5383,31 +5682,31 @@ function intlcal_set_lenient($calendar, $isLenient) { } * <b>IntlCalendar::WALLTIME_LAST</b>. * @since 5.5 */ -function intlcal_get_repeated_wall_time_option($calendar) { } +function intlcal_get_repeated_wall_time_option(IntlCalendar $calendar): int {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Compare time of two IntlCalendar objects for equality - * @link https://www.php.net/manual/en/intlcalendar.equals.php - * @param IntlCalendar $calendarObject <p> + * @link https://secure.php.net/manual/en/intlcalendar.equals.php + * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param IntlCalendar $calendar + * @param IntlCalendar $other * @return bool <p> * Returns <b>TRUE</b> if the current time of both this and the passed in - * {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} object are the same, or <b>FALSE</b> + * {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} object are the same, or <b>FALSE</b> * otherwise. The value <b>FALSE</b> can also be returned on failure. This can only * happen if bad arguments are passed in. In any case, the two cases can be - * distinguished by calling {@link https://www.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()}. + * distinguished by calling {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()}. * </p> * @since 5.5 */ -function intlcal_equals($calendarObject, $calendar) { } +function intlcal_equals(IntlCalendar $calendar, IntlCalendar $other): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get behavior for handling skipped wall time - * @link https://www.php.net/manual/en/intlcalendar.getskippedwalltimeoption.php + * @link https://secure.php.net/manual/en/intlcalendar.getskippedwalltimeoption.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> @@ -5417,16 +5716,16 @@ function intlcal_equals($calendarObject, $calendar) { } * <b>IntlCalendar::WALLTIME_NEXT_VALID</b>. * @since 5.5 */ -function intlcal_get_skipped_wall_time_option($calendar) { } +function intlcal_get_skipped_wall_time_option(IntlCalendar $calendar): int {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set behavior for handling repeating wall times at negative timezone offset transitions - * @link https://www.php.net/manual/en/intlcalendar.setrepeatedwalltimeoption.php + * @link https://secure.php.net/manual/en/intlcalendar.setrepeatedwalltimeoption.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param int $wallTimeOption <p> + * @param int $option <p> * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b> or * <b>IntlCalendar::WALLTIME_LAST</b>. * </p> @@ -5434,16 +5733,16 @@ function intlcal_get_skipped_wall_time_option($calendar) { } * Returns <b>TRUE</b> on success. Failure can only happen due to invalid parameters. * @since 5.5 */ -function intlcal_set_repeated_wall_time_option($calendar, $wallTimeOption) { } +function intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $option): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Set behavior for handling skipped wall times at positive timezone offset transitions - * @link https://www.php.net/manual/en/intlcalendar.setskippedwalltimeoption.php + * @link https://secure.php.net/manual/en/intlcalendar.setskippedwalltimeoption.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @param int $wallTimeOption <p> + * @param int $option <p> * One of the constants <b>IntlCalendar::WALLTIME_FIRST</b>, * <b>IntlCalendar::WALLTIME_LAST</b> or * <b>IntlCalendar::WALLTIME_NEXT_VALID</b>. @@ -5454,367 +5753,373 @@ function intlcal_set_repeated_wall_time_option($calendar, $wallTimeOption) { } * </p> * @since 5.5 */ -function intlcal_set_skipped_wall_time_option($calendar, $wallTimeOption) { } +function intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $option): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a2)<br/> * Create an IntlCalendar from a DateTime object or string - * @link https://www.php.net/manual/en/intlcalendar.fromdatetime.php - * @param mixed $dateTime <p> - * A {@link https://www.php.net/manual/en/class.datetime.php DateTime} object or a {@link https://www.php.net/manual/en/language.types.string.php string} that - * can be passed to {@link https://www.php.net/manual/en/datetime.construct.php DateTime::__construct()}. - * </p> - * @return IntlCalendar - * The created {@link https://www.php.net/manual/en/class.intlcalendar.php IntlCalendar} object or <b>NULL</b> in case of - * failure. If a {@link https://www.php.net/manual/en/language.types.string.php string} is passed, any exception that occurs - * inside the {@link https://www.php.net/manual/en/class.datetime.php DateTime} constructor is propagated. + * @link https://secure.php.net/manual/en/intlcalendar.fromdatetime.php + * @param DateTime|string $datetime <p> + * A {@link https://secure.php.net/manual/en/class.datetime.php DateTime} object or a {@link https://secure.php.net/manual/en/language.types.string.php string} that + * can be passed to {@link https://secure.php.net/manual/en/datetime.construct.php DateTime::__construct()}. + * </p> + * @param null|string $locale + * @return IntlCalendar|null + * The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} object or <b>NULL</b> in case of + * failure. If a {@link https://secure.php.net/manual/en/language.types.string.php string} is passed, any exception that occurs + * inside the {@link https://secure.php.net/manual/en/class.datetime.php DateTime} constructor is propagated. * @since 5.5 */ -function intlcal_from_date_time($dateTime) { } - +function intlcal_from_date_time( + DateTime|string $datetime, + ?string $locale = null +): ?IntlCalendar {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a2)<br/> * Convert an IntlCalendar into a DateTime object - * @link https://www.php.net/manual/en/intlcalendar.todatetime.php + * @link https://secure.php.net/manual/en/intlcalendar.todatetime.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> * @return DateTime|false - * A {@link https://www.php.net/manual/en/class.datetime.php DateTime} object with the same timezone as this + * A {@link https://secure.php.net/manual/en/class.datetime.php DateTime} object with the same timezone as this * object (though using PHP's database instead of ICU's) and the same time, * except for the smaller precision (second precision instead of millisecond). * Returns <b>FALSE</b> on failure. * @since 5.5 */ -function intlcal_to_date_time($calendar) { } - +function intlcal_to_date_time(IntlCalendar $calendar): DateTime|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get last error code on the object - * @link https://www.php.net/manual/en/intlcalendar.geterrorcode.php + * @link https://secure.php.net/manual/en/intlcalendar.geterrorcode.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @return int An ICU error code indicating either success, failure or a warning. + * @return int|false An ICU error code indicating either success, failure or a warning. * @since 5.5 */ -function intlcal_get_error_code($calendar) { } +function intlcal_get_error_code(IntlCalendar $calendar): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get last error message on the object - * @link https://www.php.net/manual/en/intlcalendar.geterrormessage.php + * @link https://secure.php.net/manual/en/intlcalendar.geterrormessage.php * @param IntlCalendar $calendar <p> * The calendar object, on the procedural style interface. * </p> - * @return string The error message associated with last error that occurred in a function call on this object, or a string indicating the non-existance of an error. + * @return string|false The error message associated with last error that occurred in a function call on this object, or a string indicating the non-existance of an error. * @since 5.5 */ -function intlcal_get_error_message($calendar) { } - +function intlcal_get_error_message(IntlCalendar $calendar): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the number of IDs in the equivalency group that includes the given ID - * @link https://www.php.net/manual/en/intltimezone.countequivalentids.php - * @param string $zoneId - * @return int + * @link https://secure.php.net/manual/en/intltimezone.countequivalentids.php + * @param string $timezoneId + * @return int|false * @since 5.5 */ -function intltz_count_equivalent_ids($zoneId) { } +function intltz_count_equivalent_ids(string $timezoneId): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Create a new copy of the default timezone for this host - * @link https://www.php.net/manual/en/intltimezone.createdefault.php + * @link https://secure.php.net/manual/en/intltimezone.createdefault.php * @return IntlTimeZone * @since 5.5 */ -function intlz_create_default() { } +function intlz_create_default() {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> - * @link https://www.php.net/manual/en/intltimezone.createenumeration.php - * @param mixed $countryOrRawOffset [optional] - * @return IntlIterator + * @link https://secure.php.net/manual/en/intltimezone.createenumeration.php + * @param IntlTimeZone|string|int|float|null $countryOrRawOffset [optional] + * @return IntlIterator|false * @since 5.5 */ -function intltz_create_enumeration($countryOrRawOffset) { } +function intltz_create_enumeration($countryOrRawOffset): IntlIterator|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> - * @link https://www.php.net/manual/en/intltimezone.createtimezone.php - * @param string $zoneId - * @return IntlTimeZone + * @link https://secure.php.net/manual/en/intltimezone.createtimezone.php + * @param string $timezoneId + * @return IntlTimeZone|null * @since 5.5 */ -function intltz_create_time_zone($zoneId) { } +function intltz_create_time_zone(string $timezoneId): ?IntlTimeZone {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> - * @link https://www.php.net/manual/en/intltimezone.fromdatetimezone.php - * @param DateTimeZone $zoneId - * @return IntlTimeZone + * @link https://secure.php.net/manual/en/intltimezone.fromdatetimezone.php + * @param DateTimeZone $timezone + * @return IntlTimeZone|null * @since 5.5 */ -function intltz_from_date_time_zone($zoneId) { } +function intltz_from_date_time_zone(DateTimeZone $timezone): ?IntlTimeZone {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID - * @link https://www.php.net/manual/en/intltimezone.getcanonicalid.php - * @param string $zoneId - * @param bool $isSystemID [optional] - * @return string + * @link https://secure.php.net/manual/en/intltimezone.getcanonicalid.php + * @param string $timezoneId + * @param bool &$isSystemId [optional] + * @return string|false * @since 5.5 */ -function intltz_get_canonical_id($zoneId, &$isSystemID) { } +function intltz_get_canonical_id(string $timezoneId, &$isSystemId): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get a name of this time zone suitable for presentation to the user - * @param IntlTimeZone $obj - <p> + * @param IntlTimeZone $timezone - <p> * The time zone object, on the procedural style interface. * </p> - * @param bool $isDaylight [optional] + * @param bool $dst [optional] * @param int $style [optional] - * @param string $locale [optional] - * @return string + * @param string|null $locale [optional] + * @return string|false * @since 5.5 */ -function intltz_get_display_name($obj, $isDaylight, $style, $locale) { } +function intltz_get_display_name(IntlTimeZone $timezone, bool $dst = false, int $style = 2, ?string $locale): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the amount of time to be added to local standard time to get local wall clock time - * @param IntlTimeZone $obj - <p> + * @param IntlTimeZone $timezone - <p> * The time zone object, on the procedural style interface. * </p> - * @link https://www.php.net/manual/en/intltimezone.getequivalentid.php * @return int + * @link https://secure.php.net/manual/en/intltimezone.getequivalentid.php * @since 5.5 */ -function intltz_get_dst_savings($obj) { } +function intltz_get_dst_savings(IntlTimeZone $timezone): int {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get an ID in the equivalency group that includes the given ID - * @link https://www.php.net/manual/en/intltimezone.getequivalentid.php - * @param string $zoneId - * @param int $index - * @return string + * @link https://secure.php.net/manual/en/intltimezone.getequivalentid.php + * @param string $timezoneId + * @param int $offset + * @return string|false * @since 5.5 */ -function intltz_get_equivalent_id($zoneId, $index) { } +function intltz_get_equivalent_id(string $timezoneId, int $offset): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get last error code on the object - * @link https://www.php.net/manual/en/intltimezone.geterrorcode.php - * @param IntlTimeZone $obj - <p> + * @link https://secure.php.net/manual/en/intltimezone.geterrorcode.php + * @param IntlTimeZone $timezone - <p> * The time zone object, on the procedural style interface. * </p> - * @return int + * @return int|false * @since 5.5 */ -function intltz_get_error_code($obj) { } +function intltz_get_error_code(IntlTimeZone $timezone): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get last error message on the object - * @link https://www.php.net/manual/en/intltimezone.geterrormessage.php - * @param IntlTimeZone $obj - <p> + * @link https://secure.php.net/manual/en/intltimezone.geterrormessage.php + * @param IntlTimeZone $timezone - <p> * The time zone object, on the procedural style interface. * </p> - * @return string + * @return string|false * @since 5.5 */ -function intltz_get_error_message($obj) { } +function intltz_get_error_message(IntlTimeZone $timezone): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Create GMT (UTC) timezone - * @link https://www.php.net/manual/en/intltimezone.getgmt.php + * @link https://secure.php.net/manual/en/intltimezone.getgmt.php * @return IntlTimeZone * @since 5.5 */ -function intltz_getGMT() { } +function intltz_getGMT(): IntlTimeZone {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get timezone ID - * @link https://www.php.net/manual/en/intltimezone.getid.php - * @param IntlTimeZone $obj - * @return string + * @link https://secure.php.net/manual/en/intltimezone.getid.php + * @param IntlTimeZone $timezone + * @return string|false * @since 5.5 */ -function intltz_get_id($obj) { } +function intltz_get_id(IntlTimeZone $timezone): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the time zone raw and GMT offset for the given moment in time - * @link https://www.php.net/manual/en/intltimezone.getoffset.php - * @param IntlTimeZone $obj - * @param float $date + * @link https://secure.php.net/manual/en/intltimezone.getoffset.php + * @param IntlTimeZone $timezone + * @param float $timestamp * @param bool $local - * @param int $rawOffset - * @param int $dstOffset - * @return int + * @param int &$rawOffset + * @param int &$dstOffset + * @return bool * @since 5.5 */ -function intltz_get_offset($obj, $date, $local, &$rawOffset, &$dstOffset) { } +function intltz_get_offset(IntlTimeZone $timezone, float $timestamp, bool $local, &$rawOffset, &$dstOffset): bool {} /** * Get the raw GMT offset (before taking daylight savings time into account - * @link https://www.php.net/manual/en/intltimezone.getrawoffset.php - * @param IntlTimeZone $obj + * @link https://secure.php.net/manual/en/intltimezone.getrawoffset.php + * @param IntlTimeZone $timezone * @return int */ -function intltz_get_raw_offset($obj) { } +function intltz_get_raw_offset(IntlTimeZone $timezone): int {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Get the timezone data version currently used by ICU - * @link https://www.php.net/manual/en/intltimezone.gettzdataversion.php - * @param IntlTimeZone $obj - * @return string + * @link https://secure.php.net/manual/en/intltimezone.gettzdataversion.php + * @return string|false * @since 5.5 */ -function intltz_get_tz_data_version($obj) { } +function intltz_get_tz_data_version(): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Check if this zone has the same rules and offset as another zone - * @link https://www.php.net/manual/en/intltimezone.hassamerules.php - * @param IntlTimeZone $obj - * @param IntlTimeZone $otherTimeZone + * @link https://secure.php.net/manual/en/intltimezone.hassamerules.php + * @param IntlTimeZone $timezone + * @param IntlTimeZone $other * @return bool * @since 5.5 */ -function intltz_has_same_rules($obj, $otherTimeZone) { } +function intltz_has_same_rules( + IntlTimeZone $timezone, + IntlTimeZone $other +): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Convert to DateTimeZone object - * @link https://www.php.net/manual/ru/intltimezone.todatetimezone.php - * @param $obj - * @return DateTimeZone + * @link https://secure.php.net/manual/en/intltimezone.todatetimezone.php + * @param IntlTimeZone $timezone + * @return DateTimeZone|false * @since 5.5 */ -function intltz_to_date_time_zone($obj) { } +function intltz_to_date_time_zone(IntlTimeZone $timezone): DateTimeZone|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> * Check if this time zone uses daylight savings time - * @link https://www.php.net/manual/ru/intltimezone.usedaylighttime.php - * @param $obj + * @link https://secure.php.net/manual/en/intltimezone.usedaylighttime.php + * @param IntlTimeZone $timezone * @return bool * @since 5.5 */ -function intltz_use_daylight_time($obj) { } - +function intltz_use_daylight_time(IntlTimeZone $timezone): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/> - * @param mixed $timeZone - * @param string $locale - * @return IntlGregorianCalendar + * @param DateTimeZone|IntlTimeZone|string|int|null $timezoneOrYear [optional] + * @param string|null $localeOrMonth [optional] + * @param int $day [optional] + * @param int $hour [optional] + * @param int $minute [optional] + * @param int $second [optional] + * @return IntlGregorianCalendar|null * @since 5.5 */ -function intlgregcal_create_instance($timeZone = null, $locale = null) { } +function intlgregcal_create_instance($timezoneOrYear, $localeOrMonth, $day, $hour, $minute, $second): ?IntlGregorianCalendar {} /** - * @param IntlGregorianCalendar $obj - * @param double $change - * + * @param IntlGregorianCalendar $calendar + * @param float $timestamp + * @return bool */ -function intlgregcal_set_gregorian_change($obj, $change) { } +function intlgregcal_set_gregorian_change(IntlGregorianCalendar $calendar, float $timestamp): bool {} /** - * @param IntlGregorianCalendar $obj - * @return double $change + * @param IntlGregorianCalendar $calendar + * @return float */ -function intlgregcal_get_gregorian_change($obj) { } +function intlgregcal_get_gregorian_change(IntlGregorianCalendar $calendar): float {} /** + * @param IntlGregorianCalendar $calendar * @param int $year * @return bool */ -function intlgregcal_is_leap_year($year) { } - +function intlgregcal_is_leap_year(IntlGregorianCalendar $calendar, int $year): bool {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> * Create a resource bundle * @link https://php.net/manual/en/resourcebundle.create.php - * @param string $locale <p> + * @param string|null $locale <p> * Locale for which the resources should be loaded (locale name, e.g. en_CA). * </p> - * @param string $bundlename <p> + * @param string|null $bundle <p> * The directory where the data is stored or the name of the .dat file. * </p> * @param bool $fallback [optional] <p> * Whether locale should match exactly or fallback to parent locale is allowed. * </p> - * @return ResourceBundle|false <b>ResourceBundle</b> object or <b>FALSE</b> on error. + * @return ResourceBundle|null <b>ResourceBundle</b> object or <b>NULL</b> on error. */ -function resourcebundle_create($locale, $bundlename, $fallback = null) { } +function resourcebundle_create(?string $locale, ?string $bundle, bool $fallback = true): ?ResourceBundle {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> * Get data from the bundle * @link https://php.net/manual/en/resourcebundle.get.php - * @param ResourceBundle $r + * @param ResourceBundle $bundle * @param string|int $index <p> * Data index, must be string or integer. * </p> + * @param bool $fallback * @return mixed the data located at the index or <b>NULL</b> on error. Strings, integers and binary data strings * are returned as corresponding PHP types, integer array is returned as PHP array. Complex types are * returned as <b>ResourceBundle</b> object. */ -function resourcebundle_get(ResourceBundle $r, $index) { } +function resourcebundle_get(ResourceBundle $bundle, string|int $index, bool $fallback = true) {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> * Get number of elements in the bundle * @link https://php.net/manual/en/resourcebundle.count.php - * @param ResourceBundle $r - * @param $bundle + * @param ResourceBundle $bundle * @return int number of elements in the bundle. */ -function resourcebundle_count(ResourceBundle $r, $bundle) { } +function resourcebundle_count(ResourceBundle $bundle): int {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> * Get supported locales * @link https://php.net/manual/en/resourcebundle.locales.php - * @param string $bundlename <p> + * @param string $bundle <p> * Path of ResourceBundle for which to get available locales, or * empty string for default locales list. * </p> - * @return array the list of locales supported by the bundle. + * @return array|false the list of locales supported by the bundle. */ -function resourcebundle_locales($bundlename) { } +function resourcebundle_locales(string $bundle): array|false {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> * Get bundle's last error code. * @link https://php.net/manual/en/resourcebundle.geterrorcode.php - * @param $bundle + * @param ResourceBundle $bundle * @return int error code from last bundle object call. */ -function resourcebundle_get_error_code(ResourceBundle $bundle) { } +function resourcebundle_get_error_code(ResourceBundle $bundle): int {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)<br/> * Get bundle's last error message. * @link https://php.net/manual/en/resourcebundle.geterrormessage.php - * @param $bundle + * @param ResourceBundle $bundle * @return string error message from last bundle object's call. */ -function resourcebundle_get_error_message(ResourceBundle $bundle) { } +function resourcebundle_get_error_message(ResourceBundle $bundle): string {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> @@ -5823,9 +6128,9 @@ function resourcebundle_get_error_message(ResourceBundle $bundle) { } * @param string $id <p> * The id. * </p> - * @param int $direction [optional] <p> + * @param int $direction <p> * The direction, defaults to - * >Transliterator::FORWARD. + * Transliterator::FORWARD. * May also be set to * Transliterator::REVERSE. * </p> @@ -5833,7 +6138,7 @@ function resourcebundle_get_error_message(ResourceBundle $bundle) { } * or <b>NULL</b> on failure. * @since 5.4 */ -function transliterator_create($id, $direction = null) { } +function transliterator_create(string $id, int $direction = 0): ?Transliterator {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> @@ -5842,53 +6147,53 @@ function transliterator_create($id, $direction = null) { } * @param string $rules <p> * The rules. * </p> - * @param string $direction [optional] <p> + * @param int $direction <p> * The direction, defaults to - * >Transliterator::FORWARD. + * Transliterator::FORWARD. * May also be set to * Transliterator::REVERSE. * </p> - * @return Transliterator a <b>Transliterator</b> object on success, + * @return Transliterator|null a <b>Transliterator</b> object on success, * or <b>NULL</b> on failure. * @since 5.4 */ -function transliterator_create_from_rules($rules, $direction = null) { } +function transliterator_create_from_rules(string $rules, int $direction = 0): ?Transliterator {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Get transliterator IDs * @link https://php.net/manual/en/transliterator.listids.php - * @return array An array of registered transliterator IDs on success, + * @return string[]|false An array of registered transliterator IDs on success, * or <b>FALSE</b> on failure. * @since 5.4 */ -function transliterator_list_ids() { } +function transliterator_list_ids(): array|false {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Create an inverse transliterator * @link https://php.net/manual/en/transliterator.createinverse.php - * @param Transliterator $orig_trans - * @return Transliterator a <b>Transliterator</b> object on success, + * @param Transliterator $transliterator + * @return Transliterator|null a <b>Transliterator</b> object on success, * or <b>NULL</b> on failure * @since 5.4 */ -function transliterator_create_inverse(Transliterator $orig_trans) { } +function transliterator_create_inverse(Transliterator $transliterator): ?Transliterator {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Transliterate a string * @link https://php.net/manual/en/transliterator.transliterate.php * @param Transliterator|string $transliterator - * @param string $subject <p> + * @param string $string <p> * The string to be transformed. * </p> - * @param int $start [optional] <p> + * @param int $start <p> * The start index (in UTF-16 code units) from which the string will start * to be transformed, inclusive. Indexing starts at 0. The text before will * be left as is. * </p> - * @param int $end [optional] <p> + * @param int $end <p> * The end index (in UTF-16 code units) until which the string will be * transformed, exclusive. Indexing starts at 0. The text after will be * left as is. @@ -5896,29 +6201,29 @@ function transliterator_create_inverse(Transliterator $orig_trans) { } * @return string|false The transfomed string on success, or <b>FALSE</b> on failure. * @since 5.4 */ -function transliterator_transliterate($transliterator, $subject, $start = null, $end = null) { } +function transliterator_transliterate(Transliterator|string $transliterator, string $string, int $start = 0, int $end = -1): string|false {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Get last error code * @link https://php.net/manual/en/transliterator.geterrorcode.php - * @param Transliterator $trans - * @return int The error code on success, + * @param Transliterator $transliterator + * @return int|false The error code on success, * or <b>FALSE</b> if none exists, or on failure. * @since 5.4 */ -function transliterator_get_error_code(Transliterator $trans) { } +function transliterator_get_error_code(Transliterator $transliterator): int|false {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/> * Get last error message * @link https://php.net/manual/en/transliterator.geterrormessage.php - * @param Transliterator $trans - * @return string The error code on success, + * @param Transliterator $transliterator + * @return string|false The error code on success, * or <b>FALSE</b> if none exists, or on failure. * @since 5.4 */ -function transliterator_get_error_message(Transliterator $trans) { } +function transliterator_get_error_message(Transliterator $transliterator): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -5926,7 +6231,7 @@ function transliterator_get_error_message(Transliterator $trans) { } * @link https://php.net/manual/en/function.intl-get-error-code.php * @return int Error code returned by the last API function call. */ -function intl_get_error_code() { } +function intl_get_error_code(): int {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> @@ -5934,13 +6239,13 @@ function intl_get_error_code() { } * @link https://php.net/manual/en/function.intl-get-error-message.php * @return string Description of an error occurred in the last API function call. */ -function intl_get_error_message() { } +function intl_get_error_message(): string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Check whether the given error code indicates failure * @link https://php.net/manual/en/function.intl-is-failure.php - * @param int $error_code <p> + * @param int $errorCode <p> * is a value that returned by functions: * <b>intl_get_error_code</b>, * <b>collator_get_error_code</b> . @@ -5948,56 +6253,66 @@ function intl_get_error_message() { } * @return bool <b>TRUE</b> if it the code indicates some failure, and <b>FALSE</b> * in case of success or a warning. */ -function intl_is_failure($error_code) { } +function intl_is_failure(int $errorCode): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/> * Get symbolic name for a given error code * @link https://php.net/manual/en/function.intl-error-name.php - * @param int $error_code <p> + * @param int $errorCode <p> * ICU error code. * </p> * @return string The returned string will be the same as the name of the error code * constant. */ -function intl_error_name($error_code) { } +function intl_error_name(int $errorCode): string {} /** * Gets the Decomposition_Mapping property for the given UTF-8 encoded code point * * @link https://www.php.net/manual/en/normalizer.getrawdecomposition.php * - * @param string $input + * @param string $string + * @param int $form * @return string|null * * @since 7.3 */ -function normalizer_get_raw_decomposition($input) { } +function normalizer_get_raw_decomposition(string $string, int $form = Normalizer::FORM_C): ?string {} /** + * @return IntlTimeZone * @since 5.5 */ -function intltz_create_default() { } +function intltz_create_default(): IntlTimeZone {} /** + * @return IntlTimeZone * @since 5.5 */ -function intltz_get_gmt() { } +function intltz_get_gmt(): IntlTimeZone {} /** + * @return IntlTimeZone * @since 5.5 */ -function intltz_get_unknown() { } +function intltz_get_unknown(): IntlTimeZone {} /** + * @param int $type + * @param null|string $region + * @param null|int $rawOffset + * @return IntlIterator|false * @since 5.5 */ -function intltz_create_time_zone_id_enumeration($zoneType, $region = null, $rawOffset = null) { } +function intltz_create_time_zone_id_enumeration(int $type, ?string $region = null, ?int $rawOffset = null): IntlIterator|false {} /** + * @param string $timezoneId + * @return string|false * @since 5.5 */ -function intltz_get_region($zoneId) { } +function intltz_get_region(string $timezoneId): string|false {} /** * Set minimal number of days the first week in a year or month can have @@ -6005,200 +6320,214 @@ function intltz_get_region($zoneId) { } * @link https://www.php.net/manual/en/intlcalendar.setminimaldaysinfirstweek.php * * @param IntlCalendar $calendar - * @param int $numberOfDays + * @param int $days * @return bool * * @since 5.5.1 */ -function intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, $numberOfDays) { } +function intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days): bool {} + +function intltz_get_windows_id(string $timezoneId): string|false {} + +function intltz_get_id_for_windows_id(string $timezoneId, ?string $region = null): string|false {} + +/** + * @since 8.4 + */ +function grapheme_str_split(string $string, int $length = 1): array|false {} + +/** + * @since 8.4 + */ +function intltz_get_iana_id(string $timezoneId): string|false {} /** * Limit on locale length, set to 80 in PHP code. Locale names longer * than this limit will not be accepted. * @link https://php.net/manual/en/intl.constants.php */ -define ('INTL_MAX_LOCALE_LEN', 80); -define ('INTL_ICU_VERSION', "4.8.1.1"); -define ('INTL_ICU_DATA_VERSION', "4.8.1"); -define ('ULOC_ACTUAL_LOCALE', 0); -define ('ULOC_VALID_LOCALE', 1); -define ('GRAPHEME_EXTR_COUNT', 0); -define ('GRAPHEME_EXTR_MAXBYTES', 1); -define ('GRAPHEME_EXTR_MAXCHARS', 2); -define ('U_USING_FALLBACK_WARNING', -128); -define ('U_ERROR_WARNING_START', -128); -define ('U_USING_DEFAULT_WARNING', -127); -define ('U_SAFECLONE_ALLOCATED_WARNING', -126); -define ('U_STATE_OLD_WARNING', -125); -define ('U_STRING_NOT_TERMINATED_WARNING', -124); -define ('U_SORT_KEY_TOO_SHORT_WARNING', -123); -define ('U_AMBIGUOUS_ALIAS_WARNING', -122); -define ('U_DIFFERENT_UCA_VERSION', -121); -define ('U_ERROR_WARNING_LIMIT', -119); -define ('U_ZERO_ERROR', 0); -define ('U_ILLEGAL_ARGUMENT_ERROR', 1); -define ('U_MISSING_RESOURCE_ERROR', 2); -define ('U_INVALID_FORMAT_ERROR', 3); -define ('U_FILE_ACCESS_ERROR', 4); -define ('U_INTERNAL_PROGRAM_ERROR', 5); -define ('U_MESSAGE_PARSE_ERROR', 6); -define ('U_MEMORY_ALLOCATION_ERROR', 7); -define ('U_INDEX_OUTOFBOUNDS_ERROR', 8); -define ('U_PARSE_ERROR', 9); -define ('U_INVALID_CHAR_FOUND', 10); -define ('U_TRUNCATED_CHAR_FOUND', 11); -define ('U_ILLEGAL_CHAR_FOUND', 12); -define ('U_INVALID_TABLE_FORMAT', 13); -define ('U_INVALID_TABLE_FILE', 14); -define ('U_BUFFER_OVERFLOW_ERROR', 15); -define ('U_UNSUPPORTED_ERROR', 16); -define ('U_RESOURCE_TYPE_MISMATCH', 17); -define ('U_ILLEGAL_ESCAPE_SEQUENCE', 18); -define ('U_UNSUPPORTED_ESCAPE_SEQUENCE', 19); -define ('U_NO_SPACE_AVAILABLE', 20); -define ('U_CE_NOT_FOUND_ERROR', 21); -define ('U_PRIMARY_TOO_LONG_ERROR', 22); -define ('U_STATE_TOO_OLD_ERROR', 23); -define ('U_TOO_MANY_ALIASES_ERROR', 24); -define ('U_ENUM_OUT_OF_SYNC_ERROR', 25); -define ('U_INVARIANT_CONVERSION_ERROR', 26); -define ('U_INVALID_STATE_ERROR', 27); -define ('U_COLLATOR_VERSION_MISMATCH', 28); -define ('U_USELESS_COLLATOR_ERROR', 29); -define ('U_NO_WRITE_PERMISSION', 30); -define ('U_STANDARD_ERROR_LIMIT', 31); -define ('U_BAD_VARIABLE_DEFINITION', 65536); -define ('U_PARSE_ERROR_START', 65536); -define ('U_MALFORMED_RULE', 65537); -define ('U_MALFORMED_SET', 65538); -define ('U_MALFORMED_SYMBOL_REFERENCE', 65539); -define ('U_MALFORMED_UNICODE_ESCAPE', 65540); -define ('U_MALFORMED_VARIABLE_DEFINITION', 65541); -define ('U_MALFORMED_VARIABLE_REFERENCE', 65542); -define ('U_MISMATCHED_SEGMENT_DELIMITERS', 65543); -define ('U_MISPLACED_ANCHOR_START', 65544); -define ('U_MISPLACED_CURSOR_OFFSET', 65545); -define ('U_MISPLACED_QUANTIFIER', 65546); -define ('U_MISSING_OPERATOR', 65547); -define ('U_MISSING_SEGMENT_CLOSE', 65548); -define ('U_MULTIPLE_ANTE_CONTEXTS', 65549); -define ('U_MULTIPLE_CURSORS', 65550); -define ('U_MULTIPLE_POST_CONTEXTS', 65551); -define ('U_TRAILING_BACKSLASH', 65552); -define ('U_UNDEFINED_SEGMENT_REFERENCE', 65553); -define ('U_UNDEFINED_VARIABLE', 65554); -define ('U_UNQUOTED_SPECIAL', 65555); -define ('U_UNTERMINATED_QUOTE', 65556); -define ('U_RULE_MASK_ERROR', 65557); -define ('U_MISPLACED_COMPOUND_FILTER', 65558); -define ('U_MULTIPLE_COMPOUND_FILTERS', 65559); -define ('U_INVALID_RBT_SYNTAX', 65560); -define ('U_INVALID_PROPERTY_PATTERN', 65561); -define ('U_MALFORMED_PRAGMA', 65562); -define ('U_UNCLOSED_SEGMENT', 65563); -define ('U_ILLEGAL_CHAR_IN_SEGMENT', 65564); -define ('U_VARIABLE_RANGE_EXHAUSTED', 65565); -define ('U_VARIABLE_RANGE_OVERLAP', 65566); -define ('U_ILLEGAL_CHARACTER', 65567); -define ('U_INTERNAL_TRANSLITERATOR_ERROR', 65568); -define ('U_INVALID_ID', 65569); -define ('U_INVALID_FUNCTION', 65570); -define ('U_PARSE_ERROR_LIMIT', 65571); -define ('U_UNEXPECTED_TOKEN', 65792); -define ('U_FMT_PARSE_ERROR_START', 65792); -define ('U_MULTIPLE_DECIMAL_SEPARATORS', 65793); -define ('U_MULTIPLE_DECIMAL_SEPERATORS', 65793); -define ('U_MULTIPLE_EXPONENTIAL_SYMBOLS', 65794); -define ('U_MALFORMED_EXPONENTIAL_PATTERN', 65795); -define ('U_MULTIPLE_PERCENT_SYMBOLS', 65796); -define ('U_MULTIPLE_PERMILL_SYMBOLS', 65797); -define ('U_MULTIPLE_PAD_SPECIFIERS', 65798); -define ('U_PATTERN_SYNTAX_ERROR', 65799); -define ('U_ILLEGAL_PAD_POSITION', 65800); -define ('U_UNMATCHED_BRACES', 65801); -define ('U_UNSUPPORTED_PROPERTY', 65802); -define ('U_UNSUPPORTED_ATTRIBUTE', 65803); -define ('U_FMT_PARSE_ERROR_LIMIT', 65810); -define ('U_BRK_INTERNAL_ERROR', 66048); -define ('U_BRK_ERROR_START', 66048); -define ('U_BRK_HEX_DIGITS_EXPECTED', 66049); -define ('U_BRK_SEMICOLON_EXPECTED', 66050); -define ('U_BRK_RULE_SYNTAX', 66051); -define ('U_BRK_UNCLOSED_SET', 66052); -define ('U_BRK_ASSIGN_ERROR', 66053); -define ('U_BRK_VARIABLE_REDFINITION', 66054); -define ('U_BRK_MISMATCHED_PAREN', 66055); -define ('U_BRK_NEW_LINE_IN_QUOTED_STRING', 66056); -define ('U_BRK_UNDEFINED_VARIABLE', 66057); -define ('U_BRK_INIT_ERROR', 66058); -define ('U_BRK_RULE_EMPTY_SET', 66059); -define ('U_BRK_UNRECOGNIZED_OPTION', 66060); -define ('U_BRK_MALFORMED_RULE_TAG', 66061); -define ('U_BRK_ERROR_LIMIT', 66062); -define ('U_REGEX_INTERNAL_ERROR', 66304); -define ('U_REGEX_ERROR_START', 66304); -define ('U_REGEX_RULE_SYNTAX', 66305); -define ('U_REGEX_INVALID_STATE', 66306); -define ('U_REGEX_BAD_ESCAPE_SEQUENCE', 66307); -define ('U_REGEX_PROPERTY_SYNTAX', 66308); -define ('U_REGEX_UNIMPLEMENTED', 66309); -define ('U_REGEX_MISMATCHED_PAREN', 66310); -define ('U_REGEX_NUMBER_TOO_BIG', 66311); -define ('U_REGEX_BAD_INTERVAL', 66312); -define ('U_REGEX_MAX_LT_MIN', 66313); -define ('U_REGEX_INVALID_BACK_REF', 66314); -define ('U_REGEX_INVALID_FLAG', 66315); -define ('U_REGEX_LOOK_BEHIND_LIMIT', 66316); -define ('U_REGEX_SET_CONTAINS_STRING', 66317); -define ('U_REGEX_ERROR_LIMIT', 66324); -define ('U_IDNA_PROHIBITED_ERROR', 66560); -define ('U_IDNA_ERROR_START', 66560); -define ('U_IDNA_UNASSIGNED_ERROR', 66561); -define ('U_IDNA_CHECK_BIDI_ERROR', 66562); -define ('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); -define ('U_IDNA_ACE_PREFIX_ERROR', 66564); -define ('U_IDNA_VERIFICATION_ERROR', 66565); -define ('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); -define ('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); -define ('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); -define ('U_IDNA_ERROR_LIMIT', 66569); -define ('U_STRINGPREP_PROHIBITED_ERROR', 66560); -define ('U_STRINGPREP_UNASSIGNED_ERROR', 66561); -define ('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); -define ('U_ERROR_LIMIT', 66818); +define('INTL_MAX_LOCALE_LEN', 156); +define('INTL_ICU_VERSION', "74.1"); +define('INTL_ICU_DATA_VERSION', "74.1"); +define('ULOC_ACTUAL_LOCALE', 0); +define('ULOC_VALID_LOCALE', 1); +define('GRAPHEME_EXTR_COUNT', 0); +define('GRAPHEME_EXTR_MAXBYTES', 1); +define('GRAPHEME_EXTR_MAXCHARS', 2); +define('U_USING_FALLBACK_WARNING', -128); +define('U_ERROR_WARNING_START', -128); +define('U_USING_DEFAULT_WARNING', -127); +define('U_SAFECLONE_ALLOCATED_WARNING', -126); +define('U_STATE_OLD_WARNING', -125); +define('U_STRING_NOT_TERMINATED_WARNING', -124); +define('U_SORT_KEY_TOO_SHORT_WARNING', -123); +define('U_AMBIGUOUS_ALIAS_WARNING', -122); +define('U_DIFFERENT_UCA_VERSION', -121); +define('U_ERROR_WARNING_LIMIT', -119); +define('U_ZERO_ERROR', 0); +define('U_ILLEGAL_ARGUMENT_ERROR', 1); +define('U_MISSING_RESOURCE_ERROR', 2); +define('U_INVALID_FORMAT_ERROR', 3); +define('U_FILE_ACCESS_ERROR', 4); +define('U_INTERNAL_PROGRAM_ERROR', 5); +define('U_MESSAGE_PARSE_ERROR', 6); +define('U_MEMORY_ALLOCATION_ERROR', 7); +define('U_INDEX_OUTOFBOUNDS_ERROR', 8); +define('U_PARSE_ERROR', 9); +define('U_INVALID_CHAR_FOUND', 10); +define('U_TRUNCATED_CHAR_FOUND', 11); +define('U_ILLEGAL_CHAR_FOUND', 12); +define('U_INVALID_TABLE_FORMAT', 13); +define('U_INVALID_TABLE_FILE', 14); +define('U_BUFFER_OVERFLOW_ERROR', 15); +define('U_UNSUPPORTED_ERROR', 16); +define('U_RESOURCE_TYPE_MISMATCH', 17); +define('U_ILLEGAL_ESCAPE_SEQUENCE', 18); +define('U_UNSUPPORTED_ESCAPE_SEQUENCE', 19); +define('U_NO_SPACE_AVAILABLE', 20); +define('U_CE_NOT_FOUND_ERROR', 21); +define('U_PRIMARY_TOO_LONG_ERROR', 22); +define('U_STATE_TOO_OLD_ERROR', 23); +define('U_TOO_MANY_ALIASES_ERROR', 24); +define('U_ENUM_OUT_OF_SYNC_ERROR', 25); +define('U_INVARIANT_CONVERSION_ERROR', 26); +define('U_INVALID_STATE_ERROR', 27); +define('U_COLLATOR_VERSION_MISMATCH', 28); +define('U_USELESS_COLLATOR_ERROR', 29); +define('U_NO_WRITE_PERMISSION', 30); +define('U_STANDARD_ERROR_LIMIT', 32); +define('U_BAD_VARIABLE_DEFINITION', 65536); +define('U_PARSE_ERROR_START', 65536); +define('U_MALFORMED_RULE', 65537); +define('U_MALFORMED_SET', 65538); +define('U_MALFORMED_SYMBOL_REFERENCE', 65539); +define('U_MALFORMED_UNICODE_ESCAPE', 65540); +define('U_MALFORMED_VARIABLE_DEFINITION', 65541); +define('U_MALFORMED_VARIABLE_REFERENCE', 65542); +define('U_MISMATCHED_SEGMENT_DELIMITERS', 65543); +define('U_MISPLACED_ANCHOR_START', 65544); +define('U_MISPLACED_CURSOR_OFFSET', 65545); +define('U_MISPLACED_QUANTIFIER', 65546); +define('U_MISSING_OPERATOR', 65547); +define('U_MISSING_SEGMENT_CLOSE', 65548); +define('U_MULTIPLE_ANTE_CONTEXTS', 65549); +define('U_MULTIPLE_CURSORS', 65550); +define('U_MULTIPLE_POST_CONTEXTS', 65551); +define('U_TRAILING_BACKSLASH', 65552); +define('U_UNDEFINED_SEGMENT_REFERENCE', 65553); +define('U_UNDEFINED_VARIABLE', 65554); +define('U_UNQUOTED_SPECIAL', 65555); +define('U_UNTERMINATED_QUOTE', 65556); +define('U_RULE_MASK_ERROR', 65557); +define('U_MISPLACED_COMPOUND_FILTER', 65558); +define('U_MULTIPLE_COMPOUND_FILTERS', 65559); +define('U_INVALID_RBT_SYNTAX', 65560); +define('U_INVALID_PROPERTY_PATTERN', 65561); +define('U_MALFORMED_PRAGMA', 65562); +define('U_UNCLOSED_SEGMENT', 65563); +define('U_ILLEGAL_CHAR_IN_SEGMENT', 65564); +define('U_VARIABLE_RANGE_EXHAUSTED', 65565); +define('U_VARIABLE_RANGE_OVERLAP', 65566); +define('U_ILLEGAL_CHARACTER', 65567); +define('U_INTERNAL_TRANSLITERATOR_ERROR', 65568); +define('U_INVALID_ID', 65569); +define('U_INVALID_FUNCTION', 65570); +define('U_PARSE_ERROR_LIMIT', 65571); +define('U_UNEXPECTED_TOKEN', 65792); +define('U_FMT_PARSE_ERROR_START', 65792); +define('U_MULTIPLE_DECIMAL_SEPARATORS', 65793); +define('U_MULTIPLE_DECIMAL_SEPERATORS', 65793); +define('U_MULTIPLE_EXPONENTIAL_SYMBOLS', 65794); +define('U_MALFORMED_EXPONENTIAL_PATTERN', 65795); +define('U_MULTIPLE_PERCENT_SYMBOLS', 65796); +define('U_MULTIPLE_PERMILL_SYMBOLS', 65797); +define('U_MULTIPLE_PAD_SPECIFIERS', 65798); +define('U_PATTERN_SYNTAX_ERROR', 65799); +define('U_ILLEGAL_PAD_POSITION', 65800); +define('U_UNMATCHED_BRACES', 65801); +define('U_UNSUPPORTED_PROPERTY', 65802); +define('U_UNSUPPORTED_ATTRIBUTE', 65803); +define('U_FMT_PARSE_ERROR_LIMIT', 65812); +define('U_BRK_INTERNAL_ERROR', 66048); +define('U_BRK_ERROR_START', 66048); +define('U_BRK_HEX_DIGITS_EXPECTED', 66049); +define('U_BRK_SEMICOLON_EXPECTED', 66050); +define('U_BRK_RULE_SYNTAX', 66051); +define('U_BRK_UNCLOSED_SET', 66052); +define('U_BRK_ASSIGN_ERROR', 66053); +define('U_BRK_VARIABLE_REDFINITION', 66054); +define('U_BRK_MISMATCHED_PAREN', 66055); +define('U_BRK_NEW_LINE_IN_QUOTED_STRING', 66056); +define('U_BRK_UNDEFINED_VARIABLE', 66057); +define('U_BRK_INIT_ERROR', 66058); +define('U_BRK_RULE_EMPTY_SET', 66059); +define('U_BRK_UNRECOGNIZED_OPTION', 66060); +define('U_BRK_MALFORMED_RULE_TAG', 66061); +define('U_BRK_ERROR_LIMIT', 66062); +define('U_REGEX_INTERNAL_ERROR', 66304); +define('U_REGEX_ERROR_START', 66304); +define('U_REGEX_RULE_SYNTAX', 66305); +define('U_REGEX_INVALID_STATE', 66306); +define('U_REGEX_BAD_ESCAPE_SEQUENCE', 66307); +define('U_REGEX_PROPERTY_SYNTAX', 66308); +define('U_REGEX_UNIMPLEMENTED', 66309); +define('U_REGEX_MISMATCHED_PAREN', 66310); +define('U_REGEX_NUMBER_TOO_BIG', 66311); +define('U_REGEX_BAD_INTERVAL', 66312); +define('U_REGEX_MAX_LT_MIN', 66313); +define('U_REGEX_INVALID_BACK_REF', 66314); +define('U_REGEX_INVALID_FLAG', 66315); +define('U_REGEX_LOOK_BEHIND_LIMIT', 66316); +define('U_REGEX_SET_CONTAINS_STRING', 66317); +define('U_REGEX_ERROR_LIMIT', 66326); +define('U_IDNA_PROHIBITED_ERROR', 66560); +define('U_IDNA_ERROR_START', 66560); +define('U_IDNA_UNASSIGNED_ERROR', 66561); +define('U_IDNA_CHECK_BIDI_ERROR', 66562); +define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); +define('U_IDNA_ACE_PREFIX_ERROR', 66564); +define('U_IDNA_VERIFICATION_ERROR', 66565); +define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); +define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); +define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); +define('U_IDNA_ERROR_LIMIT', 66569); +define('U_STRINGPREP_PROHIBITED_ERROR', 66560); +define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); +define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); +define('U_ERROR_LIMIT', 66818); /** * Prohibit processing of unassigned codepoints in the input for IDN * functions and do not check if the input conforms to domain name ASCII rules. * @link https://php.net/manual/en/intl.constants.php */ -define ('IDNA_DEFAULT', 0); +define('IDNA_DEFAULT', 0); /** * Allow processing of unassigned codepoints in the input for IDN functions. * @link https://php.net/manual/en/intl.constants.php */ -define ('IDNA_ALLOW_UNASSIGNED', 1); +define('IDNA_ALLOW_UNASSIGNED', 1); /** * Check if the input for IDN functions conforms to domain name ASCII rules. * @link https://php.net/manual/en/intl.constants.php */ -define ('IDNA_USE_STD3_RULES', 2); +define('IDNA_USE_STD3_RULES', 2); /** * Check whether the input conforms to the BiDi rules. * Ignored by the IDNA2003 implementation, which always performs this check. * @link https://php.net/manual/en/intl.constants.php */ -define ('IDNA_CHECK_BIDI', 4); +define('IDNA_CHECK_BIDI', 4); /** * Check whether the input conforms to the CONTEXTJ rules. * Ignored by the IDNA2003 implementation, as this check is new in IDNA2008. * @link https://php.net/manual/en/intl.constants.php */ -define ('IDNA_CHECK_CONTEXTJ', 8); +define('IDNA_CHECK_CONTEXTJ', 8); /** * Option for nontransitional processing in @@ -6206,7 +6535,7 @@ define ('IDNA_CHECK_CONTEXTJ', 8); * by default. This option is ignored by the IDNA2003 implementation. * @link https://php.net/manual/en/intl.constants.php */ -define ('IDNA_NONTRANSITIONAL_TO_ASCII', 16); +define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); /** * Option for nontransitional processing in @@ -6214,23 +6543,22 @@ define ('IDNA_NONTRANSITIONAL_TO_ASCII', 16); * by default. This option is ignored by the IDNA2003 implementation. * @link https://php.net/manual/en/intl.constants.php */ -define ('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); +define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); /** * Use IDNA 2003 algorithm in {@see idn_to_utf8} and * {@see idn_to_ascii}. This is the default. * @link https://php.net/manual/en/intl.constants.php * @deprecated 7.2 Use {@see INTL_IDNA_VARIANT_UTS46} instead. - * @removed 8.0 */ -define ('INTL_IDNA_VARIANT_2003', 0); +define('INTL_IDNA_VARIANT_2003', 0); /** * Use UTS #46 algorithm in <b>idn_to_utf8</b> and * <b>idn_to_ascii</b>. * @link https://php.net/manual/en/intl.constants.php */ -define ('INTL_IDNA_VARIANT_UTS46', 1); +define('INTL_IDNA_VARIANT_UTS46', 1); /** * Errors reported in a bitset returned by the UTS #46 algorithm in @@ -6238,67 +6566,67 @@ define ('INTL_IDNA_VARIANT_UTS46', 1); * <b>idn_to_ascii</b>. * @link https://php.net/manual/en/intl.constants.php */ -define ('IDNA_ERROR_EMPTY_LABEL', 1); +define('IDNA_ERROR_EMPTY_LABEL', 1); /** - * @link https://www.php.net/manual/en/migration54.global-constants.php + * @link https://secure.php.net/manual/en/migration54.global-constants.php * @since 5.4 */ -define ('IDNA_ERROR_LABEL_TOO_LONG', 2); +define('IDNA_ERROR_LABEL_TOO_LONG', 2); /** - * @link https://www.php.net/manual/en/migration54.global-constants.php + * @link https://secure.php.net/manual/en/migration54.global-constants.php * @since 5.4 */ -define ('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); +define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); /** - * @link https://www.php.net/manual/en/migration54.global-constants.php + * @link https://secure.php.net/manual/en/migration54.global-constants.php * @since 5.4 */ -define ('IDNA_ERROR_LEADING_HYPHEN', 8); +define('IDNA_ERROR_LEADING_HYPHEN', 8); /** - * @link https://www.php.net/manual/en/migration54.global-constants.php + * @link https://secure.php.net/manual/en/migration54.global-constants.php * @since 5.4 */ -define ('IDNA_ERROR_TRAILING_HYPHEN', 16); +define('IDNA_ERROR_TRAILING_HYPHEN', 16); /** - * @link https://www.php.net/manual/en/migration54.global-constants.php + * @link https://secure.php.net/manual/en/migration54.global-constants.php * @since 5.4 */ -define ('IDNA_ERROR_HYPHEN_3_4', 32); +define('IDNA_ERROR_HYPHEN_3_4', 32); /** - * @link https://www.php.net/manual/en/migration54.global-constants.php + * @link https://secure.php.net/manual/en/migration54.global-constants.php * @since 5.4 */ -define ('IDNA_ERROR_LEADING_COMBINING_MARK', 64); +define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); /** - * @link https://www.php.net/manual/en/migration54.global-constants.php + * @link https://secure.php.net/manual/en/migration54.global-constants.php * @since 5.4 */ -define ('IDNA_ERROR_DISALLOWED', 128); +define('IDNA_ERROR_DISALLOWED', 128); /** - * @link https://www.php.net/manual/en/migration54.global-constants.php + * @link https://secure.php.net/manual/en/migration54.global-constants.php * @since 5.4 */ -define ('IDNA_ERROR_PUNYCODE', 256); +define('IDNA_ERROR_PUNYCODE', 256); /** - * @link https://www.php.net/manual/en/migration54.global-constants.php + * @link https://secure.php.net/manual/en/migration54.global-constants.php * @since 5.4 */ -define ('IDNA_ERROR_LABEL_HAS_DOT', 512); +define('IDNA_ERROR_LABEL_HAS_DOT', 512); /** - * @link https://www.php.net/manual/en/migration54.global-constants.php + * @link https://secure.php.net/manual/en/migration54.global-constants.php * @since 5.4 */ -define ('IDNA_ERROR_INVALID_ACE_LABEL', 1024); +define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); /** - * @link https://www.php.net/manual/en/migration54.global-constants.php + * @link https://secure.php.net/manual/en/migration54.global-constants.php * @since 5.4 */ -define ('IDNA_ERROR_BIDI', 2048); +define('IDNA_ERROR_BIDI', 2048); /** - * @link https://www.php.net/manual/en/migration54.global-constants.php + * @link https://secure.php.net/manual/en/migration54.global-constants.php * @since 5.4 */ -define ('IDNA_ERROR_CONTEXTJ', 4096); +define('IDNA_ERROR_CONTEXTJ', 4096); /** * @since 5.5 @@ -6306,368 +6634,396 @@ define ('IDNA_ERROR_CONTEXTJ', 4096); class IntlBreakIterator implements IteratorAggregate { /* Constants */ - const DONE = -1; - const WORD_NONE = 0; - const WORD_NONE_LIMIT = 100; - const WORD_NUMBER = 100; - const WORD_NUMBER_LIMIT = 200; - const WORD_LETTER = 200; - const WORD_LETTER_LIMIT = 300; - const WORD_KANA = 300; - const WORD_KANA_LIMIT = 400; - const WORD_IDEO = 400; - const WORD_IDEO_LIMIT = 500; - const LINE_SOFT = 0; - const LINE_SOFT_LIMIT = 100; - const LINE_HARD = 100; - const LINE_HARD_LIMIT = 200; - const SENTENCE_TERM = 0; - const SENTENCE_TERM_LIMIT = 100; - const SENTENCE_SEP = 100; - const SENTENCE_SEP_LIMIT = 200; + public const DONE = -1; + public const WORD_NONE = 0; + public const WORD_NONE_LIMIT = 100; + public const WORD_NUMBER = 100; + public const WORD_NUMBER_LIMIT = 200; + public const WORD_LETTER = 200; + public const WORD_LETTER_LIMIT = 300; + public const WORD_KANA = 300; + public const WORD_KANA_LIMIT = 400; + public const WORD_IDEO = 400; + public const WORD_IDEO_LIMIT = 500; + public const LINE_SOFT = 0; + public const LINE_SOFT_LIMIT = 100; + public const LINE_HARD = 100; + public const LINE_HARD_LIMIT = 200; + public const SENTENCE_TERM = 0; + public const SENTENCE_TERM_LIMIT = 100; + public const SENTENCE_SEP = 100; + public const SENTENCE_SEP_LIMIT = 200; /* Methods */ /** * (PHP 5 >=5.5.0)<br/> * Private constructor for disallowing instantiation */ - private function __construct() { } + private function __construct() {} /** * (PHP 5 >=5.5.0)<br/> * Create break iterator for boundaries of combining character sequences - * @link https://www.php.net/manual/en/intlbreakiterator.createcharacterinstance.php + * @link https://secure.php.net/manual/en/intlbreakiterator.createcharacterinstance.php * @param string $locale - * @return IntlBreakIterator + * @return IntlBreakIterator|null */ - public static function createCharacterInstance($locale = null) { } + public static function createCharacterInstance(string|null $locale = null): ?IntlBreakIterator {} /** * (PHP 5 >=5.5.0)<br/> * Create break iterator for boundaries of code points - * @link https://www.php.net/manual/en/intlbreakiterator.createcodepointinstance.php - * @return IntlBreakIterator + * @link https://secure.php.net/manual/en/intlbreakiterator.createcodepointinstance.php + * @return IntlCodePointBreakIterator */ - public static function createCodePointInstance() { } + public static function createCodePointInstance(): IntlCodePointBreakIterator {} /** * (PHP 5 >=5.5.0)<br/> * Create break iterator for logically possible line breaks - * @link https://www.php.net/manual/en/intlbreakiterator.createlineinstance.php - * @param string $locale - * @return IntlBreakIterator + * @link https://secure.php.net/manual/en/intlbreakiterator.createlineinstance.php + * @param string $locale [optional] + * @return IntlBreakIterator|null */ - public static function createLineInstance($locale) { } + public static function createLineInstance(string|null $locale): ?IntlBreakIterator {} /** * (PHP 5 >=5.5.0)<br/> * Create break iterator for sentence breaks - * @link https://www.php.net/manual/en/intlbreakiterator.createsentenceinstance.php - * @param string $locale - * @return IntlBreakIterator + * @link https://secure.php.net/manual/en/intlbreakiterator.createsentenceinstance.php + * @param string $locale [optional] + * @return IntlBreakIterator|null */ - public static function createSentenceInstance($locale) { } + public static function createSentenceInstance(string|null $locale): ?IntlBreakIterator {} /** * (PHP 5 >=5.5.0)<br/> * Create break iterator for title-casing breaks - * @link https://www.php.net/manual/en/intlbreakiterator.createtitleinstance.php - * @param string $locale - * @return IntlBreakIterator + * @link https://secure.php.net/manual/en/intlbreakiterator.createtitleinstance.php + * @param string $locale [optional] + * @return IntlBreakIterator|null */ - public static function createTitleInstance($locale) { } + public static function createTitleInstance(string|null $locale): ?IntlBreakIterator {} /** * (PHP 5 >=5.5.0)<br/> * Create break iterator for word breaks - * @link https://www.php.net/manual/en/intlbreakiterator.createwordinstance.php - * @param string $locale - * @return IntlBreakIterator + * @link https://secure.php.net/manual/en/intlbreakiterator.createwordinstance.php + * @param string $locale [optional] + * @return IntlBreakIterator|null */ - public static function createWordInstance($locale) { } + public static function createWordInstance(string|null $locale): ?IntlBreakIterator {} /** * (PHP 5 >=5.5.0)<br/> * Get index of current position - * @link https://www.php.net/manual/en/intlbreakiterator.current.php + * @link https://secure.php.net/manual/en/intlbreakiterator.current.php * @return int */ - public function current() { } + public function current(): int {} /** * (PHP 5 >=5.5.0)<br/> * Set position to the first character in the text - * @link https://www.php.net/manual/en/intlbreakiterator.first.php + * @link https://secure.php.net/manual/en/intlbreakiterator.first.php */ - public function first() { } + public function first(): int {} /** * (PHP 5 >=5.5.0)<br/> * Advance the iterator to the first boundary following specified offset - * @link https://www.php.net/manual/en/intlbreakiterator.following.php + * @link https://secure.php.net/manual/en/intlbreakiterator.following.php * @param int $offset */ - public function following($offset) { } + public function following(int $offset): int {} /** * (PHP 5 >=5.5.0)<br/> * Get last error code on the object - * @link https://www.php.net/manual/en/intlbreakiterator.geterrorcode.php + * @link https://secure.php.net/manual/en/intlbreakiterator.geterrorcode.php * @return int */ - public function getErrorCode() { } + public function getErrorCode(): int {} /** * (PHP 5 >=5.5.0)<br/> * Get last error message on the object - * @link https://www.php.net/manual/en/intlbreakiterator.geterrormessage.php + * @link https://secure.php.net/manual/en/intlbreakiterator.geterrormessage.php * @return string */ - public function getErrorMessage() { } - + public function getErrorMessage(): string {} /** * (PHP 5 >=5.5.0)<br/> * Get the locale associated with the object - * @link https://www.php.net/manual/en/intlbreakiterator.getlocale.php - * @param string $locale_type + * @link https://secure.php.net/manual/en/intlbreakiterator.getlocale.php + * @param string $type */ - public function getLocale($locale_type) { } + public function getLocale(int $type): string|false {} /** * (PHP 5 >=5.5.0)<br/> * Create iterator for navigating fragments between boundaries - * @link https://www.php.net/manual/en/intlbreakiterator.getpartsiterator.php - * @param string $key_type [optional] + * @link https://secure.php.net/manual/en/intlbreakiterator.getpartsiterator.php + * @param int $type [optional] + * <p> + * Optional key type. Possible values are: + * </p><ul> + * <li> + * {@see IntlPartsIterator::KEY_SEQUENTIAL} + * - The default. Sequentially increasing integers used as key. + * </li> + * <li> + * {@see IntlPartsIterator::KEY_LEFT} + * - Byte offset left of current part used as key. + * </li> + * <li> + * {@see IntlPartsIterator::KEY_RIGHT} + * - Byte offset right of current part used as key. + * </li> + * </ul> */ - public function getPartsIterator($key_type = IntlPartsIterator::KEY_SEQUENTIAL) { } + public function getPartsIterator( + int $type = IntlPartsIterator::KEY_SEQUENTIAL + ): IntlPartsIterator {} /** * (PHP 5 >=5.5.0)<br/> * Get the text being scanned - * @link https://www.php.net/manual/en/intlbreakiterator.gettext.php + * @link https://secure.php.net/manual/en/intlbreakiterator.gettext.php */ - public function getText() { } + public function getText(): ?string {} /** * (PHP 5 >=5.5.0)<br/> * Tell whether an offset is a boundary's offset - * @link https://www.php.net/manual/en/intlbreakiterator.isboundary.php - * @param string $offset + * @link https://secure.php.net/manual/en/intlbreakiterator.isboundary.php + * @param int $offset */ - public function isBoundary($offset) { } + public function isBoundary(int $offset): bool {} /** * (PHP 5 >=5.5.0)<br/> * Set the iterator position to index beyond the last character - * @link https://www.php.net/manual/en/intlbreakiterator.last.php + * @link https://secure.php.net/manual/en/intlbreakiterator.last.php * @return int */ - public function last() { } + public function last(): int {} /** * (PHP 5 >=5.5.0)<br/> - * @link https://www.php.net/manual/en/intlbreakiterator.next.php - * @param string $offset [optional] + * @link https://secure.php.net/manual/en/intlbreakiterator.next.php + * @param int $offset [optional] * @return int */ - public function next($offset = null) { } + public function next(int|null $offset = null): int {} /** * (PHP 5 >=5.5.0)<br/> - * @link https://www.php.net/manual/en/intlbreakiterator.preceding.php + * @link https://secure.php.net/manual/en/intlbreakiterator.preceding.php * @param int $offset */ - public function preceding($offset) { } + public function preceding(int $offset): int {} /** * (PHP 5 >=5.5.0)<br/> * Set the iterator position to the boundary immediately before the current - * @link https://www.php.net/manual/en/intlbreakiterator.previous.php + * @link https://secure.php.net/manual/en/intlbreakiterator.previous.php * @return int */ - public function previous() { } + public function previous(): int {} /** * (PHP 5 >=5.5.0)<br/> * Set the text being scanned - * @link https://www.php.net/manual/en/intlbreakiterator.settext.php + * @link https://secure.php.net/manual/en/intlbreakiterator.settext.php * @param string $text */ - public function setText($text) { } + public function setText(string $text): bool {} - public function getIterator(){} + /** + * @since 8.0 + * @return Iterator + */ + public function getIterator(): Iterator {} } -class IntlRuleBasedBreakIterator extends IntlBreakIterator implements Traversable { - +class IntlRuleBasedBreakIterator extends IntlBreakIterator implements Traversable +{ /* Methods */ /** * (PHP 5 >=5.5.0)<br/> - * @link https://www.php.net/manual/en/intlbreakiterator.construct.php + * @link https://secure.php.net/manual/en/intlbreakiterator.construct.php * @param string $rules - * @param string $areCompiled [optional] + * @param string $compiled [optional] */ - public function __construct($rules, $areCompiled) { } + public function __construct( + string $rules, + bool $compiled = false + ) {} /** * (PHP 5 >=5.5.0)<br/> * Create break iterator for boundaries of combining character sequences - * @link https://www.php.net/manual/en/intlbreakiterator.createcharacterinstance.php + * @link https://secure.php.net/manual/en/intlbreakiterator.createcharacterinstance.php * @param string $locale * @return IntlRuleBasedBreakIterator */ - public static function createCharacterInstance($locale) { } + public static function createCharacterInstance($locale) {} - /* + /** * (PHP 5 >=5.5.0)<br/> * Create break iterator for boundaries of code points - * @link https://www.php.net/manual/en/intlbreakiterator.createcodepointinstance.php + * @link https://secure.php.net/manual/en/intlbreakiterator.createcodepointinstance.php * @return IntlRuleBasedBreakIterator */ - public static function createCodePointInstance() { } + public static function createCodePointInstance() {} /** * (PHP 5 >=5.5.0)<br/> * Create break iterator for logically possible line breaks - * @link https://www.php.net/manual/en/intlbreakiterator.createlineinstance.php - * @param string $locale + * @link https://secure.php.net/manual/en/intlbreakiterator.createlineinstance.php + * @param string $locale [optional] * @return IntlRuleBasedBreakIterator */ - public static function createLineInstance($locale) { } + public static function createLineInstance($locale) {} /** * (PHP 5 >=5.5.0)<br/> * Create break iterator for sentence breaks - * @link https://www.php.net/manual/en/intlbreakiterator.createsentenceinstance.php - * @param string $locale + * @link https://secure.php.net/manual/en/intlbreakiterator.createsentenceinstance.php + * @param string $locale [optional] * @return IntlRuleBasedBreakIterator */ - public static function createSentenceInstance($locale) { } + public static function createSentenceInstance($locale) {} /** * (PHP 5 >=5.5.0)<br/> * Create break iterator for title-casing breaks - * @link https://www.php.net/manual/en/intlbreakiterator.createtitleinstance.php - * @param string $locale + * @link https://secure.php.net/manual/en/intlbreakiterator.createtitleinstance.php + * @param string $locale [optional] * @return IntlRuleBasedBreakIterator */ - public static function createTitleInstance($locale) { } + public static function createTitleInstance($locale) {} /** * (PHP 5 >=5.5.0)<br/> * Create break iterator for word breaks - * @link https://www.php.net/manual/en/intlbreakiterator.createwordinstance.php - * @param string $locale + * @link https://secure.php.net/manual/en/intlbreakiterator.createwordinstance.php + * @param string $locale [optional] * @return IntlRuleBasedBreakIterator */ - public static function createWordInstance($locale) { } + public static function createWordInstance($locale) {} /** * (PHP 5 >=5.5.0)<br/> - * @link https://www.php.net/manual/en/intlrulebasedbreakiterator.getbinaryrules.php + * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getbinaryrules.php * Get the binary form of compiled rules - * @return string + * @return string|false */ - public function getBinaryRules() { } + public function getBinaryRules(): string|false {} /** * (PHP 5 >=5.5.0)<br/> - * @link https://www.php.net/manual/en/intlrulebasedbreakiterator.getrules.php + * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getrules.php * Get the rule set used to create this object - * @return string + * @return string|false */ - public function getRules() { } + public function getRules(): string|false {} /** * (PHP 5 >=5.5.0)<br/> - * @link https://www.php.net/manual/en/intlrulebasedbreakiterator.getrulesstatus.php + * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getrulesstatus.php * Get the largest status value from the break rules that determined the current break position * @return int */ - public function getRuleStatus() { } + public function getRuleStatus(): int {} /** * (PHP 5 >=5.5.0)<br/> - * @link https://www.php.net/manual/en/intlrulebasedbreakiterator.getrulestatusvec.php + * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getrulestatusvec.php * Get the status values from the break rules that determined the current break position - * @return array + * @return array|false */ - public function getRuleStatusVec() { } + public function getRuleStatusVec(): array|false {} } /** * @link https://www.php.net/manual/en/class.intlpartsiterator.php * @since 5.5 */ -class IntlPartsIterator extends IntlIterator implements Iterator { - - const KEY_SEQUENTIAL = 0 ; - const KEY_LEFT = 1 ; - const KEY_RIGHT = 2 ; +class IntlPartsIterator extends IntlIterator implements Iterator +{ + public const KEY_SEQUENTIAL = 0; + public const KEY_LEFT = 1; + public const KEY_RIGHT = 2; /** * @return IntlBreakIterator */ - public function getBreakIterator() { } -} - -class IntlCodePointBreakIterator extends IntlBreakIterator implements Traversable { + public function getBreakIterator(): IntlBreakIterator {} + /** + * @since 8.1 + */ + public function getRuleStatus(): int {} +} +class IntlCodePointBreakIterator extends IntlBreakIterator implements Traversable +{ /** * (PHP 5 >=5.5.0)<br/> * Get last code point passed over after advancing or receding the iterator - * @link https://www.php.net/manual/en/intlcodepointbreakiterator.getlastcodepoint.php + * @link https://secure.php.net/manual/en/intlcodepointbreakiterator.getlastcodepoint.php * @return int */ - public function getLastCodePoint() { } + public function getLastCodePoint(): int {} } -class UConverter { - +class UConverter +{ /* Constants */ - const REASON_UNASSIGNED = 0; - const REASON_ILLEGAL = 1; - const REASON_IRREGULAR = 2; - const REASON_RESET = 3; - const REASON_CLOSE = 4; - const REASON_CLONE = 5; - const UNSUPPORTED_CONVERTER = -1; - const SBCS = 0; - const DBCS = 1; - const MBCS = 2; - const LATIN_1 = 3; - const UTF8 = 4; - const UTF16_BigEndian = 5; - const UTF16_LittleEndian = 6; - const UTF32_BigEndian = 7; - const UTF32_LittleEndian = 8; - const EBCDIC_STATEFUL = 9; - const ISO_2022 = 10; - const LMBCS_1 = 11; - const LMBCS_2 = 12; - const LMBCS_3 = 13; - const LMBCS_4 = 14; - const LMBCS_5 = 15; - const LMBCS_6 = 16; - const LMBCS_8 = 17; - const LMBCS_11 = 18; - const LMBCS_16 = 19; - const LMBCS_17 = 20; - const LMBCS_18 = 21; - const LMBCS_19 = 22; - const LMBCS_LAST = 22; - const HZ = 23; - const SCSU = 24; - const ISCII = 25; - const US_ASCII = 26; - const UTF7 = 27; - const BOCU1 = 28; - const UTF16 = 29; - const UTF32 = 30; - const CESU8 = 31; - const IMAP_MAILBOX = 32; + public const REASON_UNASSIGNED = 0; + public const REASON_ILLEGAL = 1; + public const REASON_IRREGULAR = 2; + public const REASON_RESET = 3; + public const REASON_CLOSE = 4; + public const REASON_CLONE = 5; + public const UNSUPPORTED_CONVERTER = -1; + public const SBCS = 0; + public const DBCS = 1; + public const MBCS = 2; + public const LATIN_1 = 3; + public const UTF8 = 4; + public const UTF16_BigEndian = 5; + public const UTF16_LittleEndian = 6; + public const UTF32_BigEndian = 7; + public const UTF32_LittleEndian = 8; + public const EBCDIC_STATEFUL = 9; + public const ISO_2022 = 10; + public const LMBCS_1 = 11; + public const LMBCS_2 = 12; + public const LMBCS_3 = 13; + public const LMBCS_4 = 14; + public const LMBCS_5 = 15; + public const LMBCS_6 = 16; + public const LMBCS_8 = 17; + public const LMBCS_11 = 18; + public const LMBCS_16 = 19; + public const LMBCS_17 = 20; + public const LMBCS_18 = 21; + public const LMBCS_19 = 22; + public const LMBCS_LAST = 22; + public const HZ = 23; + public const SCSU = 24; + public const ISCII = 25; + public const US_ASCII = 26; + public const UTF7 = 27; + public const BOCU1 = 28; + public const UTF16 = 29; + public const UTF32 = 30; + public const CESU8 = 31; + public const IMAP_MAILBOX = 32; /* Methods */ /** @@ -6677,17 +7033,23 @@ class UConverter { * @param string $destination_encoding * @param string $source_encoding */ - public function __construct($destination_encoding = null, $source_encoding = null) { } + public function __construct( + string|null $destination_encoding = null, + string|null $source_encoding = null + ) {} /** * (PHP 5 >=5.5.0)<br/> * Convert string from one charset to anothe * @link https://php.net/manual/en/uconverter.convert.php * @param string $str - * @param bool $reverse - * @return string + * @param bool $reverse [optional] + * @return string|false */ - public function convert($str, $reverse) { } + public function convert( + string $str, + bool $reverse = false + ): string|false {} /** * (PHP 5 >=5.5.0)<br/> @@ -6696,19 +7058,26 @@ class UConverter { * @param int $reason * @param string $source * @param string $codePoint - * @param int $error - * @return mixed + * @param int &$error + * @return array|string|int|null */ - public function fromUCallback($reason, $source, $codePoint, &$error) { } + public function fromUCallback( + int $reason, + array $source, + int $codePoint, + &$error + ): array|string|int|null {} /** * (PHP 5 >=5.5.0)<br/> * Get the aliases of the given name * @link https://php.net/manual/en/uconverter.getaliases.php * @param string $name - * @return array + * @return array|false|null */ - public static function getAliases($name = null) { } + public static function getAliases( + string $name + ): array|false|null {} /** * (PHP 5 >=5.5.0)<br/> @@ -6716,23 +7085,23 @@ class UConverter { * @link https://php.net/manual/en/uconverter.getavailable.php * @return array */ - public static function getAvailable() { } + public static function getAvailable(): array {} /** * (PHP 5 >=5.5.0)<br/> * Get the destination encoding * @link https://php.net/manual/en/uconverter.getdestinationencoding.php - * @return string + * @return string|false|null */ - public function getDestinationEncoding() { } + public function getDestinationEncoding(): string|false|null {} /** * (PHP 5 >=5.5.0)<br/> * Get the destination converter type * @link https://php.net/manual/en/uconverter.getdestinationtype.php - * @return int + * @return int|false|null */ - public function getDestinationType() { } + public function getDestinationType(): int|false|null {} /** * (PHP 5 >=5.5.0)<br/> @@ -6740,47 +7109,47 @@ class UConverter { * @link https://php.net/manual/en/uconverter.geterrorcode.php * @return int */ - public function getErrorCode() { } + public function getErrorCode(): int {} /** * (PHP 5 >=5.5.0)<br/> * Get last error message on the object * @link https://php.net/manual/en/uconverter.geterrormessage.php - * @return string + * @return string|null */ - public function getErrorMessage() { } + public function getErrorMessage(): ?string {} /** * (PHP 5 >=5.5.0)<br/> * Get the source encoding * @link https://php.net/manual/en/uconverter.getsourceencoding.php - * @return string + * @return string|false|null */ - public function getSourceEncoding() { } + public function getSourceEncoding(): string|false|null {} /** * (PHP 5 >=5.5.0)<br/> * Get the source convertor type * @link https://php.net/manual/en/uconverter.getsourcetype.php - * @return int + * @return int|false|null */ - public function getSourceType() { } + public function getSourceType(): int|false|null {} /** * (PHP 5 >=5.5.0)<br/> * Get standards associated to converter names * @link https://php.net/manual/en/uconverter.getstandards.php - * @return array + * @return array|null */ - public static function getStandards() { } + public static function getStandards(): ?array {} /** * (PHP 5 >=5.5.0)<br/> * Get substitution chars * @link https://php.net/manual/en/uconverter.getsubstchars.php - * @return string + * @return string|false|null */ - public function getSubstChars() { } + public function getSubstChars(): string|false|null {} /** * (PHP 5 >=5.5.0)<br/> @@ -6789,34 +7158,36 @@ class UConverter { * @param int $reason * @return string */ - public static function reasonText($reason) { } + public static function reasonText( + int $reason + ): string {} /** * (PHP 5 >=5.5.0)<br/> * Set the destination encoding * @link https://php.net/manual/en/uconverter.setdestinationencoding.php * @param string $encoding - * @return void + * @return bool */ - public function setDestinationEncoding($encoding) { } + public function setDestinationEncoding(string $encoding): bool {} /** * (PHP 5 >=5.5.0)<br/> * Set the source encoding * @link https://php.net/manual/en/uconverter.setsourceencoding.php * @param string $encoding - * @return void + * @return bool */ - public function setSourceEncoding($encoding) { } + public function setSourceEncoding(string $encoding): bool {} /** * (PHP 5 >=5.5.0)<br/> * Set the substitution chars * @link https://php.net/manual/en/uconverter.setsubstchars.php * @param string $chars - * @return void + * @return bool */ - public function setSubstChars($chars) { } + public function setSubstChars(string $chars): bool {} /** * (PHP 5 >=5.5.0)<br/> @@ -6825,10 +7196,15 @@ class UConverter { * @param int $reason * @param string $source * @param string $codeUnits - * @param int $error - * @return mixed + * @param int &$error + * @return array|string|int|null */ - public function toUCallback($reason, $source, $codeUnits, &$error) { } + public function toUCallback( + int $reason, + string $source, + string $codeUnits, + &$error + ): array|string|int|null {} /** * (PHP 5 >=5.5.0)<br/> @@ -6837,10 +7213,14 @@ class UConverter { * @param string $str * @param string $toEncoding * @param string $fromEncoding - * @param array $options - * @return string - */ - public static function transcode($str, $toEncoding, $fromEncoding, array $options = []) { } + * @param array|null $options + * @return string|false + */ + public static function transcode( + string $str, + string $toEncoding, + string $fromEncoding, + array|null $options = null + ): string|false {} } // End of intl v.1.1.0 -?> diff --git a/build/stubs/ldap.php b/build/stubs/ldap.php index b635c8e01bc..faa7edda3dc 100644 --- a/build/stubs/ldap.php +++ b/build/stubs/ldap.php @@ -1,5 +1,7 @@ <?php +/** @generate-class-entries */ + namespace LDAP { /** @@ -25,4 +27,200 @@ namespace LDAP { final class ResultEntry { } + +} + +namespace { + + #ifdef HAVE_ORALDAP + function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, string $password = UNKNOWN, int $auth_mode = GSLC_SSL_NO_AUTH): LDAP\Connection|false {} + #else + function ldap_connect(?string $uri = null, int $port = 389): LDAP\Connection|false {} + #endif + + function ldap_unbind(LDAP\Connection $ldap): bool {} + + /** @alias ldap_unbind */ + function ldap_close(LDAP\Connection $ldap): bool {} + + function ldap_bind(LDAP\Connection $ldap, ?string $dn = null, ?string $password = null): bool {} + + function ldap_bind_ext(LDAP\Connection $ldap, ?string $dn = null, ?string $password = null, ?array $controls = null): LDAP\Result|false {} + + #ifdef HAVE_LDAP_SASL + 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): bool {} + #endif + + /** @param LDAP\Connection|array $ldap */ + function ldap_read($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null): LDAP\Result|array|false {} + + /** @param LDAP\Connection|array $ldap */ + function ldap_list($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null): LDAP\Result|array|false {} + + /** @param LDAP\Connection|array $ldap */ + function ldap_search($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null): LDAP\Result|array|false {} + + function ldap_free_result(LDAP\Result $result): bool {} + + function ldap_count_entries(LDAP\Connection $ldap, LDAP\Result $result): int {} + + function ldap_first_entry(LDAP\Connection $ldap, LDAP\Result $result): LDAP\ResultEntry|false {} + + function ldap_next_entry(LDAP\Connection $ldap, LDAP\ResultEntry $entry): LDAP\ResultEntry|false {} + + /** + * @return array<int|string, int|array>|false + * @refcount 1 + */ + function ldap_get_entries(LDAP\Connection $ldap, LDAP\Result $result): array|false {} + + function ldap_first_attribute(LDAP\Connection $ldap, LDAP\ResultEntry $entry): string|false {} + + function ldap_next_attribute(LDAP\Connection $ldap, LDAP\ResultEntry $entry): string|false {} + + /** + * @return array<int|string, int|string|array> + * @refcount 1 + */ + function ldap_get_attributes(LDAP\Connection $ldap, LDAP\ResultEntry $entry): array {} + + /** + * @return array<int|string, int|string>|false + * @refcount 1 + */ + function ldap_get_values_len(LDAP\Connection $ldap, LDAP\ResultEntry $entry, string $attribute): array|false {} + + /** + * @return array<int|string, int|string>|false + * @refcount 1 + * @alias ldap_get_values_len + */ + function ldap_get_values(LDAP\Connection $ldap, LDAP\ResultEntry $entry, string $attribute): array|false {} + + function ldap_get_dn(LDAP\Connection $ldap, LDAP\ResultEntry $entry): string|false {} + + /** + * @return array<int|string, int|string>|false + * @refcount 1 + */ + function ldap_explode_dn(string $dn, int $with_attrib): array|false {} + + function ldap_dn2ufn(string $dn): string|false {} + + function ldap_add(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {} + + function ldap_add_ext(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): LDAP\Result|false {} + + function ldap_delete(LDAP\Connection $ldap, string $dn, ?array $controls = null): bool {} + + function ldap_delete_ext(LDAP\Connection $ldap, string $dn, ?array $controls = null): LDAP\Result|false {} + + function ldap_modify_batch(LDAP\Connection $ldap, string $dn, array $modifications_info, ?array $controls = null): bool {} + + function ldap_mod_add(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {} + + function ldap_mod_add_ext(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): LDAP\Result|false {} + + function ldap_mod_replace(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {} + + /** @alias ldap_mod_replace */ + function ldap_modify(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {} + + function ldap_mod_replace_ext(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): LDAP\Result|false {} + + function ldap_mod_del(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): bool {} + + function ldap_mod_del_ext(LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): LDAP\Result|false {} + + function ldap_errno(LDAP\Connection $ldap): int {} + + function ldap_error(LDAP\Connection $ldap): string {} + + function ldap_err2str(int $errno): string {} + + function ldap_compare(LDAP\Connection $ldap, string $dn, string $attribute, string $value, ?array $controls = null): bool|int {} + + #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) + function ldap_rename(LDAP\Connection $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null): bool {} + + function ldap_rename_ext(LDAP\Connection $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null): LDAP\Result|false {} + + /** @param array|string|int $value */ + function ldap_get_option(LDAP\Connection $ldap, int $option, &$value = null): bool {} + + /** @param array|string|int|bool $value */ + function ldap_set_option(?LDAP\Connection $ldap, int $option, $value): bool {} + + function ldap_count_references(LDAP\Connection $ldap, LDAP\Result $result): int {} + + function ldap_first_reference(LDAP\Connection $ldap, LDAP\Result $result): LDAP\ResultEntry|false {} + + function ldap_next_reference(LDAP\Connection $ldap, LDAP\ResultEntry $entry): LDAP\ResultEntry|false {} + + #ifdef HAVE_LDAP_PARSE_REFERENCE + /** @param array $referrals */ + function ldap_parse_reference(LDAP\Connection $ldap, LDAP\ResultEntry $entry, &$referrals): bool {} + #endif + + #ifdef HAVE_LDAP_PARSE_RESULT + /** + * @param int $error_code + * @param string $matched_dn + * @param string $error_message + * @param array $referrals + * @param array $controls + */ + function ldap_parse_result(LDAP\Connection $ldap, LDAP\Result $result, &$error_code, &$matched_dn = null, &$error_message = null, &$referrals = null, &$controls = null): bool {} + #endif + #endif + + #if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC) + function ldap_set_rebind_proc(LDAP\Connection $ldap, ?callable $callback): bool {} + #endif + + #ifdef HAVE_LDAP_START_TLS_S + function ldap_start_tls(LDAP\Connection $ldap): bool {} + #endif + + function ldap_escape(string $value, string $ignore = "", int $flags = 0): string {} + + #ifdef STR_TRANSLATION + function ldap_t61_to_8859(string $value): string|false {} + + function ldap_8859_to_t61(string $value): string|false {} + #endif + + + #ifdef HAVE_LDAP_EXTENDED_OPERATION_S + /** + * @param string $response_data + * @param string $response_oid + */ + function ldap_exop(LDAP\Connection $ldap, string $request_oid, ?string $request_data = null, ?array $controls = NULL, &$response_data = UNKNOWN, &$response_oid = null): LDAP\Result|bool {} + #endif + + #ifdef HAVE_LDAP_PASSWD + /** + * @param array $controls + */ + function ldap_exop_passwd(LDAP\Connection $ldap, string $user = "", string $old_password = "", string $new_password = "", &$controls = null): string|bool {} + #endif + + + #ifdef HAVE_LDAP_WHOAMI_S + function ldap_exop_whoami(LDAP\Connection $ldap): string|false {} + #endif + + #ifdef HAVE_LDAP_REFRESH_S + function ldap_exop_refresh(LDAP\Connection $ldap, string $dn, int $ttl): int|false {} + #endif + + #ifdef HAVE_LDAP_PARSE_EXTENDED_RESULT + /** + * @param string $response_data + * @param string $response_oid + */ + function ldap_parse_exop(LDAP\Connection $ldap, LDAP\Result $result, &$response_data = null, &$response_oid = null): bool {} + #endif + } diff --git a/build/stubs/psr_container.php b/build/stubs/psr_container.php new file mode 100644 index 00000000000..a87584c6f3a --- /dev/null +++ b/build/stubs/psr_container.php @@ -0,0 +1,52 @@ +<?php + +declare(strict_types=1); + +namespace Psr\Container; + +use Throwable; + +/** + * Base interface representing a generic exception in a container. + */ +interface ContainerExceptionInterface extends Throwable +{ +} + +/** + * Describes the interface of a container that exposes methods to read its entries. + */ +interface ContainerInterface +{ + /** + * Finds an entry of the container by its identifier and returns it. + * + * @param string $id Identifier of the entry to look for. + * + * @throws NotFoundExceptionInterface No entry was found for **this** identifier. + * @throws ContainerExceptionInterface Error while retrieving the entry. + * + * @return mixed Entry. + */ + public function get(string $id); + + /** + * Returns true if the container can return an entry for the given identifier. + * Returns false otherwise. + * + * `has($id)` returning true does not mean that `get($id)` will not throw an exception. + * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`. + * + * @param string $id Identifier of the entry to look for. + * + * @return bool + */ + public function has(string $id): bool; +} + +/** + * No entry was found in the container. + */ +interface NotFoundExceptionInterface extends ContainerExceptionInterface +{ +} diff --git a/build/stubs/redis.php b/build/stubs/redis.php index e4872b81556..1a91e942fc4 100644 --- a/build/stubs/redis.php +++ b/build/stubs/redis.php @@ -2177,7 +2177,7 @@ class Redis * * @param string $pattern pattern, using '*' as a wildcard * - * @return array string[] The keys that match a certain pattern. + * @return string[]|false The keys that match a certain pattern. * * @link https://redis.io/commands/keys * @example |