ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
SystemFacade.php
Go to the documentation of this file.
1 <?php
7 namespace Whoops\Util;
8 
10 {
16  public function startOutputBuffering()
17  {
18  return ob_start();
19  }
20 
27  public function setErrorHandler(callable $handler, $types = 'use-php-defaults')
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  }
35 
41  public function setExceptionHandler(callable $handler)
42  {
43  return set_exception_handler($handler);
44  }
45 
49  public function restoreExceptionHandler()
50  {
51  restore_exception_handler();
52  }
53 
57  public function restoreErrorHandler()
58  {
59  restore_error_handler();
60  }
61 
67  public function registerShutdownFunction(callable $function)
68  {
69  register_shutdown_function($function);
70  }
71 
75  public function cleanOutputBuffer()
76  {
77  return ob_get_clean();
78  }
79 
83  public function getOutputBufferLevel()
84  {
85  return ob_get_level();
86  }
87 
91  public function endOutputBuffering()
92  {
93  return ob_end_clean();
94  }
95 
99  public function flushOutputBuffer()
100  {
101  flush();
102  }
103 
107  public function getErrorReportingLevel()
108  {
109  return error_reporting();
110  }
111 
115  public function getLastError()
116  {
117  return error_get_last();
118  }
119 
125  public function setHttpResponseCode($httpCode)
126  {
127  return http_response_code($httpCode);
128  }
129 
133  public function stopExecution($exitStatus)
134  {
135  exit($exitStatus);
136  }
137 }
startOutputBuffering()
Turns on output buffering.
setExceptionHandler(callable $handler)
registerShutdownFunction(callable $function)
setErrorHandler(callable $handler, $types='use-php-defaults')
Whoops - php errors for cool kids.