[geeklog-cvs] Auth_Enterprise/Client AEUser.class.php,1.2,1.3

tony at geeklog.net tony at geeklog.net
Tue Oct 28 22:42:26 EST 2003


Update of /usr/cvs/geeklog/Auth_Enterprise/Client
In directory geeklog_prod:/tmp/cvs-serv8066

Modified Files:
	AEUser.class.php 
Log Message:
Added getter/setter for user ID, added phpdoc comments and other misc. things

Index: AEUser.class.php
===================================================================
RCS file: /usr/cvs/geeklog/Auth_Enterprise/Client/AEUser.class.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AEUser.class.php	29 Oct 2003 00:52:40 -0000	1.2
--- AEUser.class.php	29 Oct 2003 03:42:23 -0000	1.3
***************
*** 19,23 ****
  * The Auth_Enterprise Service Interface
  */
! require_once 'Auth_Enterprise/Common/AEServiceInterface.class.php';
  /**
  * Auth_Enteprise User object
--- 19,28 ----
  * The Auth_Enterprise Service Interface
  */
! require_once 'Auth_Enterprise/Common/AEServiceInterface.class.php';
! 
! /**
! * The Auth_Enterprise Group object
! */
! require_once 'Auth_Enterprise/Common/AEGroup.class.php';
  /**
  * Auth_Enteprise User object
***************
*** 29,34 ****
  * @author Tony Bibbs <tony at geeklog.net>
  * @package net.geeklog.auth_enterprise.common
! * @todo For PHP5 this will become a real interface so do
! * not implement anything here.
  */
  class AEUser extends AEServiceInterface {
--- 34,39 ----
  * @author Tony Bibbs <tony at geeklog.net>
  * @package net.geeklog.auth_enterprise.common
! * @todo For PHP5 this will become a real interface
! *
  */
  class AEUser extends AEServiceInterface {
***************
*** 91,99 ****
      * User ID
      * @access private
!     * @var string
      */
      var $_userId = null;
  
      /**
      * User's password
      * @access private
--- 96,110 ----
      * User ID
      * @access private
!     * @var int
      */
      var $_userId = null;
  
      /**
+     * Username
+     * @access private
+     * @var string
+     */
+     var $_userName = null;
+     /**
      * User's password
      * @access private
***************
*** 231,234 ****
--- 242,329 ----
          }
          return false;
+     }
+     
+     /**
+     * This sets the user ID
+     *
+     * Odds are that even though we return this ID
+     * it will be useless to calling applications
+     *
+     * @author Tony Bibbs <tony at geeklog.net>
+     * @access public
+     * @param int $userId User's ID
+     *
+     */
+     function setUserId($userId)
+     {
+         $this->_userId = $userId;
+     }
+     
+     /**
+     * Returns the user ID
+     *
+     * Again, this ID is useless, most calling applications will
+     * probably want the username
+     *
+     * @author Tony Bibbs <tony at geeklog.net>
+     * @access public
+     * @return int User's ID
+     *
+     */
+     function getUserId()
+     {
+         return $this->_userId;
+     }
+     
+     /**
+     * Sets the username
+     *
+     * @author Tony Bibbs <tony at geeklog.net>
+     * @access public
+     * @param string $userName The user's username
+     *
+     */
+     function setUserName($userName)
+     {
+         $this->_userName = $userName;
+     }
+     
+     /**
+     * Returns the username
+     *
+     * @author Tony Bibbs <tony at geeklog.net>
+     * @access public
+     * @return string User's username
+     *
+     */
+     function getUserName()
+     {
+         return $this->_userName;
+     }
+     
+     /**
+     * Sets the groups the user belongs to
+     *
+     * @author Tony Bibbs <tony at geeklog.net>
+     * @access public
+     * @param array $groupArray Array of group objects
+     *
+     */
+     function setGroups($groupArray)
+     {
+         $this->_groups = $groupArray;
+     }
+     
+     /**
+     * Gets the groups the user belongs to
+     *
+     * @author Tony Bibbs <tony at geeklog.net>
+     * @access public
+     * @return array Array of group objects
+     *
+     */
+     function getGroups()
+     {
+         return $this->_groups;
      }
  }





More information about the geeklog-cvs mailing list