InfluxDB PHP Client
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
InfluxDB2\ObjectSerializer Class Reference

Static Public Member Functions

static sanitizeForSerialization ($data, $type=null, $format=null)
 
static sanitizeFilename ($filename)
 
static toPathValue ($value)
 
static toQueryValue ($object)
 
static toHeaderValue ($value)
 
static toFormValue ($value)
 
static toString ($value)
 
static serializeCollection (array $collection, $collectionFormat, $allowCollectionFormatMulti=false)
 
static fixDatetimeNanos (string $date)
 

Member Function Documentation

◆ fixDatetimeNanos()

static InfluxDB2\ObjectSerializer::fixDatetimeNanos ( string $date)
static

Nano precision is not supported while decoding RFC 3339 formatted date/times. https://bugs.php.net/bug.php?id=6481 This workaround removes last number of digits in the "time-secfrac" if its length is > 8

Parameters
String$date
Returns
string datetime string "time-secfrac" is cut to max 8 digits

◆ sanitizeFilename()

static InfluxDB2\ObjectSerializer::sanitizeFilename ( $filename)
static

Sanitize filename by removing path. e.g. ../../sun.gif becomes sun.gif

Parameters
string$filenamefilename to be sanitized
Returns
string the sanitized filename

◆ sanitizeForSerialization()

static InfluxDB2\ObjectSerializer::sanitizeForSerialization ( $data,
$type = null,
$format = null )
static

Serialize data

Parameters
mixed$datathe data to serialize
string$typethe OpenAPIToolsType of the data
string$formatthe format of the OpenAPITools type of the data
Returns
string|object serialized form of $data

◆ serializeCollection()

static InfluxDB2\ObjectSerializer::serializeCollection ( array $collection,
$collectionFormat,
$allowCollectionFormatMulti = false )
static

Serialize an array to a string.

Parameters
array$collectioncollection to serialize to a string
string$collectionFormatthe format use for serialization (csv, ssv, tsv, pipes, multi)
bool$allowCollectionFormatMultiallow collection format to be a multidimensional array
Returns
string

◆ toFormValue()

static InfluxDB2\ObjectSerializer::toFormValue ( $value)
static

Take value and turn it into a string suitable for inclusion in the http body (form parameter). If it's a string, pass through unchanged If it's a datetime object, format it in ISO8601

Parameters
string | \SplFileObject$valuethe value of the form parameter
Returns
string the form string

◆ toHeaderValue()

static InfluxDB2\ObjectSerializer::toHeaderValue ( $value)
static

Take value and turn it into a string suitable for inclusion in the header. If it's a string, pass through unchanged If it's a datetime object, format it in ISO8601

Parameters
string$valuea string which will be part of the header
Returns
string the header string

◆ toPathValue()

static InfluxDB2\ObjectSerializer::toPathValue ( $value)
static

Take value and turn it into a string suitable for inclusion in the path, by url-encoding.

Parameters
string$valuea string which will be part of the path
Returns
string the serialized object

◆ toQueryValue()

static InfluxDB2\ObjectSerializer::toQueryValue ( $object)
static

Take value and turn it into a string suitable for inclusion in the query, by imploding comma-separated if it's an object. If it's a string, pass through unchanged. It will be url-encoded later.

Parameters
string[] | string | \DateTime$objectan object to be serialized to a string
Returns
string the serialized object

◆ toString()

static InfluxDB2\ObjectSerializer::toString ( $value)
static

Take value and turn it into a string suitable for inclusion in the parameter. If it's a string, pass through unchanged If it's a datetime object, format it in ISO8601

Parameters
string | \DateTime$valuethe value of the parameter
Returns
string the header string

The documentation for this class was generated from the following file: