Source for file Accountable.php

Documentation is available at Accountable.php

  1. <?php
  2. /** 
  3.  * @author Dirk Merkel <dirk@waferthin.com>
  4.  * @package WebServices
  5.  * @subpackage Authentication
  6.  * @copyright Waferthin Web Works LLC
  7.  * @license http://www.gnu.org/copyleft/gpl.html Freely available under GPL
  8.  */
  9. /** 
  10.  * <i>Accountable</i> interface for authentication
  11.  * 
  12.  * Any class that handles user authentication <b>must</b>
  13.  * implement this interface. It makes it almost
  14.  * trivial to check whether a user is currently
  15.  * logged in or not.
  16.  *
  17.  * @package WebServices
  18.  * @subpackage Authentication
  19.  * @author Dirk Merkel <dirk@waferthin.com>
  20.  * @version 0.2
  21.  * @since r12
  22.  */
  23. interface Accountable
  24. {
  25.     const AUTHENTICATION_ERR_MSG 'There is no user account associated with the current session. Try logging in fist.';
  26.  
  27.     /**
  28.      * Did the current user log in?
  29.      * 
  30.      * This method simply answers the question
  31.      * "Did the current user log in?"
  32.      * 
  33.      * @access public
  34.      * @return bool 
  35.      */
  36.     public function isLoggedIn();
  37.  
  38.     /**
  39.      * Returns user account info
  40.      * 
  41.      * This method is used to retrieve the account corresponding
  42.      * to a given login. <b>Note:</b> it is not required that
  43.      * the user be currently logged in.
  44.      * 
  45.      * @access public
  46.      * @param string $user user name of the account
  47.      * @return Account 
  48.      */
  49.     public function getAccount($user '');
  50. }
  51.  
  52. ?>

Documentation generated on Mon, 26 Jul 2010 22:07:03 +0100 by phpDocumentor 1.4.3