/** * This constructor expects a key whose name is the value of constant ROUTE_RULER, that * must be a class that implements Fgsl_Route_Ruler_Interface. */ public function __construct() { $routeRuler = ROUTE_RULER; if (empty($routeRuler)) { throw new Fgsl_Exception('Constant ROUTE_RULER is not defined'); return; } $this->_routeRuler = Fgsl_Session_Namespace::get(ROUTE_RULER); }
/** * Gets data sent by method HTTP POST * @return unknown_type */ protected function _getDataFromPost() { // gets filtered POST $post = Fgsl_Session_Namespace::get('post'); $data = array(); if (count($_POST) === 0) { foreach ($this->_fieldNames as $fieldName) { $data[$fieldName] = ''; } } else { foreach ($_POST as $fieldName => $value) { $data[$fieldName] = $post->{$fieldName}; } } Fgsl_Session_Namespace::set('post', null); return $data; }