27 lines
454 B
PHP
27 lines
454 B
PHP
<?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];
|
|
}
|
|
} |