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
|
PROPERTIES:
|
METHODS:
|
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 |
actionEmote() |
Makes this user communicate a custom message to its environment |
| boolean |
actionForce() |
Makes this administrator force another user to perform an action |
| 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 |
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 |
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 |
| string |
getAge() |
Gets the user's age in a string |
| string |
getInactive() |
Gets inactive time of the user in a string |
| string |
getStatus() |
Gets a descriptive user status string |
| 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 |
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 |
Properties
array
$mActionHistory
= array() [line 149]
History of input field actions, can be accesed by up and down arrow keys
array
$mAlertEvents
= array() [line 142]
Events this user will be alerted of, such as people entering the site
array
$_COOKIE
[line 100]
Variables provided via HTTP cookies
array
$_FILES
[line 121]
Variables provided via HTTP post file uploads
array
$_GET
[line 107]
Variables provided via URL query string
array
$_POST
[line 114]
Variables provided via HTTP POST
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.
array
$_SESSION
[line 93]
Variables which are currently registered to a script's session
Methods
boolean actionAvatar(
string
$verb , string
$noun
)
Shows this user a window with avatar settings
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 |
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 |
|
|