Binary
final class Binary implements Type, BinaryInterface, JsonSerializable, Stringable (View source)
Class Binary
Constants
| TYPE_GENERIC |
|
| TYPE_FUNCTION |
|
| TYPE_OLD_BINARY |
|
| TYPE_OLD_UUID |
|
| TYPE_UUID |
|
| TYPE_MD5 |
|
|
TYPE_ENCRYPTED
Since: 1.7.0
|
|
|
TYPE_COLUMN
Since: 1.12.0
|
|
|
TYPE_SENSITIVE
Since: 1.17.0
|
|
|
TYPE_VECTOR
Since: 2.2.0
|
|
| TYPE_USER_DEFINED |
|
Methods
__construct(string $data, int $type = Binary::TYPE_GENERIC)
Binary constructor.
static Binary
fromVector(array $vector, VectorType $vectorType)
Create a binary from a given vector and vector type.
string
getData()
Returns the Binary's data
int
getType()
Returns the Binary's type
VectorType
getVectorType()
Returns the Binary's vector type
array
toArray()
Converts a binary vector to an array
static Binary
__set_state(array $properties)
No description
string
__toString()
Returns the Binary's data
mixed
jsonSerialize()
Returns a representation that can be converted to JSON
Details
final
__construct(string $data, int $type = Binary::TYPE_GENERIC)
Binary constructor.
final static Binary
fromVector(array $vector, VectorType $vectorType)
Create a binary from a given vector and vector type.
final string
getData()
Returns the Binary's data
final int
getType()
Returns the Binary's type
final VectorType
getVectorType()
Returns the Binary's vector type
final array
toArray()
Converts a binary vector to an array
static Binary
__set_state(array $properties)
No description
final string
__toString()
Returns the Binary's data
final mixed
jsonSerialize()
Since: 1.2.0
Returns a representation that can be converted to JSON