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

Class: WBprofiledUser

Source Location: /WBprofiledUser.php

Class Overview

WBobject
   |
   --WBprofiledUser

This class manages WBprofiledUser objects. User that has been given a


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 39]
This class manages WBprofiledUser objects. User that has been given a

specific profile in an application (WBuser, WBprofile, valid since, valid until, markets under supervision) Created on 29 jun 09

Changes: 1.3 -> 1.4: 14 aug 09 updated: updateWBprofiledUser() function bug on null proxy user resolved createWBprofiledUser() function bug on null proxy user resolved 1.2 -> 1.3: 17 jul 09 updated: $this->wbProfiledUserProxy is WBuser object 1.1 -> 1.2: 15 jul 09 updated: file is PEAR compatible 1.0 -> 1.1: 02 jul 09 added: $this->sIDrowname, $this->aObjects




Tags:

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


[ Top ]


Class Variables

$aObjects = array(
        "wbProfiledUserUser"    =>  "WBuser",
        "wbProfiledUserProfile" =>  "WBprofile",
        "wbProfiledUserProxy"   =>  "WBuser"
    )

[line 112]

Variable that contains objects list



Tags:

access:  protected

Type:   array


[ Top ]

$database =  "prysma"

[line 45]

Variable that contains database name



Tags:

access:  public

Type:   string


[ Top ]

$sIDrowname =  "wbProfiledUserID"

[line 107]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$table =  "WBprofiledUser"

[line 50]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]

$wbProfiledUserID =

[line 56]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$wbProfiledUserMain =

[line 91]

Variable that contains flag defining if this is the main profile of the user



Tags:

access:  public

Type:   int


[ Top ]

$wbProfiledUserProfile =

[line 71]

Variable that contains profile given to the user



Tags:

access:  public

Type:   object


[ Top ]

$wbProfiledUserProfileID =

[line 76]

Variable that contains profile ID given to the user



Tags:

access:  public

Type:   int


[ Top ]

$wbProfiledUserProxy =

[line 96]

Variable that contains user that can inherit from these rights



Tags:

access:  public

Type:   object


[ Top ]

$wbProfiledUserProxyID =

[line 101]

Variable that contains user ID that can inherit from these rights



Tags:

access:  public

Type:   object


[ Top ]

$wbProfiledUserSinceTS =

[line 81]

Variable that contains first day of application (timestamp)



Tags:

access:  public

Type:   int


[ Top ]

$wbProfiledUserUntilTS =

[line 86]

Variable that contains last day of application (timestamp)



Tags:

access:  public

Type:   int


[ Top ]

$wbProfiledUserUser =

[line 61]

Variable that contains user with the profile



Tags:

access:  public

Type:   object


[ Top ]

$wbProfiledUserUserID =

[line 66]

Variable that contains user ID with the profile



Tags:

access:  public

Type:   int


[ Top ]



Class Methods


method createWBprofiledUser [line 167]

object created createWBprofiledUser( object $this->wbProfiledUserUser, object $this->wbProfiledUserProfile, int $this->wbProfiledUserSinceTS, int $this->wbProfiledUserUntilTS, object $this->wbProfiledUserMain, object $this->wbProfiledUserProxy)

WBprofiledUser object creation function

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

  1.  <?php
  2.  $aVars           array(
  3.       "wbProfiledUserUser"    =>  $oWBuser,
  4.       "wbProfiledUserProfile" =>  $oWBprofile,
  5.       "wbProfiledUserSinceTS" =>  1234567800,
  6.       "wbProfiledUserUntil"   =>  1234567890,
  7.       "wbProfiledUserMain"    =>  1,
  8.       "wbProfiledUserProxy"   =>  $oWBuser
  9.  );
  10.  $oWBprofiledUser new WBprofiledUser($aVars);
  11.  echo $oWBprofiledUser->createWBprofiledUser()->wbProfiledUserID;
  12.  // profileduserID
  13.  ?>




Tags:

return:  object or false
since:  Version 1.0
uses:  WBobject::addToDB()


Parameters:

object   $this->wbProfiledUserUser   user with the profile (required)
object   $this->wbProfiledUserProfile   profile given to the user (required)
int   $this->wbProfiledUserSinceTS   first day of application (timestamp) (required)
int   $this->wbProfiledUserUntilTS   last day of application (timestamp) (required)
object   $this->wbProfiledUserMain   flag defining if profile is main profile
object   $this->wbProfiledUserProxy   user that can inherit from these rights (required)

[ Top ]

method deleteWBprofiledUser [line 419]

bool deleteWBprofiledUser( int $this->wbProfiledUserID)

WBprofiledUser object deletion function

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

  1.  <?php
  2.  $aVars                array("wbProfiledUserID" => 12);
  3.  $oWBprofiledUser      new WBprofiledUser($aVars);
  4.  echo $oWBprofiledUser->deleteWBprofiledUser();
  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->wbProfiledUserID   ID of the profiled user to be deleted (required)

[ Top ]

method getWBprofiledUser [line 463]

object WBprofiledUser getWBprofiledUser( int $this->wbProfiledUserID)

WBprofiledUser object obtention function

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

  1.  <?php
  2.  $aVars           array("wbProfiledUserID" => 12);
  3.  $oWBprofiledUser new WBprofiledUser($aVars);
  4.  echo $oWBprofiledUser->getWBprofiledUser()->wbProfiledUserUser->wbUserName;
  5.  // fooName
  6.  ?>




Tags:

return:  object
since:  Version 1.0
uses:  WBuser::getWBuser()
uses:  WBobject::getUniqueFromDB()
uses:  WBprofile::getWBprofile()


Parameters:

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

[ Top ]

method updateWBprofiledUser [line 296]

object updated updateWBprofiledUser( int $this->wbProfiledUserID, object $this->wbProfiledUserUser, object $this->wbProfiledUserProfile, int $this->wbProfiledUserSinceTS, int $this->wbProfiledUserUntilTS, object $this->wbProfiledUserMain, object $this->wbProfiledUserProxy)

WBprofiledUser object update function

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

  1.  <?php
  2.  $aVars           array(
  3.       "wbProfiledUserID"  =>  12,
  4.       "wbProfiledUserUser"    =>  $oWBuser,
  5.       "wbProfiledUserProfile" =>  $oWBprofile,
  6.       "wbProfiledUserSinceTS" =>  1234567809,
  7.       "wbProfiledUserUntilTS" =>  1234567890,
  8.       "wbProfiledUserMain"    =>  1,
  9.       "wbProfiledUserProxy"   =>  wbProfiledUserProxy
  10.  );
  11.  $oWBprofiledUser new WBprofiledUser($aVars);
  12.  echo $oWBprofiledUser->updateWBprofiledUser()->wbProfiledUserID;
  13.  // 12
  14.  ?>




Tags:

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


Parameters:

int   $this->wbProfiledUserID   ID of the profiled user to be updated (required)
object   $this->wbProfiledUserUser   user with the profile (required)
object   $this->wbProfiledUserProfile   profile given to the user (required)
int   $this->wbProfiledUserSinceTS   first day of application (timestamp) (required)
int   $this->wbProfiledUserUntilTS   last day of application (timestamp) (required)
object   $this->wbProfiledUserMain   flag defining if profile is main profile
object   $this->wbProfiledUserProxy   user that can inherit from these rights (required)

[ Top ]


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