Exemplo n.º 1
0
 /**
  * Registers a function to be called on auth login
  *
  * This function will be called when the user needs a specific role
  * for an action and has not yet logged in.
  * It could be used to show a login screen or somehow inform user
  * that the action needs a special role.
  *
  * @param mixed $handler function or an array of class=>method
  *
  * @return null
  */
 public static function registerLoginHandler($handler)
 {
     if (is_callable($handler)) {
         self::$_loginHandler = $handler;
     } else {
         Nexista_Error::init('Auth Login Handler Error', NX_ERROR_FATAL);
     }
 }