cleanup new HTTP apiendpoints, added HTTPHelper and getStartEndFromRequest and updated all controllers that called their own versions of this function
This commit is contained in:
parent
03dae5be2b
commit
a27ca2f583
9 changed files with 106 additions and 212 deletions
20
airtime_mvc/application/common/HTTPHelper.php
Normal file
20
airtime_mvc/application/common/HTTPHelper.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
class Application_Common_HTTPHelper
|
||||
{
|
||||
/**
|
||||
* Returns start and end DateTime vars from given
|
||||
* HTTP Request object
|
||||
*
|
||||
* @param Request
|
||||
* @return array(start DateTime, end DateTime)
|
||||
*/
|
||||
public static function getStartEndFromRequest($request)
|
||||
{
|
||||
return Application_Common_DateHelper::getStartEnd(
|
||||
$request->getParam("start", null),
|
||||
$request->getParam("end", null),
|
||||
$request->getParam("timezone", null)
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue