php-src/ext/fileinfo/fileinfo.stub.php
Máté Kocsis 50f31829b1
Generate optimizer func info from stubs for a few extensions - part 2 (#7401)
ext/bcmath, ext/fileinfo, ext/filter, ext/gettext, ext/session
2021-08-25 15:29:46 +02:00

56 lines
1.5 KiB
PHP

<?php
/** @generate-class-entries */
/** @not-serializable */
class finfo
{
/** @alias finfo_open */
public function __construct(int $flags = FILEINFO_NONE, ?string $magic_database = null) {}
/**
* @param resource|null $context
* @tentative-return-type
* @alias finfo_file
*/
public function file(string $filename, int $flags = FILEINFO_NONE, $context = null): string|false {}
/**
* @param resource|null $context
* @tentative-return-type
* @alias finfo_buffer
*/
public function buffer(string $string, int $flags = FILEINFO_NONE, $context = null): string|false {}
/**
* @return bool
* @alias finfo_set_flags
*/
public function set_flags(int $flags) {} // TODO make return type void
}
/** @refcount 1 */
function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): finfo|false {}
function finfo_close(finfo $finfo): bool {}
function finfo_set_flags(finfo $finfo, int $flags): bool {} // TODO make return type void
/**
* @param resource|null $context
* @refcount 1
*/
function finfo_file(finfo $finfo, string $filename, int $flags = FILEINFO_NONE, $context = null): string|false {}
/**
* @param resource|null $context
* @refcount 1
*/
function finfo_buffer(finfo $finfo, string $string, int $flags = FILEINFO_NONE, $context = null): string|false {}
/**
* @param resource|string $filename
* @refcount 1
*/
function mime_content_type($filename): string|false {}