CardDAV Client Library

Config
in package

Central configuration of the carddavclient library.

Tags
psalm-type

LibOptionsInput = array{ guzzle_logformat?: string, }

LibOptions = array{ guzzle_logformat: string, }

Table of Contents

Constants

GUZZLE_LOGFMT_DEBUG  : mixed = '"{method} {target} HTTP/{version}" {code}' . "...
GUZZLE_LOGFMT_SHORT  : mixed = '"{method} {target} HTTP/{version}" {code} {res...

Properties

$httplogger  : LoggerInterface
$logger  : LoggerInterface
$options  : LibOptions
Configuration options of the library.

Methods

init()  : void
Initialize the library.

Constants

GUZZLE_LOGFMT_DEBUG

public mixed GUZZLE_LOGFMT_DEBUG = '"{method} {target} HTTP/{version}" {code}' . "\n>>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"

GUZZLE_LOGFMT_SHORT

public mixed GUZZLE_LOGFMT_SHORT = '"{method} {target} HTTP/{version}" {code} {res_header_Content-Length}'

Properties

$httplogger

public static LoggerInterface $httplogger

$logger

public static LoggerInterface $logger

$options

Configuration options of the library.

public static LibOptions $options = ['guzzle_logformat' => self::GUZZLE_LOGFMT_DEBUG]
Tags
psalm-readonly-allow-private-mutation

Methods

init()

Initialize the library.

public static init([LoggerInterface|null $logger = null ][, LoggerInterface|null $httplogger = null ][, array<string|int, mixed> $options = [] ]) : void

The functions accepts two logger objects complying with the standard PSR-3 Logger interface, one of which is used by the carddavclient lib itself, the other is passed to the HTTP client library to log the HTTP traffic. Pass null for any logger to disable the corresponding logging.

The $options parameter allows to override the default behavior of the library in various options. It is an associative array that may have the following keys and values:

  • guzzle_logformat(string): Value is a string defining the HTTP log format when Guzzle is used as HTTP client library. See the documentation of the Guzzle MessageFormatter class for the available placeholders. This class offers two constants that can be used as template:
Parameters
$logger : LoggerInterface|null = null
$httplogger : LoggerInterface|null = null
$options : array<string|int, mixed> = []
Tags
psalm-param

LibOptionsInput $options Options to override defaults.

On this page

Search results