Your browser must have JavaScript enabled in order to view this page.
 >  >
 
Welcome Guest#1801 Login/register    Go to Bottom
Go to Top

Class: DpUser

SOURCE LOCATION:  /dpuniverse/std/DpUser.php

Class Overview

A user object, the object representing a real user

Currently the only differerence with a NPC (which shares the same DpLiving class) is the passing of the user's last HTTP request's server, request and cookie variables, and the tell method (NPCs don't have a browser). See the DpLiving class for most functionality.

Creates the following DutchPIPE properties:

  • boolean isUser - Set to TRUE
  • boolean isRegistered - TRUE if this is a registered user, FALSE otherwise
  • boolean isAdmin - TRUE if this user is an administrator, FALSE otherwise
  • boolean noCookies - TRUE if the user's browser didn't accept our cookie
  • boolean isKnownBot - TRUE if this is a known search engine bot, FALSE otherwise
  • boolean isAjaxCapable - TRUE if the user's browser is AJAX-capable, FALSE otherwise
  • string age - Descriptive age of the user
  • string inactive - Descriptive inactive time of the user, empty string for active
  • boolean isInactive - TRUE if the user in inactive, FALSE otherwise
  • integer avatarNr - Avatar image number, 0 for custom avatar
  • string avatarCustom - File name of custom avatar, if any
  • status browseAvatarCustom - TRUE if the user is browsing on his computer for an image to upload (which causes scripts to halt), unset otherwise
  • mixed status - FALSE for no special status, otherwise a descriptive string, 'away'
  • string inputMode - Input field mode, "say" or "cmd"
  • string inputEnabled - Is input field visibile? Either "on" or "off"
  • string inputPersistent - Input field options

DpProperties
   |
   --DpObject
      |
      --DpLiving
         |
         --DpUser
LOCATED IN:  /dpuniverse/std/DpUser.php [line 76]
AUTHOR(S):   Lennert Stock <ls@dutchpipe.org>
LINK:  http://dutchpipe.org/manual/package/DutchPIPE
VERSION:  Release: 0.2.1
LICENSE:  DutchPIPE License
COPYRIGHT:  2006, 2007 Lennert Stock
PROPERTIES:
METHODS:

Inherits

Inherited Methods

INHERITED FROM:  DpLiving
boolean   DpLiving::actionCheer()   Makes this living object cheer wildly
boolean   DpLiving::actionDance()   Makes this living object take another living object for a dance
boolean   DpLiving::actionDrop()   Drops an object in the user's environment
boolean   DpLiving::actionEmote()   Makes this living object communicate a custom message to its environment
boolean   DpLiving::actionExamine()   Makes this living object examine an object
boolean   DpLiving::actionGive()   Makes this living object give an object to another living object
boolean   DpLiving::actionGrin()   Makes this living object grin evilly
boolean   DpLiving::actionHighFive()   Makes this living object slap a high-five with another living object
boolean   DpLiving::actionHug()   Makes this living object hug another living object
boolean   DpLiving::actionInventory()   Shows this living object a list of objects it is carrying
boolean   DpLiving::actionKiss()   Makes this living object give another living object a passionate kiss
boolean   DpLiving::actionLaugh()   Makes this living object fall down on the floor laughing
boolean   DpLiving::actionNod()   Makes this living object nod solemnly
boolean   DpLiving::actionPat()   Makes this living object pat another living object on the head
boolean   DpLiving::actionSay()   Makes this living object say something
boolean   DpLiving::actionShout()   Makes this living object shout something to everyone on the site
boolean   DpLiving::actionShrug()   Makes this living object shrug
boolean   DpLiving::actionSmile()   Makes this living object smile happily
boolean   DpLiving::actionTake()   Makes this living object take an object
boolean   DpLiving::actionTell()   Makes this living object tell something to another user object
void   DpLiving::createDpLiving()   Sets this living object up at the time it is created
void   DpLiving::eventDpLiving()   Reports an event
void   DpLiving::eventDpObject()   Reports an event
string   DpLiving::getActionOperantMenu()   Completes the give action performed by clicking on an object
void   DpLiving::getEmotionsMenu()  
void   DpLiving::getMenuGiveAuth()  
void   DpLiving::getMenuGiveLabel()  
void   DpLiving::getMenuTellAuth()  
string   DpLiving::getSessionAge()   Gets the livings's age since it was created as an object in a string
void   DpLiving::getTellOperant()  
void   DpLiving::getVolumeCarry()  
void   DpLiving::getWeightCarry()  
boolean   DpLiving::performAction()   Tries to perform the action given by the living object
void   DpLiving::resetDpLiving()   Resets this living object
void   DpLiving::timeoutHeartBeat()   Calls itself every "heartbeat"

INHERITED FROM:  DpObject
void   DpObject::addAction()   Adds an action to the object
void   DpObject::addId()   Adds one or more ids for this object
void   DpObject::addItem()   Adds an examinable 'item' to this object
void   DpObject::addMapAreaAction()   Adds an action to a map area so it becomes clickable there
void   DpObject::addValidClientCall()   Makes the given method callable from the DutchPIPE client
void   DpObject::createDpObject()   Sets this object up at the time it is created
void   DpObject::event()   Reports an event
void   DpObject::eventDpObject()   Reports an event
array   DpObject::getActionData()   Gets data of one, multiple or all actions
void   DpObject::getActionsMenu()   Tells the current user the HTML with the action menu for this object
string   DpObject::getAppearance()   Gets the HTML "appearance" of this object
string   DpObject::getAppearanceInventory()   Gets the HTML "appearance" of all objects in this object's inventory
string   DpObject::getAppearanceTitle()   Gets the graphical appearance in HTML for this object
string   DpObject::getBody()   Gets the HTML content of this object
int|float   DpObject::getCredits()   Gets the amount of credits in the inventory of this object
mixed   DpObject::getEnvironment()   Gets the object reference to the environment of this object
int|float   DpObject::getHeapAmount()   Gets the amount of a given heap object
array   DpObject::getIds()   Gets the array of ids for this object, or an empty array for no ids
array   DpObject::getInventory()   Gets an array with object references to all objects in our inventory
array   DpObject::getItem()   Gets an array with data about an item
mixed   DpObject::getItemDescription()   Gets the description of a given item
array   DpObject::getItems()   Gets an array with all item data added to this object
mixed   DpObject::getMapArea()   Gets data of one, multiple or all imagemap areas
array   DpObject::getMapAreaActions()   Gets all map area actions for all areas or for a given area
string   DpObject::getMapAreaHtml()   Gets HTML for all imagemaps or the given imagemap for inclusion in page
string   DpObject::getNavigationTrailHtml()   Gets a HTML navigation trail for this object
array   DpObject::getTargettedActions()   Gets actions which can be performed on this object, for action menu
string   DpObject::getTitle()   Gets the object's title with optional prefixes such as 'a' and 'the'
mixed   DpObject::getTitleImgHeight()   Gets the height in pixels of the title image
mixed   DpObject::getTitleImgWidth()   Gets the width in pixels of the title image
void   DpObject::handleCleanUp()   Called by the universe object, checks if this object can be removed.
boolean   DpObject::isDraggable()   Can we be dragged on the screen by the given user?
boolean   DpObject::isId()   Checks if the given id is a valid id for this object
boolean   DpObject::isPresent()   Checks if an object is present in this object's inventory
boolean   DpObject::isValidClientCall()   May the given method be called in this object from the DutchPIPE client?
void   DpObject::makePresent()   Makes sure an object is present in this object's inventory
int   DpObject::moveDpObject()   Moves this object into the inventory of another object
boolean   DpObject::performActionSubject()   Tries if a user action can be performed on this object
void   DpObject::removeAction()   Removes the given action.
void   DpObject::removeDpObject()   Removes this object from the universe
void   DpObject::removeId()   Removes one or more ids for this object
void   DpObject::removeMapAreaAction()   Removes a map area action
void   DpObject::removeValidClientCall()   Removes the given method from callable methods from the DutchPIPE client
void   DpObject::reportMove()   Reports graphical movement of this object to other objects
void   DpObject::resetDpObject()   Resets this object
void   DpObject::setBody()   Sets the HTML content of this object
boolean   DpObject::setCredits()   Sets the amount of credits in the inventory of this object
boolean   DpObject::setHeapAmount()   Sets a heap object of a given amount in this object
void   DpObject::setIds()   Sets an array of names used to refer to this object
void   DpObject::setMapArea()   Creates a new imagemap area which can be used by actions
void   DpObject::setTimeout()   Calls the given method after the given number of seconds
void   DpObject::setTitle()   Sets the title for this object, "beer", used for object labels, etc.
void   DpObject::tell()   Tells data (message, window, location, ...) to this object
void   DpObject::__destruct()   Called by PHP when this object is destroyed, handles events

INHERITED FROM:  DpProperties
void   DpProperties::coinherit()   "Coinherit" a class located at the given pathname
mixed   DpProperties::getDpProperty()   Directly retrieve the value of an existing DutchPIPE property
boolean   DpProperties::isDpProperty()   Determines if a property is defined in this object
void   DpProperties::removeDpProperties()   Removes properties and coinherits
void   DpProperties::setDpProperty()   Directly set the value of an existing DutchPIPE property
void   DpProperties::__call()   Handles set and get methods for properties using PHP member overloading
mixed   DpProperties::__get()   Gets the value of a DutchPIPE property using PHP member overloading
boolean   DpProperties::__isset()   Determines if a property is defined in this object using PHP member overloading
void   DpProperties::__set()   Sets the value of a DutchPIPE property using PHP member overloading
void   DpProperties::__unset()   Unsets the given DutchPIPE property using PHP member overloading

Property Summary

array   $mActionHistory   History of input field actions, can be accesed by up and down arrow keys
array   $mAlertEvents   Events this user will be alerted of, such as people entering the site
array   $_COOKIE   Variables provided via HTTP cookies
array   $_FILES   Variables provided via HTTP post file uploads
array   $_GET   Variables provided via URL query string
array   $_POST   Variables provided via HTTP POST
array   $_SERVER   Variables set by the web server of related to dpclient.php's environment
array   $_SESSION   Variables which are currently registered to a script's session

Methods Summary

boolean   actionAvatar()   Shows this user a window with avatar settings
boolean   actionDestroy()   Destroys an object
boolean   actionEmote()   Makes this user communicate a custom message to its environment
boolean   actionForce()   Makes this administrator force another user to perform an action
boolean   actionGoto()   Go to a given location
boolean   actionHelp()   Shows this user a window with help information
boolean   actionLinks()   Shows this living a list of links in its environment or in another object
boolean   actionLoginOut()   Go to the login page, logout if logon on.
boolean   actionMode()   Sets the input field mode
boolean   actionMove()   Makes this administrator move an object to another environment
string   actionMoveOperant()   Completes the move action performed by clicking on an object
boolean   actionMyhome()   Moves to or sets personal home location
boolean   actionOblist()   Shows a list of all objects in this DutchPIPE universe in a window
boolean   actionReset()   Resets the environment.
boolean   actionSettings()   Shows this user a window with settings
boolean   actionShout()   Makes this user shout something to everyone on the site
boolean   actionSource()   Shows this user source code of environment or of another object
boolean   actionSvars()   Shows this administrator various PHP/server information about a user
boolean   actionTell()   Makes this user object tell something to another user object
boolean   actionWho()   Shows this user a list of users on the site
void   createDpLiving()   Initializes the user
void   eventDpLiving()   Reports an event
string   getAge()   Gets the user's age in a string
string   getInactive()   Gets inactive time of the user in a string
void   getModeChecked()  
string   getStatus()   Gets a descriptive user status string
status   isInactive()   Is this user inactive?
boolean   performAction()   Tries to perform the action given by the user object
void   setAvatar()   Switches to another avatar when clicking on one using actionAvatar()
void   setBrowseAvatarCustom()   Sets this user as busy browing for a file
void   setSettings()   Applies settings from the settings menu obtained with actionSettings()
void   setVars()   Sets various PHP global variables passed on from the DutchPIPE server
void   tell()   Sends something to dpclient-js.php running on the user's browser
void   timeoutHeartBeat()   Calls itself every "heartbeat"
void   uploadAvatarCustom()   Attempts to upload a file to be used as our avatar image

Properties

array   $mActionHistory = array()  [line 149]

History of input field actions, can be accesed by up and down arrow keys
ACCESS:  public
array   $mAlertEvents = array()  [line 142]

Events this user will be alerted of, such as people entering the site
ACCESS:  public
array   $_COOKIE   [line 100]

Variables provided via HTTP cookies
ACCESS:  public
array   $_FILES   [line 121]

Variables provided via HTTP post file uploads
ACCESS:  public
array   $_GET   [line 107]

Variables provided via URL query string
ACCESS:  public
array   $_POST   [line 114]

Variables provided via HTTP POST
ACCESS:  public
array   $_SERVER   [line 86]

Variables set by the web server of related to dpclient.php's environment

This environment is the execution environment of the current dpclient.php script.

ACCESS:  public
array   $_SESSION   [line 93]

Variables which are currently registered to a script's session
ACCESS:  public
Methods

actionAvatar  [line 684]
boolean actionAvatar( string $verb , string $noun   )

Shows this user a window with avatar settings

PARAMETERS: string   $verb  the action, "avatar"
string   $noun  empty string
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
SEE:  DpUser::setAvatar(), DpUser::setBrowseAvatarCustom(), DpUser::uploadAvatarCustom(), removeAvatarCustom
SINCE:  DutchPIPE 0.4.1
actionDestroy  [line 1275]
boolean actionDestroy( string $verb , string $noun   )

Destroys an object

PARAMETERS: string   $verb  the action, "destroy"
string   $noun  the object to destroy, for example "rose"
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
SINCE:  DutchPIPE 0.4.0
actionEmote  [line 1732]
boolean actionEmote( string $verb , string $noun   )

Makes this user communicate a custom message to its environment

PARAMETERS: string   $verb  the action, "emote"
string   $noun  string to "emote"
RETURNS:  boolean  TRUE for action completed, FALSE otherwise
REDEFINITION OF:   DpLiving::actionEmote(): Makes this living object communicate a custom message to its environment
actionForce  [line