コード例 #1
0
ファイル: Bootstrap.php プロジェクト: rogeriopradoj/temostudo
 private function _sanitizeData()
 {
     Fgsl_Session_Namespace::init('session');
     $filterInput = new Zend_Filter_Input(null, null, $_POST);
     $filterInput->setDefaultEscapeFilter('StripTags');
     Fgsl_Session_Namespace::set('post', $filterInput);
 }
コード例 #2
0
 /**
  * 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);
 }
コード例 #3
0
ファイル: Abstract.php プロジェクト: rogeriopradoj/temostudo
 /**
  * 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;
 }
コード例 #4
0
ファイル: Namespace.php プロジェクト: rogeriopradoj/temostudo
 /**
  * Create a namespace in session called session by default
  * but that can be configured
  * @return unknown_type
  */
 public static function init($namespace = null)
 {
     self::$_configuredNamespace = is_null($namespace) ? self::DEFAULT_NAMESPACE : $namespace;
     Zend_Registry::set(self::$_configuredNamespace, new Zend_Session_Namespace(self::$_configuredNamespace));
 }