Documentation

Horde_Url_Data
in package

An object to handle Data URLs (RFC 2397).

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2013-2017 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

$base64  : bool
Should data be base64 encoded?
$data  : string
Binary data.
$type  : string
The MIME type.
__construct()  : mixed
Constructor.
__toString()  : mixed
Output RFC 2397 compliant data string.
create()  : mixed
Create a new object from existing data.
isData()  : bool
Check input to see if it contains RFC 2397 data.

Properties

$base64

Should data be base64 encoded?

public bool $base64 = \true

$data

Binary data.

public string $data = ''

$type

The MIME type.

public string $type = 'application/octet-stream'

Methods

__construct()

Constructor.

public __construct([string $data = null ]) : mixed
Parameters
$data : string = null

An RFC 2397 compliant data string.

Return values
mixed

__toString()

Output RFC 2397 compliant data string.

public __toString() : mixed
Return values
mixed

create()

Create a new object from existing data.

public static create([string $type = null ][, string $data = null ][, bool $base64 = true ]) : mixed
Parameters
$type : string = null

The MIME type of the data.

$data : string = null

The data.

$base64 : bool = true

Should data be base64 encoded?

Return values
mixed

isData()

Check input to see if it contains RFC 2397 data.

public static isData(mixed $input) : bool
Parameters
$input : mixed
Tags
since
2.2.0
Return values
bool

True if the input contains RFC 2397 compliant data.

Search results