PHP Class JSONStore, gitblog

With the restriction that the JSON object in the database must be an array (vector or map) since this interface is built upon key-value pairs. Keys must be strings, integers or floats. Values can be of any type.
Inheritance: extends FileDB, implements ArrayAccess, implements Countable
显示文件 Open project: rsms/gitblog Class Usage Examples

Public Properties

Property Type Description
$autocommit
$pretty_output

Protected Properties

Property Type Description
$originalData For keeping track of modifications done or not

Public Methods

Method Description
__construct ( $file = '/dev/null', $skeleton_file = null, $createmode = 432, $autocommit = true, $pretty_output = true )
__toString ( )
count ( )
encodeData ( )
get ( $key = null, $default = null )
loadString ( $s )
offsetExists ( $k )
offsetGet ( $k )
offsetSet ( $k, $v )
offsetUnset ( $k )
parseData ( )
set ( $key, $value = null )
throwJSONError ( $errno = false, $compatmsg = 'JSON error' )

Protected Methods

Method Description
txReadData ( )
txWriteData ( )

Method Details

__construct() public method

public __construct ( $file = '/dev/null', $skeleton_file = null, $createmode = 432, $autocommit = true, $pretty_output = true )

__toString() public method

public __toString ( )

count() public method

public count ( )

encodeData() public method

public encodeData ( )

get() public method

public get ( $key = null, $default = null )

loadString() public method

public loadString ( $s )

offsetExists() public method

public offsetExists ( $k )

offsetGet() public method

public offsetGet ( $k )

offsetSet() public method

public offsetSet ( $k, $v )

offsetUnset() public method

public offsetUnset ( $k )

parseData() public method

public parseData ( )

set() public method

public set ( $key, $value = null )

throwJSONError() public method

public throwJSONError ( $errno = false, $compatmsg = 'JSON error' )

txReadData() protected method

protected txReadData ( )

txWriteData() protected method

protected txWriteData ( )

Property Details

$autocommit public_oe property

public $autocommit

$originalData protected_oe property

For keeping track of modifications done or not
protected $originalData

$pretty_output public_oe property

public $pretty_output