PHP Classes
elePHPant
Icontem

V3ctor WareHouse: Store and retrieve objects in MongoDB and MySQL

Recommend this page to a friend!
  Info   View files Example   Demos   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-04-04 (4 hours ago) RSS 2.0 feedNot enough user ratingsTotal: 77 This week: 1All time: 9,316 This week: 432Up
Version License PHP version Categories
v3wh 1.0Custom (specified...5PHP 5, Databases
Description Author

This package can store and retrieve objects in MongoDB, MySQL and Microsoft SQL Server.

There is a factory class that will create instances of the warehouse classes.

The warehouse classes can create, retrieve, update and delete objects given their keys and values in PHP variables.

Name: Yorch Ponce <contact>
Classes: 6 packages by
Country: Mexico Mexico
Innovation award
Innovation award
Nominee: 1x

Details

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 !!!

  V3ctorWHExternal page  
  Files folder image Files  
File Role Description
Files folder imagev3mysql (3 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file demo.sql Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License
Accessible without login Plain text file README.md Doc. Documentation
Plain text file V3WareHouse.class.php Class Class source
Accessible without login Plain text file V3WareHouseMyTest.php Test Class source
Accessible without login Plain text file V3WareHouseTest.php Test Class source
Plain text file WareHouse.class.php Class Class source

  Files folder image Files  /  v3mysql  
File Role Description
  Accessible without login Plain text file create.php Example Example script
  Plain text file DB.php Class Class source
  Accessible without login Plain text file index.php Aux. Auxiliary script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:77
This week:1
All time:9,316
This week:432Up