Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2018-12-29 (4 hours ago) | | Not enough user ratings | | Total: 119 | | All time: 8,927 This week: 338 |
|
Description | | Author |
This package creates an API for storing data using Slim framework.
It register all the end points for a API that can perform several types of operations for storing and retrieving data in either MySQL or MongoDB using the V3Warehouse package.
It can add custom routes to be implemented with given callback functions. | |
|
|
Innovation award
Nominee: 1x |
|
Details
V3ctor WareHouse Web Application
Description
V3ctorWH is a Web Application REST API for V3 WareHouse Core.
Requirements
Installation
Clone Repository
Execute php composer.phar install
Create config.php
$hostname = 'DB_HOST';
$username = 'DB_USER';
$password = 'DB_PASSWORD';
$dbname = 'DBNAME';
$port = 27017;
$key = "KEY";
Examples
<?php
require 'config.php';
require 'vendor/autoload.php';
// Init Database Connection
//V3WareHouse::getInstance("v3Mongo", $hostname, $username, $password, $dbname, $port);
// For PHP 7
V3WareHouse::getInstance("v3MongoDB", $hostname, $username, $password, $dbname, $port);
// Init Application
$app = new V3Application($dbname, $key);
// Add Custom Route
$app->addRoute('/openshift', function () {
$app = \Slim\Slim::getInstance();
$app->response()->header('Content-Type', 'application/json');
$app->response()->status(200);
$msg = array("msg" => "Hello localhost !!!");
$envvar = getenv('OPENSHIFT_MONGODB_DB_HOST');
if (! empty($envvar))
$msg = array("msg" => "Hello Openshift !!!");
echo json_encode($msg);
});
// Start V3ctor Application
$app->start();
?>
References
https://en.wikipedia.org/wiki/Representational_state_transfer
P.D. Let's go play !!!
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.