芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/cms.mgaplay.com.br/lib/Helper/LogProcessor.php
. */ namespace Xibo\Helper; /** * Class LogProcessor * @package Xibo\Helper */ class LogProcessor { private $route; private $method; private $userId; /** * Log Processor * @param $route * @param $method * @param $userId */ public function __construct($route, $method, $userId) { $this->route = $route; $this->method = $method; $this->userId = $userId; } /** * @param array $record * @return array */ public function __invoke(array $record) { $record['extra']['method'] = $this->method; $record['extra']['route'] = $this->route; if ($this->userId != null) { $record['extra']['userId'] = $this->userId; } return $record; } }