PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Yorch Ponce   V3ctor WareHouse   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: V3ctor WareHouse
Store and retrieve objects in MongoDB and MySQL
Author: By
Last change: Medoo library version 1.1.2
Date: 5 years ago
Size: 1,322 bytes
 

Contents

Class file image Download

V3 WareHouse Core

Description

V3ctor WareHouse Core for MongoDb and MySQL.

Requirements

Developer Documentation

Execute phpdoc -d v3wh/

Unit Test

For run Unit Test, complete information connection and execute the next commands: > phpunit V3WareHouseTest.php

Installation

Create file composer.json


{
    "require": {
    	"php": ">=5.4.0",
        "yorch/v3wh" : "dev-master",
        "monolog/monolog": "1.13.1",
        "catfan/medoo": "v1.1.2"
    }
}

Execute composer.phar install

Example


//$v3ctor = V3WareHouse::getInstance('v3Mongo', $hostname, $username, $password, $dbname, $port);

// For PHP 7
$v3ctor = V3WareHouse::getInstance('v3MongoDB', $hostname, $username, $password, $dbname, $port);

if (! $v3ctor->isConnected())
    die("Unable load V3ctor WareHouse");

$doc = array('r' => 666);

$newObject = $v3ctor->newObject("demo", $doc);

var_dump($newObject);

Notes

v3wh is a Core for MongoDb and needs php mongo module. For MySQL and SQL Server support is required _id field in the table, check demo.sql.

References

http://es.wikipedia.org/wiki/Singleton

P.D. Let's go play !!!