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:
Mark Lewis 2014-11-20 17:22:53 +01:00 committed by Albert Santoni
parent 03dae5be2b
commit a27ca2f583
9 changed files with 106 additions and 212 deletions

View 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)
);
}
}