Fat-Free Framework  3.3.0  Overview Class List Hierarchy
Public Member Functions | Public Attributes | Protected Attributes | List of all members
DB\Jig Class Reference

Flat-file DB wrapper. More...

Public Member Functions

 read ($file)
 
 write ($file, array $data=NULL)
 
 dir ()
 
 uuid ()
 
 log ()
 
 jot ($frame)
 
 drop ()
 
 __construct ($dir, $format=self::FORMAT_JSON)
 

Public Attributes

 $dir
 Storage location.
 
 $format
 Current storage format.
 
 $log
 Jig log.
 
const FORMAT_JSON =0
 
const FORMAT_Serialized =1
 

Protected Attributes

 $uuid
 UUID.
 

Detailed Description

Flat-file DB wrapper.

Constructor & Destructor Documentation

DB\Jig::__construct (   $dir,
  $format = self::FORMAT_JSON 
)

Instantiate class

Parameters
$dirstring
$formatint

Member Function Documentation

DB\Jig::dir ( )

Return directory

Returns
string
DB\Jig::drop ( )

Clean storage

Returns
NULL
DB\Jig::jot (   $frame)

Jot down log entry

Returns
NULL
Parameters
$framestring
DB\Jig::log ( )

Return SQL profiler results

Returns
string
DB\Jig::read (   $file)

Read data from file

Returns
array
Parameters
$filestring
DB\Jig::uuid ( )

Return UUID

Returns
string
DB\Jig::write (   $file,
array  $data = NULL 
)

Write data to file

Returns
int
Parameters
$filestring
$dataarray

The documentation for this class was generated from the following file: