ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Whoops\Util\SystemFacade Class Reference
+ Collaboration diagram for Whoops\Util\SystemFacade:

Public Member Functions

 startOutputBuffering ()
 Turns on output buffering. More...
 
 setErrorHandler (callable $handler, $types='use-php-defaults')
 
 setExceptionHandler (callable $handler)
 
 restoreExceptionHandler ()
 
 restoreErrorHandler ()
 
 registerShutdownFunction (callable $function)
 
 cleanOutputBuffer ()
 
 getOutputBufferLevel ()
 
 endOutputBuffering ()
 
 flushOutputBuffer ()
 
 getErrorReportingLevel ()
 
 getLastError ()
 
 setHttpResponseCode ($httpCode)
 
 stopExecution ($exitStatus)
 

Detailed Description

Definition at line 9 of file SystemFacade.php.

Member Function Documentation

◆ cleanOutputBuffer()

Whoops\Util\SystemFacade::cleanOutputBuffer ( )
Returns
string|false

Definition at line 75 of file SystemFacade.php.

76 {
77 return ob_get_clean();
78 }

◆ endOutputBuffering()

Whoops\Util\SystemFacade::endOutputBuffering ( )
Returns
bool

Definition at line 91 of file SystemFacade.php.

92 {
93 return ob_end_clean();
94 }

◆ flushOutputBuffer()

Whoops\Util\SystemFacade::flushOutputBuffer ( )
Returns
void

Definition at line 99 of file SystemFacade.php.

100 {
101 flush();
102 }

◆ getErrorReportingLevel()

Whoops\Util\SystemFacade::getErrorReportingLevel ( )
Returns
int

Definition at line 107 of file SystemFacade.php.

108 {
109 return error_reporting();
110 }

◆ getLastError()

Whoops\Util\SystemFacade::getLastError ( )
Returns
array|null

Definition at line 115 of file SystemFacade.php.

116 {
117 return error_get_last();
118 }

◆ getOutputBufferLevel()

Whoops\Util\SystemFacade::getOutputBufferLevel ( )
Returns
int

Definition at line 83 of file SystemFacade.php.

84 {
85 return ob_get_level();
86 }

◆ registerShutdownFunction()

Whoops\Util\SystemFacade::registerShutdownFunction ( callable  $function)
Parameters
callable$function
Returns
void

Definition at line 67 of file SystemFacade.php.

68 {
69 register_shutdown_function($function);
70 }

◆ restoreErrorHandler()

Whoops\Util\SystemFacade::restoreErrorHandler ( )
Returns
void

Definition at line 57 of file SystemFacade.php.

58 {
59 restore_error_handler();
60 }

◆ restoreExceptionHandler()

Whoops\Util\SystemFacade::restoreExceptionHandler ( )
Returns
void

Definition at line 49 of file SystemFacade.php.

50 {
51 restore_exception_handler();
52 }

◆ setErrorHandler()

Whoops\Util\SystemFacade::setErrorHandler ( callable  $handler,
  $types = 'use-php-defaults' 
)
Parameters
callable$handler
int$types
Returns
callable|null

Definition at line 27 of file SystemFacade.php.

28 {
29 // Workaround for PHP 5.5
30 if ($types === 'use-php-defaults') {
31 $types = E_ALL | E_STRICT;
32 }
33 return set_error_handler($handler, $types);
34 }
$handler

References $handler.

◆ setExceptionHandler()

Whoops\Util\SystemFacade::setExceptionHandler ( callable  $handler)
Parameters
callable$handler
Returns
callable|null

Definition at line 41 of file SystemFacade.php.

42 {
43 return set_exception_handler($handler);
44 }

References $handler.

◆ setHttpResponseCode()

Whoops\Util\SystemFacade::setHttpResponseCode (   $httpCode)
Parameters
int$httpCode
Returns
int

Definition at line 125 of file SystemFacade.php.

126 {
127 return http_response_code($httpCode);
128 }

◆ startOutputBuffering()

Whoops\Util\SystemFacade::startOutputBuffering ( )

Turns on output buffering.

Returns
bool

Definition at line 16 of file SystemFacade.php.

17 {
18 return ob_start();
19 }

◆ stopExecution()

Whoops\Util\SystemFacade::stopExecution (   $exitStatus)
Parameters
int$exitStatus

Definition at line 133 of file SystemFacade.php.

134 {
135 exit($exitStatus);
136 }
exit
Definition: backend.php:16

References exit.


The documentation for this class was generated from the following file: