https://github.com/heavenshell/php-silex-kyototycoon
Silex Net_KyotoTycoon extension
https://github.com/heavenshell/php-silex-kyototycoon
Last synced: 2 months ago
JSON representation
Silex Net_KyotoTycoon extension
- Host: GitHub
- URL: https://github.com/heavenshell/php-silex-kyototycoon
- Owner: heavenshell
- License: bsd-3-clause
- Created: 2011-05-21T13:53:19.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2011-12-31T08:04:25.000Z (over 14 years ago)
- Last Synced: 2025-03-06T02:12:10.844Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 97.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: license.txt
Awesome Lists containing this project
README
Silex \Net\KyotoTycoon extension.
This extension is for the Silex microframework enables to use Kyoto Tycoon.
register(new \KyotoTycoonExtension(), array(
'kt.class_path' => $ktpath,
'kt.options' => array('port' => 19780)
));
$app->get('/set', function () use ($app) {
$client = $app['kt.client'];
$client->set('test', 'ok');
return json_encode(true);
});
$app->get('/get', function () use ($app) {
$client = $app['kt.client'];
$result = $client->get('test');
return json_encode($result);
});
if (getenv('SILEX_TEST')) {
return $app;
}
$app->run();
Set \Net\KyotoTycoon library to your include_path
Run Kyoto Tycoon with port 19780 before you run examples or tests
$ ktserver -port 19780
- Running examples
Add SetEnv KT_PATH /Path/To/include_path to .htaccess
- Running tests
export KT_PATH=/Path/To/include_path
See more detail
- http://fallabs.com/kyototycoon/
- https://github.com/heavenshell/php-net-kyototycoon