public function __construct($from, $prefix = null)
 {
     parent::__construct();
     $this->data = $from;
     $this->prefix = $prefix;
     $this->hydrateValues();
 }
Exemplo 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();
 }
Exemplo 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();
 }
Exemplo 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 '';
     }
 }
Exemplo 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;
 }