Overview

Namespaces

  • Sleepy
  • Module
    • Authentication
    • CSV
    • DB
    • FormBuilder
    • FSDB
    • IP2Country
    • Mailer
    • MobiDetect
    • Navigation
    • StaticCache
  • PHP

Classes

  • Connection
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Class Connection

Implements a flat-file database that can be used when a real DB is overkill.

A database that uses flat files for basic database functionality like select, insert, update, and delete.

Usage

$fruit = new stdClass();
  $fruit->name = "Apple";
  $fruit->color = "Red";
  $fruit->texture = "Crispy";
  $fruit->price = 0.50;

  $db = new \Module\FSDB\Connection();
  $db->insert('fruit', $fruit);
  $data = $db->select('fruit', 'name', 'Banana');

Changelog

Version 1.0

  • Added namespacing

Version 0.8

  • Added the date and changelog sections to documentation
Namespace: Module\FSDB
License: http://opensource.org/licenses/MIT
Author: Jaime A. Rodriguez hi.i.am.jaime@gmail.com
Version: 0.8
Todo: select with =, >, <, !=, >=, <=
Date: August 13, 2014
Located at class.fsdb.php
Methods summary
public
# __construct( string $directory = '' )

__construct

__construct

Parameters

$directory
Directory where data is stored (optional)
public mixed
# __call( string $method, array $args )

__call

__call

Handles method calls, if the method exists in \Module\FSDB\Table, use that one.

Parameters

$method
Method called
$args
Arguments passed

Returns

mixed
Value.
Properties summary
private $directory

string The directory where the data is stored

string The directory where the data is stored

Private

#
private array $tables

array Tables currently loaded in memory

array Tables currently loaded in memory

Private

# array()
sleepyMUSTACHE v.0.8 API documentation generated by ApiGen