public function __construct($from, $prefix = null)
 {
     parent::__construct();
     $this->data = $from;
     $this->prefix = $prefix;
     $this->hydrateValues();
 }
Ejemplo n.º 2
0
 public function __construct($configs = null)
 {
     $this->hydrator = new Input();
     $this->loader = new Loader();
     $this->session = Session::getInstance();
     $this->loadConfigs($configs);
     $this->loadMessages();
 }
Ejemplo n.º 3
0
 public function __construct($attributes, $formName, $keepValues = false)
 {
     $this->formName = $formName;
     $this->keepValues = $keepValues;
     $this->sessionHandler = Session::getInstance();
     $this->attributes = $attributes;
     $this->setValue();
     $this->setError();
     $this->setLabelAttributes();
     $this->cleanUpAttributes();
 }
Ejemplo n.º 4
0
 public function getFlash($container = '')
 {
     $s = \Melyssa\Session::getInstance();
     if ($s->checkSession('flash_system')) {
         $flash = $s->getSession('flash_system');
         $s->destroySession('flash_system');
         if ($container === '') {
             return $flash;
         } else {
             return sprintf($container, $flash);
         }
     } else {
         return '';
     }
 }
Ejemplo n.º 5
0
 public static function changeUserInfo($level, $field, $value)
 {
     $session =& Session::getInstance();
     $data = SESSION_HASH . base64_encode($value);
     $encryptedData = base64_encode($data);
     $session->makeSession($level . '_data:' . $field, base64_encode($encryptedData));
     return true;
 }