Stunden ende, einiges fertig, fehlt nicht mehr viel
Took 2 hours 31 minutes
This commit is contained in:
27
classes/Api.class.inc.php
Normal file
27
classes/Api.class.inc.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
|
||||
class Api
|
||||
{
|
||||
public static $request;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getRequest()
|
||||
{
|
||||
self::$request = json_decode( file_get_contents('php://input') );
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function getVar( $a_index )
|
||||
{
|
||||
if( !isset( self::$request[$a_index] ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return self::$request[$a_index];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user