Exceptions
5 days ago
apache.php
5 days ago
apcu.php
5 days ago
array.php
5 days ago
bzip2.php
5 days ago
calendar.php
5 days ago
classobj.php
5 days ago
com.php
5 days ago
cubrid.php
5 days ago
curl.php
5 days ago
datetime.php
5 days ago
dir.php
5 days ago
eio.php
5 days ago
errorfunc.php
5 days ago
exec.php
5 days ago
fileinfo.php
5 days ago
filesystem.php
5 days ago
filter.php
5 days ago
fpm.php
5 days ago
ftp.php
5 days ago
funchand.php
5 days ago
functionsList.php
5 days ago
gmp.php
5 days ago
gnupg.php
5 days ago
hash.php
5 days ago
ibase.php
5 days ago
ibmDb2.php
5 days ago
iconv.php
5 days ago
image.php
5 days ago
imap.php
5 days ago
info.php
5 days ago
ingres-ii.php
5 days ago
inotify.php
5 days ago
json.php
5 days ago
ldap.php
5 days ago
libxml.php
5 days ago
lzf.php
5 days ago
mailparse.php
5 days ago
mbstring.php
5 days ago
misc.php
5 days ago
msql.php
5 days ago
mysql.php
5 days ago
mysqli.php
5 days ago
mysqlndMs.php
5 days ago
mysqlndQc.php
5 days ago
network.php
5 days ago
oci8.php
5 days ago
opcache.php
5 days ago
openssl.php
5 days ago
outcontrol.php
5 days ago
password.php
5 days ago
pcntl.php
5 days ago
pcre.php
5 days ago
pdf.php
5 days ago
pgsql.php
5 days ago
posix.php
5 days ago
ps.php
5 days ago
pspell.php
5 days ago
readline.php
5 days ago
rpminfo.php
5 days ago
rrd.php
5 days ago
sem.php
5 days ago
session.php
5 days ago
shmop.php
5 days ago
simplexml.php
5 days ago
sockets.php
5 days ago
sodium.php
5 days ago
solr.php
5 days ago
spl.php
5 days ago
sqlsrv.php
5 days ago
ssdeep.php
5 days ago
ssh2.php
5 days ago
stream.php
5 days ago
strings.php
5 days ago
swoole.php
5 days ago
uodbc.php
5 days ago
uopz.php
5 days ago
url.php
5 days ago
var.php
5 days ago
xdiff.php
5 days ago
xml.php
5 days ago
xmlrpc.php
5 days ago
yaml.php
5 days ago
yaz.php
5 days ago
zip.php
5 days ago
zlib.php
5 days ago
outcontrol.php
94 lines
| 1 | <?php |
| 2 | |
| 3 | namespace ProfilePressVendor\Safe; |
| 4 | |
| 5 | use ProfilePressVendor\Safe\Exceptions\OutcontrolException; |
| 6 | /** |
| 7 | * This function discards the contents of the topmost output buffer and turns |
| 8 | * off this output buffering. If you want to further process the buffer's |
| 9 | * contents you have to call ob_get_contents before |
| 10 | * ob_end_clean as the buffer contents are discarded |
| 11 | * when ob_end_clean is called. |
| 12 | * |
| 13 | * The output buffer must be started by |
| 14 | * ob_start with PHP_OUTPUT_HANDLER_CLEANABLE |
| 15 | * and PHP_OUTPUT_HANDLER_REMOVABLE |
| 16 | * flags. Otherwise ob_end_clean will not work. |
| 17 | * |
| 18 | * @throws OutcontrolException |
| 19 | * |
| 20 | */ |
| 21 | function ob_end_clean(): void |
| 22 | { |
| 23 | error_clear_last(); |
| 24 | $result = \ob_end_clean(); |
| 25 | if ($result === \false) { |
| 26 | throw OutcontrolException::createFromPhpError(); |
| 27 | } |
| 28 | } |
| 29 | /** |
| 30 | * This function will send the contents of the topmost output buffer (if |
| 31 | * any) and turn this output buffer off. If you want to further |
| 32 | * process the buffer's contents you have to call |
| 33 | * ob_get_contents before |
| 34 | * ob_end_flush as the buffer contents are |
| 35 | * discarded after ob_end_flush is called. |
| 36 | * |
| 37 | * The output buffer must be started by |
| 38 | * ob_start with PHP_OUTPUT_HANDLER_FLUSHABLE |
| 39 | * and PHP_OUTPUT_HANDLER_REMOVABLE |
| 40 | * flags. Otherwise ob_end_flush will not work. |
| 41 | * |
| 42 | * @throws OutcontrolException |
| 43 | * |
| 44 | */ |
| 45 | function ob_end_flush(): void |
| 46 | { |
| 47 | error_clear_last(); |
| 48 | $result = \ob_end_flush(); |
| 49 | if ($result === \false) { |
| 50 | throw OutcontrolException::createFromPhpError(); |
| 51 | } |
| 52 | } |
| 53 | /** |
| 54 | * This function adds another name/value pair to the URL rewrite mechanism. |
| 55 | * The name and value will be added to URLs (as GET parameter) and forms |
| 56 | * (as hidden input fields) the same way as the session ID when transparent |
| 57 | * URL rewriting is enabled with session.use_trans_sid. |
| 58 | * |
| 59 | * This function's behaviour is controlled by the url_rewriter.tags and |
| 60 | * url_rewriter.hosts php.ini |
| 61 | * parameters. |
| 62 | * |
| 63 | * Note that this function can be successfully called at most once per request. |
| 64 | * |
| 65 | * @param string $name The variable name. |
| 66 | * @param string $value The variable value. |
| 67 | * @throws OutcontrolException |
| 68 | * |
| 69 | */ |
| 70 | function output_add_rewrite_var(string $name, string $value): void |
| 71 | { |
| 72 | error_clear_last(); |
| 73 | $result = \output_add_rewrite_var($name, $value); |
| 74 | if ($result === \false) { |
| 75 | throw OutcontrolException::createFromPhpError(); |
| 76 | } |
| 77 | } |
| 78 | /** |
| 79 | * This function resets the URL rewriter and removes all rewrite |
| 80 | * variables previously set by the output_add_rewrite_var |
| 81 | * function. |
| 82 | * |
| 83 | * @throws OutcontrolException |
| 84 | * |
| 85 | */ |
| 86 | function output_reset_rewrite_vars(): void |
| 87 | { |
| 88 | error_clear_last(); |
| 89 | $result = \output_reset_rewrite_vars(); |
| 90 | if ($result === \false) { |
| 91 | throw OutcontrolException::createFromPhpError(); |
| 92 | } |
| 93 | } |
| 94 |