Exemple #1
0
 /**
  * Registers a function to be called on auth denied access
  *
  * This function will be called when a user, who is already logged in
  * somehow, encounters a role beyond their access level.
  * It might be used to offer the user to upgrade their level or present
  * them with a denied screem.
  *
  * @param mixed $handler function or an array of class=>method
  *
  * @return null
  */
 public static function registerDeniedHandler($handler)
 {
     if (is_callable($handler)) {
         self::$_deniedHandler = $handler;
     } else {
         Nexista_Error::init('Auth Denied Handler Error', NX_ERROR_FATAL);
     }
 }