public function __construct(array $config = []) { parent::__construct($config); global $request; $this->json['request_uri'] = (string) $request->uri; // @todo Tap us into the the PostController hook when we have that available. }
public function __construct(array $config = []) { parent::__construct($config); $this->path = $config['path'] ?? WRITEPATH . 'logs/'; $this->fileExtension = $config['fileExtension'] ?? 'php'; $this->fileExtension = ltrim($this->fileExtension, '.'); $this->filePermissions = $config['filePermissions'] ?? 0644; }
/** * Constructor * * @param array $config */ public function __construct(array $config = []) { parent::__construct($config); $request = Services::request(null, true); $this->json['request_uri'] = (string) $request->uri; Hooks::on('post_controller', [$this, 'sendLogs'], HOOKS_PRIORITY_HIGH); }