* * @param string $content The content to be tocified * @param array $options Array of options for the TOC filter * * @return string The content with inserted anchor- and * permalinks in headings */ public function tocify($content, $options = []) { // Change regex, i.e. allow headers in (block-)quotes being parsed $regex = str_replace('blockquote|q|cite|', '', $this->regex['html']); $counter = []; $content = preg_replace_callback($regex, function($match) use ($options, &$counter) { $tag = strtolower($match['tag']); $text = trim($match['text']); // Don't consider headings in code or pre environments if (($tag{0} !== 'h') || (mb_strlen($text) == 0)) { // Ignore empty headers, too return $match[0]; } // Extract informations from HTML tags $level = $indent = (int) mb_substr($tag, 1); // Expand tag attributes $language = $options->get('language'); $attributes = $this->parseAttributes($match['attr']); $id = isset($attributes['id']) ? $attributes['id'] : $this->hyphenize($text, $options, $language); $classes = isset($attributes['class']) ? $attributes['class'] . ' headeranchor' : 'headeranchor'; // Replace empty id with hash of text if (strlen($id) == 0) { $id = substr(md5($text), 0, 6); } // Increment counter on same heading names
"Array and string offset access syntax with curly braces is no longer supported"
/** * Special case to deal with Fatal errors and the like. */ public function handleShutdown() { // If we reached this step, we are in shutdown handler. // An exception thrown in a shutdown handler will not be propagated // to the exception handler. Pass that information along. $this->canThrowExceptions = false; $error = $this->system->getLastError(); if ($error && Misc::isLevelFatal($error['type'])) { // If there was a fatal error, // it was not handled in handleError yet. $this->allowQuit = false; $this->handleError( $error['type'], $error['message'], $error['file'], $error['line'] ); } } /** * In certain scenarios, like in shutdown handler, we can not throw exceptions * @var bool */ private $canThrowExceptions = true; private function resolveHandler($handler) { if (is_callable($handler)) { $handler = new CallbackHandler($handler); } if (!$handler instanceof HandlerInterface) { throw new InvalidArgumentException( "Handler must be a callable, or instance of " . "Whoops\\Handler\\HandlerInterface"
* * @return void */ public function registerShutdownFunction(callable $function) { $this->whoopsShutdownHandler = $function; register_shutdown_function([$this, 'handleShutdown']); } /** * Special case to deal with Fatal errors and the like. */ public function handleShutdown() { $error = $this->getLastError(); // Ignore core warnings and errors. if ($error && !($error['type'] & (E_CORE_WARNING | E_CORE_ERROR))) { $handler = $this->whoopsShutdownHandler; $handler(); } } }
Key | Value |
redirect_after_login | "/manual/operations/initial setup/setting up your restaurant/setting up a different menu for specific pos machine"
|
user | User {#1505} |
Key | Value |
LSPHP_ENABLE_USER_INI | "on"
|
PATH | "/usr/local/bin:/usr/bin:/bin"
|
TEMP | "/tmp"
|
TMP | "/tmp"
|
TMPDIR | "/tmp"
|
PWD | "/"
|
HTTP_AUTHORIZATION | "Basic dmVyb25hLW1hbnVhbDojbDJpZ3YrczBQaW0="
|
HTTP_CONNECTION | "Keep-Alive"
|
CONTENT_LENGTH | "0"
|
HTTP_HOST | "verona-manual.intercloudmall.com"
|
HTTP_USER_AGENT | "Amazon CloudFront"
|
HTTP_X_FORWARDED_FOR | "54.87.90.21"
|
HTTP_VIA | "2.0 73c5607bdb5db0d651e25c848846d554.cloudfront.net (CloudFront)"
|
HTTP_X_AMZ_CF_ID | "944y-ifgbkhJNbknNEOeYVgzDRpRqdch5j60IQ0cXMLtrfKY6vWbWA=="
|
REDIRECT_UNIQUE_ID | "ZgaPkQdbI9c96n24oNHz0gAAAeA"
|
REDIRECT_SCRIPT_URL | "/manual/operations/initial%20setup/setting%20up%20your%20restaurant/setting%20up%20a%20different%20menu%20for%20specific%20pos%20machine"
|
REDIRECT_SCRIPT_URI | "http://verona-manual.intercloudmall.com/manual/operations/initial%20setup/setting%20up%20your%20restaurant/setting%20up%20a%20different%20menu%20for%20specific%20pos%20machine"
|
REDIRECT_USER_ID | "1253079"
|
REDIRECT_STATUS | "200"
|
UNIQUE_ID | "ZgaPkQdbI9c96n24oNHz0gAAAeA"
|
SCRIPT_URL | "/manual/operations/initial%20setup/setting%20up%20your%20restaurant/setting%20up%20a%20different%20menu%20for%20specific%20pos%20machine"
|
SCRIPT_URI | "http://verona-manual.intercloudmall.com/manual/operations/initial%20setup/setting%20up%20your%20restaurant/setting%20up%20a%20different%20menu%20for%20specific%20pos%20machine"
|
USER_ID | "1253079"
|
SERVER_SIGNATURE | "" |
SERVER_SOFTWARE | "Apache"
|
SERVER_NAME | "verona-manual.intercloudmall.com"
|
SERVER_ADDR | "208.109.227.27"
|
SERVER_PORT | "80"
|
REMOTE_ADDR | "64.252.68.22"
|
DOCUMENT_ROOT | "/home/velapos/public_html/verona-manual.intercloudmall.com"
|
REQUEST_SCHEME | "http"
|
CONTEXT_PREFIX | "" |
CONTEXT_DOCUMENT_ROOT | "/home/velapos/public_html/verona-manual.intercloudmall.com"
|
SERVER_ADMIN | "webmaster@verona-manual.intercloudmall.com"
|
SCRIPT_FILENAME | "/home/velapos/public_html/verona-manual.intercloudmall.com/index.php"
|
REMOTE_PORT | "60450"
|
REMOTE_USER | "verona-manual"
|
AUTH_TYPE | "Basic"
|
REDIRECT_URL | "/manual/operations/initial%20setup/setting%20up%20your%20restaurant/setting%20up%20a%20different%20menu%20for%20specific%20pos%20machine"
|
SERVER_PROTOCOL | "HTTP/1.1"
|
REQUEST_METHOD | "GET"
|
QUERY_STRING | "" |
REQUEST_URI | "/manual/operations/initial%2520setup/setting%2520up%2520your%2520restaurant/setting%2520up%2520a%2520different%2520menu%2520for%2520specific%2520pos%2520machine"
|
SCRIPT_NAME | "/index.php"
|
PHP_AUTH_USER | "verona-manual"
|
PHP_AUTH_PW | "************"
|
PHP_SELF | "/index.php"
|
REQUEST_TIME_FLOAT | 1711706001.4114
|
REQUEST_TIME | 1711706001
|