update api

This commit is contained in:
stubbfel
2013-05-20 14:46:49 +02:00
parent 187fa346b9
commit 12bc82710b
28 changed files with 56 additions and 13 deletions

10
geoapi/api/api.php Normal file
View File

@@ -0,0 +1,10 @@
<?php
include_once "../../global.inc.php";
require_once PATH_3PARTY."/Slim/Slim.php";
\Slim\Slim::registerAutoloader();
class api extends \Slim\Slim {
//put your code here
}
?>

View File

@@ -0,0 +1,7 @@
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
?>

7
geoapi/config/config.php Normal file
View File

@@ -0,0 +1,7 @@
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
?>

View File

@@ -0,0 +1,7 @@
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
?>

7
geoapi/global.inc.php Normal file
View File

@@ -0,0 +1,7 @@
<?php
define("PATH_ROOT", dirname(__FILE__));
define("PATH_SERVICES", PATH_ROOT. "/service");
define("PATH_3PARTY", PATH_ROOT . "/thirdparty");
define("PATH_API", PATH_ROOT . "/api");
define("PATH_DATABASE", PATH_ROOT. "/datebase");
?>

View File

@@ -1,14 +1,4 @@
<?php
require 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$app = new \Slim\Slim();
$app->get('/hello/:name', function ($name) {
echo "Hello, $name";
});
$app->run();
echo "Welcome to GeoApi";
?>

View File

@@ -1,4 +1,6 @@
include.path=${php.global.include.path}
ignore.path=
include.path=\
${php.global.include.path}
php.version=PHP_54
source.encoding=UTF-8
src.dir=.

View File

@@ -3,7 +3,7 @@
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>PhpProject1</name>
<name>GeoApi</name>
</data>
</configuration>
</project>

View File

@@ -0,0 +1,13 @@
<?php
include_once "../../global.inc.php";
require_once PATH_API."/api.php";
$app = new api();
$app->get('/hello/:name', function ($name) {
echo "Hello, $name";
});
$app->run();
?>