MagicDb Class Reference

Inheritance diagram for MagicDb:

Object

List of all members.


Public Member Functions

 analyze ($file, $options=array())
 read ($magicDb=null)
 toArray ($data=null)
 validates ($magicDb=null)

Public Attributes

 $db = array()

Detailed Description

Definition at line 36 of file magic_db.php.


Member Function Documentation

MagicDb::analyze ( file,
options = array() 
)

Analyzes a given $file using the currently loaded MagicDb information based on the desired $options

Parameters:
string $file Absolute path to the file to analyze
array $options TBT
Returns:
mixed public

Definition at line 157 of file magic_db.php.

References $file.

MagicDb::read ( magicDb = null  ) 

Definition at line 51 of file magic_db.php.

References toArray(), and validates().

MagicDb::toArray ( data = null  ) 

Parses a MagicDb $data string into an array or returns the current MagicDb instance as an array

Parameters:
string $data A MagicDb string to turn into an array
Returns:
array A parsed MagicDb array or an empty array if the $data param was invalid. Returns the db property if $data is not set. public

Definition at line 85 of file magic_db.php.

References $db.

Referenced by read(), and validates().

MagicDb::validates ( magicDb = null  ) 

Returns true if the MagicDb instance or the passed $magicDb is valid

Parameters:
mixed $magicDb A $magicDb string / array to validate (optional)
Returns:
boolean True if the $magicDb / instance db validates, false if not public

Definition at line 139 of file magic_db.php.

References toArray().

Referenced by read().


Member Data Documentation

MagicDb::$db = array()

Definition at line 42 of file magic_db.php.

Referenced by toArray().


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