WorkBench
[ class tree: WorkBench ] [ index: WorkBench ] [ all elements ]

Class: WBuser

Source Location: /WBuser.php

Class Overview

WBobject
   |
   --WBuser

This class manages WBuser objects. Authorized user within the application.


Author(s):

Version:

  • 1.4

Variables

Methods


Inherited Methods

Class: WBobject

WBobject::__construct()
Construction function
WBobject::addToDB()
Rows insertion to database function
WBobject::deleteFromDB()
Rows deletion function
WBobject::getIDrowname()
ID rowname obtention function
WBobject::getObjects()
Objects list obtention function
WBobject::getUniqueFromDB()
Unique Row obtention function
WBobject::objectToArray()
Object to array transformation function
WBobject::updateDB()
Rows update function

Class Details

[line 34]
This class manages WBuser objects. Authorized user within the application.

Created on 01 jul 09

Changes: 1.3 -> 1.4: 11 aug 09 updated: bug in createWBuser() and updateWBuser() functions on email validation solved 1.2 -> 1.3: 14 jul 09 updated: file is PEAR compatible 1.1 -> 1.2: 02 jul 09 added: $this->sIDrowname, $this->aObjects 1.0 -> 1.1: 24 jun 09 added: getWBuser() function




Tags:

author:  Pierre-Dominique Vienne <pvienne@me.com>
version:  1.4
license:  GNU Public License


[ Top ]


Class Variables

$aObjects = array()

[line 87]

Variable that contains objects list



Tags:

access:  protected

Type:   array


[ Top ]

$database =  "prysma"

[line 40]

Variable that contains database name



Tags:

access:  public

Type:   string


[ Top ]

$sIDrowname =  "wbUserID"

[line 82]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$table =  "WBuser"

[line 45]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]

$wbUseremail =

[line 71]

Variable that contains user email



Tags:

access:  public

Type:   string


[ Top ]

$wbUserID =

[line 51]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$wbUserLastname =

[line 66]

Variable that contains user lastname



Tags:

access:  public

Type:   string


[ Top ]

$wbUserMiddlename =

[line 61]

Variable that contains user middlename



Tags:

access:  public

Type:   string


[ Top ]

$wbUserName =

[line 56]

Variable that contains user name



Tags:

access:  public

Type:   string


[ Top ]

$wbUserPassword =

[line 76]

Variable that contains user encrypted password (md5)



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method createWBuser [line 128]

object created createWBuser( string $this->wbUserName, string $this->wbUserMiddlename, string $this->wbUserLastname, string $this->wbUseremail)

WBuser object creation function

This function is used to create a WBuser object Result is stored in $this and object is returned

  1.  <?php
  2.  $aVars   array(
  3.       "wbUserName" => "FooName",
  4.       "wbUserMiddlename" => "barMiddlename",
  5.       "wbUserLastname" => "fooLastname",
  6.       "wbUseremail" => "foo@bar.com"
  7.  );
  8.  $oWBuser new WBuser($aVars);
  9.  echo $oWBuser->createWBuser()->wbUserID;
  10.  // userID
  11.  ?>




Tags:

return:  object or false
since:  Version 1.0
uses:  WBobject::addToDB()
uses:  STRemailAddresses::validateEmail()
uses:  STRpasswords::makeRandom()


Parameters:

string   $this->wbUserName   name of the user (required)
string   $this->wbUserMiddlename   middlename of the user
string   $this->wbUserLastname   lastname of the user (required)
string   $this->wbUseremail   email of the user (required)

[ Top ]

method deleteWBuser [line 307]

bool deleteWBuser( int $this->wbUserID)

WBuser object deletion function

This function is used to delete a WBuser by its ID Result is returned

  1.  <?php
  2.  $aVars   array("wbUserID" => 12);
  3.  $oWBuser new WBuser($aVars);
  4.  echo $oWBuser->deleteWBuser();
  5.  // 1
  6.  ?>




Tags:

return:  true or false weither the object could be deleted or not
since:  Version 1.0
uses:  WBobject::deleteFromDB()


Parameters:

int   $this->wbUserID   ID of the user to be deleted (required)

[ Top ]

method getWBuser [line 348]

object WBuser getWBuser( int $this->wbUserID)

WBuser object obtention function

This function is used to get a WBuser by its ID Result is returned

  1.  <?php
  2.  $aVars   array("wbUserID" => 12);
  3.  $oWBuser new WBuser($aVars);
  4.  echo $oWBuser->getWBuser()->wbUserName;
  5.  // fooName
  6.  ?>




Tags:



Parameters:

int   $this->wbUserID   ID of the user to get (required)

[ Top ]

method updateWBuser [line 218]

object updated updateWBuser( int $this->wbUserID, string $this->wbUserName, string $this->wbUserMiddlename, string $this->wbUserLastname, string $this->wbUseremail)

WBuser object update function

This function is used to update a WBuser Result is stored in $this and object is returned

  1.  <?php
  2.  $aVars   array(
  3.       "wbUserID" => 12,
  4.       "wbUserName" => "fooName",
  5.       "wbUserMiddlename" => "barMiddlename",
  6.       "wbUserLastname" => "fooLastname",
  7.       "wbUseremail"=>"foo@bar.com"
  8.  );
  9.  $oWBuser new WBuser($aVars);
  10.  echo $oWBuser->updateWBuser()->wbUserID;
  11.  // 12
  12.  ?>




Tags:

return:  object or false
since:  Version 1.0
uses:  WBobject::updateDB()
uses:  STRemailAddresses::validateEmail()


Parameters:

int   $this->wbUserID   ID of the user to be updated (required)
string   $this->wbUserName   Name of the user (required)
string   $this->wbUserMiddlename   Middlename of the user
string   $this->wbUserLastname   Lastname of the user (required)
string   $this->wbUseremail   email of the user (required)

[ Top ]


Documentation generated on Wed, 26 Aug 2009 12:31:15 +0200 by phpDocumentor 1.4.1