Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 129 | All time: 9,370 This week: 455 |
Version | License | PHP version | Categories | |||
v3application 1.0.1 | Custom (specified... | 5 | PHP 5, Databases, Web services |
Description | Author | |||||||||||||||||||||||
This package creates an API for storing data using Slim framework. |
|
V3ctorWH is a Web Application REST API for V3 WareHouse Core.
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";
<?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();
?>
https://en.wikipedia.org/wiki/Representational_state_transfer
P.D. Let's go play !!!
Files (4) |
File | Role | Description |
---|---|---|
composer.json | Data | Auxiliary data |
LICENSE | Lic. | License |
README.md | Doc. | Documentation |
V3Application.class.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.