Exemplo n.º 1
0
 /**
  *
  */
 public function __construct($loginId)
 {
     $this->hooks = \Lib\Hooks::instance();
     $this->data = array();
     $this->scopes = array();
     $this->registerScopes($loginId);
 }
Exemplo n.º 2
0
 /**
  *
  */
 public function password()
 {
     $password = Hooks::instance()->ask('app_data/password', false);
     if ($password === false) {
         throw new \Exception('BusinessDsl: Data access password missing in DSL declaration.');
     }
     return $password;
 }
Exemplo n.º 3
0
 /**
  *
  */
 private function setupDbParams()
 {
     $hooks = \Lib\Hooks::instance();
     $hooks->addAnswer('app_data/dbName', "a3gfw4AppTemplate");
     $hooks->addAnswer('app_data/host', "localhost");
     $hooks->addAnswer('app_data/userName', defined('DEBUG') ? "root" : 'username');
     $hooks->addAnswer('app_data/password', defined('DEBUG') ? "" : "password");
 }
Exemplo n.º 4
0
 /**
  *
  */
 protected function loadAppParams($domain = 'Core')
 {
     $appParams = DF::model("AppParams.AppParams")->load($domain);
     $hooks = \Lib\Hooks::instance();
     $params = $appParams->get('*');
     foreach ($params as $param => $value) {
         $hooks->addAnswer($param, $value);
     }
     return $appParams;
 }
Exemplo n.º 5
0
 /**
  *
  */
 public function authenticate(\Lib\Base\ControllerBase $controller)
 {
     if (method_exists($controller, 'authenticatePublic') && $controller->authenticatePublic()) {
         return true;
     }
     $authentication = $this->isAuthenticated();
     if (!$authentication) {
         return false;
     }
     $this->authenticationCookieSet($authentication['token'], $authentication['timeout']);
     \Lib\Hooks::instance()->addAnswer('authenticated/loginId', $authentication['loginId']);
     return true;
 }
Exemplo n.º 6
0
 /**
  *
  */
 public function waitBetweenAttempts()
 {
     return (int) \Lib\Hooks::instance()->ask('Security.WaitSecsBetweenLoginAttempts', 1);
 }
Exemplo n.º 7
0
<?php

\Lib\Hooks::instance()->doEvent('register_translations', array('app params' => 'Settings'));
// EOF
Exemplo n.º 8
0
 /**
  * Build the Theme object based on the present environment. 
  * Applications may have two sides: a front-end application and a back-end or admin area application, both
  * handled by the same files. 
  */
 protected function theme()
 {
     $themeName = ADMIN ? self::ADMIN_TEMPLATE_DIR : \Lib\Hooks::instance()->ask('View.ActiveTheme', 'default');
     $theme = new \Lib\View\Theme($this->app->request(), $themeName);
     return $theme;
 }
Exemplo n.º 9
0
<?php

\Lib\Hooks::instance()->doEvent('register_translations', array('login' => 'Login', 'login failed' => "Mmmh, I can't find those credentials... Please, wait %d seconds and try again.", 'placeholder password' => "Password", 'placeholder username' => "Username", 'remember me' => 'Remember me', 'sign in' => 'Sign in', 'required email' => "Please, enter an e-mail address", 'reset password' => "Reset password", 'forgot password' => "Forgot password", 'invalid email' => "The e-mail address is invalid", 'required password' => "Please, enter the password"));
// EOF
Exemplo n.º 10
0
<?php

\Lib\Hooks::instance()->doEvent('register_translations', array('home' => 'Dashboard'));
// EOF