Documentation

AbstractStorage
in package
implements StorageInterface

Debug storage abstract class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
1.3.0

Interfaces, Classes and Traits

StorageInterface
Debug storage interface

Table of Contents

JSON  = 'JSON'
Format constants
PHP  = 'PHP'
$format  : string
Storage format (json, php or text)
__construct()  : mixed
Constructor
clear()  : void
Clear all debug data
decodeValue()  : mixed
Decode the value based on the format
delete()  : void
Delete debug data
encodeValue()  : string
Encode the value based on the format
get()  : mixed
Get debug data
getFormat()  : string
Get the storage format
has()  : mixed
Determine if debug data exists
isJson()  : bool
Determine if the format is JSON
isPhp()  : bool
Determine if the format is PHP
save()  : void
Save debug data
setFormat()  : AbstractStorage
Set the storage format

Constants

Properties

$format

Storage format (json, php or text)

protected string $format = null

Methods

__construct()

Constructor

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

Instantiate the storage object

Parameters
$format : string = null
Return values
mixed

clear()

Clear all debug data

public abstract clear() : void
Return values
void

decodeValue()

Decode the value based on the format

public abstract decodeValue(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

delete()

Delete debug data

public abstract delete(string $id) : void
Parameters
$id : string
Return values
void

encodeValue()

Encode the value based on the format

public abstract encodeValue(mixed $value) : string
Parameters
$value : mixed
Return values
string

get()

Get debug data

public abstract get(string $id) : mixed
Parameters
$id : string
Return values
mixed

getFormat()

Get the storage format

public getFormat() : string
Return values
string

has()

Determine if debug data exists

public abstract has(string $id) : mixed
Parameters
$id : string
Return values
mixed

isJson()

Determine if the format is JSON

public isJson() : bool
Return values
bool

isPhp()

Determine if the format is PHP

public isPhp() : bool
Return values
bool

save()

Save debug data

public abstract save(string $id, mixed $value) : void
Parameters
$id : string
$value : mixed
Return values
void

Search results