Oihana PHP Arango

toBase64.php

Table of Contents

Functions

toBase64()  : string
Return the Base64 representation of a value.

Functions

toBase64()

Return the Base64 representation of a value.

toBase64(string $value) : string

This helper wraps the ArangoDB AQL function TO_BASE64(value) which converts the input value to its Base64 encoded string representation. Base64 encoding is commonly used for encoding binary data in text format.

Example AQL usage:

TO_BASE64("hello")            // returns "aGVsbG8="
TO_BASE64("world")            // returns "d29ybGQ="
TO_BASE64(doc.data)           // returns Base64 encoded data
Parameters
$value : string

String expression to encode to Base64.

Tags
example
use function oihana\arango\db\functions\strings\toBase64;

$expr = toBase64('doc.data');
// Produces: 'TO_BASE64(doc.data)'
see
https://docs.arangodb.com/3.12/aql/functions/string/#to_base64
toHex()

For hexadecimal encoding.

since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results