EbookCover
in package
Table of Contents
Properties
Methods
- __toString() : string
- getContent() : string|null
- getContents() : string|null
- Get the cover contents.
- getPath() : string|null
- Get the cover path.
- make() : self|null
- toArray() : array<string|int, mixed>
- toJson() : string
- __construct() : mixed
- isBase64() : bool
Properties
$contents
protected
string|null
$contents
= null
$path
protected
string|null
$path
= null
Methods
__toString()
public
__toString() : string
Return values
stringgetContent()
public
getContent([bool $toBase64 = false ]) : string|null
Use getContents() instead.
Parameters
- $toBase64 : bool = false
Return values
string|nullgetContents()
Get the cover contents.
public
getContents([bool $toBase64 = false ]) : string|null
Parameters
- $toBase64 : bool = false
-
If true, the contents will be returned in base64 format.
Return values
string|nullgetPath()
Get the cover path.
public
getPath() : string|null
Return values
string|nullmake()
public
static make([string|null $path = null ][, string|null $contents = null ]) : self|null
Parameters
- $path : string|null = null
- $contents : string|null = null
Return values
self|nulltoArray()
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>toJson()
public
toJson() : string
Return values
string__construct()
protected
__construct([string|null $path = null ][, string|null $contents = null ]) : mixed
Parameters
- $path : string|null = null
- $contents : string|null = null
isBase64()
private
static isBase64(string $contents) : bool
Parameters
- $contents : string