src/site/php/standin fix.php

Constants

FILEINFO_NONE

FILEINFO_NONE = 0

FILEINFO_MIME_TYPE

FILEINFO_MIME_TYPE = 16

FILEINFO_MIME_ENCODING

FILEINFO_MIME_ENCODING = 1024

FILEINFO_MIME

FILEINFO_MIME = 1040

FILEINFO_EXTENSION

FILEINFO_EXTENSION = 16777216

Functions

cfw_standins_installed()

cfw_standins_installed() : bool

Returns

bool —

cfw_degraded()

cfw_degraded(string  $capability, string  $why, string  $state = 'blocked') : void

Parameters

string $capability

The capability that degraded.

string $why

Why it did.

string $state

The module table's word for it: verified, untested or blocked.

Returns

void —

cfw_batch_yield()

cfw_batch_yield(int  $ops) : bool

Whether _batch_process() should end this request, read after every operation.

Yields on the operation count or when the host reports the isolate near its ceiling, whichever comes first; memory_get_usage() reads 0 in this build, so the host is asked.

Parameters

int $ops

Operations run so far in this request.

Returns

bool —

cfw_guzzle_handler()

cfw_guzzle_handler() : object|null

The transport a Guzzle client built with no handler gets, read by the pack's chooseHandler().

Returns

object|null —

A handler, or NULL when the drupflare module is not loaded.

cfw_symfony_http_client()

cfw_symfony_http_client(array  $defaultOptions = []) : object|null

What a delivered symfony/http-client's HttpClient::create() answers with, once rewritten.

Parameters

array $defaultOptions

The options the caller passed to create().

Returns

object|null —

A client, or NULL when the drupflare module is not loaded.

exif_read_data()

exif_read_data(string|resource  $file, string|null  $required_sections = null, bool  $as_arrays = false, bool  $read_thumbnail = false) : array<string,mixed>|false

Parameters

string|resource $file

A path or an open stream.

string|null $required_sections

Comma-separated sections the result must carry.

bool $as_arrays

Return sections as arrays.

bool $read_thumbnail

Also read the embedded thumbnail.

Returns

array|false —

transliterator_create()

transliterator_create(string  $id, int  $direction = 0) : object|null

Parameters

string $id

A transliterator rule id.

int $direction

0 for forward.

Returns

object|null —

transliterator_transliterate()

transliterator_transliterate(object|string  $transliterator, string  $string, int  $start = 0, int  $end = -1) : string|false

Parameters

object|string $transliterator

A transliterator or a rule id.

string $string

The text to transliterate.

int $start

First byte to transliterate.

int $end

One past the last byte, or -1 for the rest.

Returns

string|false —

finfo_open()

finfo_open(int  $flags = 0, string|null  $magic_database = null) : object|false

Parameters

int $flags

FILEINFO_* flags.

string|null $magic_database

Ignored.

Returns

object|false —

finfo_file()

finfo_file(object  $finfo, string  $filename, int  $flags = 0, resource|null  $context = null) : string|false

Parameters

object $finfo

The finfo instance.

string $filename

A path.

int $flags

FILEINFO_* flags.

resource|null $context

Ignored.

Returns

string|false —

finfo_buffer()

finfo_buffer(object  $finfo, string  $string, int  $flags = 0, resource|null  $context = null) : string|false

Parameters

object $finfo

The finfo instance.

string $string

The bytes to inspect.

int $flags

FILEINFO_* flags.

resource|null $context

Ignored.

Returns

string|false —

finfo_set_flags()

finfo_set_flags(object  $finfo, int  $flags) : mixed

Parameters

object $finfo

The finfo instance.

int $flags

FILEINFO_* flags.

Returns

mixed —

finfo_close()

finfo_close(object  $finfo) : bool

Parameters

object $finfo

The finfo instance.

Returns

bool —

mime_content_type()

mime_content_type(string|resource  $filename) : string|false

Parameters

string|resource $filename

A path or an open stream.

Returns

string|false —

cfw_sleep_ms()

cfw_sleep_ms(float|int  $ms, string  $fn) : bool

Waits through the host, or returns at once and records how short it fell.

Parameters

float|int $ms

How long to wait, in milliseconds.

string $fn

The PHP function the caller used, for the degradation row.

Returns

bool —

Whether the whole wait happened.

sleep()

sleep(int  $seconds) : int

Parameters

int $seconds

Returns

int —

usleep()

usleep(int  $microseconds) : void

Parameters

int $microseconds

Returns

void —

time_nanosleep()

time_nanosleep(int  $seconds, int  $nanoseconds) : bool

Parameters

int $seconds

Whole seconds.

int $nanoseconds

Nanoseconds past the seconds.

Returns

bool —

time_sleep_until()

time_sleep_until(float  $timestamp) : bool

Parameters

float $timestamp

Returns

bool —

uniqid()

uniqid(string  $prefix = '', bool  $more_entropy = false) : string

Parameters

string $prefix
bool $more_entropy

Returns

string —

exec()

exec(string  $command, string[]|null  $output = null, int|null  $result_code = null) : string|false

Parameters

string $command

The command line.

string[]|null $output

Set to the output lines.

int|null $result_code

Set to the exit code.

Returns

string|false —

shell_exec()

shell_exec(string  $command) : string|false|null

Parameters

string $command

The command line.

Returns

string|false|null —

system()

system(string  $command, int|null  $result_code = null) : string|false

Parameters

string $command

The command line.

int|null $result_code

Set to the exit code.

Returns

string|false —

passthru()

passthru(string  $command, int|null  $result_code = null) : false|null

Parameters

string $command

The command line.

int|null $result_code

Set to the exit code.

Returns

false|null —

proc_open()

proc_open(array|string  $command, array  $descriptor_spec, array  $pipes, string|null  $cwd = null, array|null  $env_vars = null, array|null  $options = null) : resource|false

Parameters

array|string $command

The command line.

array $descriptor_spec

The pipes to open.

array $pipes

Set to the opened pipes.

string|null $cwd

Working directory.

array|null $env_vars

Environment.

array|null $options

Platform options.

Returns

resource|false —

popen()

popen(string  $command, string  $mode) : resource|false

Parameters

string $command

The command line.

string $mode

r or w.

Returns

resource|false —

pclose()

pclose(resource  $handle) : int

Parameters

resource $handle

Returns

int —

proc_get_status()

proc_get_status(resource  $process) : array<string,mixed>|false

Parameters

resource $process

A handle from proc_open().

Returns

array|false —

proc_close()

proc_close(resource  $process) : int

Parameters

resource $process

Returns

int —

proc_terminate()

proc_terminate(resource  $process, int  $signal = 15) : bool

Parameters

resource $process

A handle from proc_open().

int $signal

The signal number.

Returns

bool —