/** * Constructor * * @param object $DI Instance of an IDependencyInjectionContainer */ public function __construct(IDependencyInjectionContainer $DI) { $this->_sessionManager = $DI->getSessionManager(); // Clean session $config = $DI->getConfigurator(); $this->cleanFormTokens($config->get('formToken.TTL', 30) * 60); // Initialize field types list $this->_fieldTypes = array('text' => 'text', 'email' => 'text', 'password' => 'password', 'hidden' => 'hidden', 'honeypot' => 'hidden', 'submit' => 'submit', 'select' => 'select'); }
/** * Constructor, initialize the member vars. Then call the action found in the query string. * * @param object An instance of an IDependencyInjectionContainer object. * * @access public */ public function __construct(IDependencyInjectionContainer $DI) { $this->_DI = $DI; // Load user $this->_user = new User($DI); // Register configuration $this->_config = $DI->getConfigurator(); // Get language configuration $this->_lang = $DI->getLanguage(get_called_class()); // Get message manager $this->_messenger = $DI->getMessenger(); // Get form helper $this->_form = new Form($DI); }