\Raven_Serializer

This helper is based on code from Facebook's Phabricator project

https://github.com/facebook/phabricator

Specifically, it is an adaptation of the PhutilReadableSerializer class.

Summary

Methods
Properties
Constants
__construct()
serialize()
getMbDetectOrder()
setMbDetectOrder()
getMessageLimit()
setMessageLimit()
No public properties found
DEFAULT_MB_DETECT_ORDER
WESTERN_MB_DETECT_ORDER
serializeString()
serializeValue()
$mb_detect_order
$message_limit
N/A
No private methods found
No private properties found
N/A

Constants

DEFAULT_MB_DETECT_ORDER

DEFAULT_MB_DETECT_ORDER = 'auto'

WESTERN_MB_DETECT_ORDER

WESTERN_MB_DETECT_ORDER = 'UTF-8, ASCII, ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16, Windows-1251, Windows-1252, Windows-1254'

Properties

$mb_detect_order

$mb_detect_order : string

This is the default mb detect order for the detection of encoding

Type

string

$message_limit

$message_limit : integer

The default maximum message lengths. Longer strings will be truncated

Type

integer

Methods

__construct()

__construct(null|string  $mb_detect_order = null, null|integer  $message_limit = null) 

Parameters

null|string $mb_detect_order
null|integer $message_limit

serialize()

serialize(mixed  $value, integer  $max_depth = 3, integer  $_depth) : string|boolean|double|integer|null|object|array

Serialize an object (recursively) into something safe for data sanitization and encoding.

Parameters

mixed $value
integer $max_depth
integer $_depth

Returns

string|boolean|double|integer|null|object|array

getMbDetectOrder()

getMbDetectOrder() : string

Returns

string

setMbDetectOrder()

setMbDetectOrder(string  $mb_detect_order) : \Raven_Serializer

Parameters

string $mb_detect_order

Returns

\Raven_Serializer

getMessageLimit()

getMessageLimit() : integer

Returns

integer

setMessageLimit()

setMessageLimit(integer  $message_limit) 

Parameters

integer $message_limit

serializeString()

serializeString(  $value) 

Parameters

$value

serializeValue()

serializeValue(mixed  $value) : string|boolean|double|integer|null

Parameters

mixed $value

Returns

string|boolean|double|integer|null