Documentation

File extends AbstractStorage
in package

Debug file storage class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

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

license

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

version
2.2.0

Table of Contents

Constants

JSON  = 'JSON'
PHP  = 'PHP'
TEXT  = 'TEXT'
Format constants

Properties

$dir  : string|null
Storage dir
$format  : string
Storage format (json, php or text)

Methods

__construct()  : mixed
Constructor
clear()  : void
Clear all debug data
decodeValue()  : mixed
Decode the value based on the format
delete()  : void
Delete debug data by ID
encodeValue()  : string
Encode the value based on the format
getById()  : mixed
Get debug data by ID
getByType()  : mixed
Get debug data by type
getDir()  : string|null
Get the storage dir
getFormat()  : string|null
Get the storage format
has()  : bool
Determine if debug data exists by ID
isJson()  : bool
Determine if the format is JSON
isPhp()  : bool
Determine if the format is PHP
isText()  : bool
Determine if the format is PHP
save()  : void
Save debug data
setDir()  : File
Set the current storage dir
setFormat()  : AbstractStorage
Set the storage format

Constants

Properties

$dir

Storage dir

protected string|null $dir = null

$format

Storage format (json, php or text)

protected string $format = 'TEXT'

Methods

__construct()

Constructor

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

Instantiate the file storage object

Parameters
$dir : string
$format : string|null = null

clear()

Clear all debug data

public clear() : void

decodeValue()

Decode the value based on the format

public decodeValue(mixed $value) : mixed
Parameters
$value : mixed

delete()

Delete debug data by ID

public delete(string $id) : void
Parameters
$id : string

encodeValue()

Encode the value based on the format

public encodeValue(mixed $value) : string
Parameters
$value : mixed
Tags
throws
Exception
Return values
string

getById()

Get debug data by ID

public getById(string $id) : mixed
Parameters
$id : string

getByType()

Get debug data by type

public getByType(string $type) : mixed
Parameters
$type : string

getDir()

Get the storage dir

public getDir() : string|null
Return values
string|null

getFormat()

Get the storage format

public getFormat() : string|null
Return values
string|null

has()

Determine if debug data exists by ID

public has(string $id) : bool
Parameters
$id : string
Return values
bool

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

isText()

Determine if the format is PHP

public isText() : bool
Return values
bool

save()

Save debug data

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

setDir()

Set the current storage dir

public setDir(string $dir) : File
Parameters
$dir : string
Tags
throws
Exception
Return values
File

        
On this page

Search results