Added Other AP
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
class ReportApi
|
||||
{
|
||||
public $apiName = 'report';
|
||||
const REPORTS = array(
|
||||
"weeklySpending" => 1
|
||||
);
|
||||
|
||||
public function test($code) {
|
||||
$chck = self::REPORTS;
|
||||
error_log('-----');
|
||||
error_log($code=="weeklySpending"?"TRUE":"FALSE");
|
||||
error_log(array_key_exists(trim($code),$chck)?"TRUE":"FALSE");
|
||||
error_log($chck["weeklySpending"]==1?"TRUE":"FALSE");
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(ReportApi::test("weeklySpending"));
|
||||
|
||||
Reference in New Issue
Block a user