Class: DpPage
SOURCE LOCATION: /dpuniverse/std/DpPage.php
Class Overview
|
A DutchPIPE enabled web page
Creates the following DutchPIPE properties:
- boolean isPage - Set to TRUE
- boolean|integer isMovingArea - Set to FALSE, can be type 1 or 2
- boolean isStandalone - Set to TRUE if this is a "standalone" page
DpProperties
|
--DpObject
|
--DpPage
|
METHODS:
|
Methods Summary
| void |
addExit() |
Adds an "exit" out of this page |
| void |
closeInputArea() |
Closes the input area, called from client-side JavaScript |
| array |
getExits() |
Gets all "exits" out of this page |
| void |
openInputArea() |
Enables the input area called from client-side JavaScript |
| void |
removeExit() |
Removes the given "exit" from the page |
| void |
setExits() |
Sets all "exits" out of this page at once |
| void |
setNavigationTrail() |
Sets data to later generate a HTML navigation trail for this page |
| void |
tell() |
Sends a message to all objects in this page, "makes sound or movement" |
| boolean |
useExit() |
Makes the active object exit this page and go to a new URL |
Methods
void addExit(
array
$direction , string
$destination , [
$method = NULL] , [
$mapArea = NULL] , [
$mapAreaActionTitle = NULL]
)
Adds an "exit" out of this page
Exits are links that can be typed on the command line or used by computer controlled character to wander around the site. Adding compass directions like 'nw' will also add the full 'northwest' action, and vice versa, if not defined.
closeInputArea [line 607]
void closeInputArea(
)
Closes the input area, called from client-side JavaScript
void createDpObject(
)
Creates this page
Calls the method 'createDpPage' in this page.
void createDpPage(
)
Creates this page
void eventDpObject(
object
$name , mixed
$args
)
Reports an event
Called when certain events occur, given with $name. Calls the method 'eventDpPage' in this page.
| PARAMETERS: |
object |
$name |
Name of event |
| mixed |
$args |
One or more arguments, depends on event |
| SINCE: | DutchPIPE 0.2.0 |
| REDEFINITION OF: |
DpObject::eventDpObject(): Reports an event |
void eventDpPage(
object
$name , mixed
$args
)
Reports an event
Called when certain events occur, given with $name.
| PARAMETERS: |
object |
$name |
Name of event |
| mixed |
$args |
One or more arguments, depends on event |
| SINCE: | DutchPIPE 0.2.0 |
| REDEFINED AS: |
Shop::eventDpPage()
|
getExitAliases [line 339]
array getExitAliases(
)
Gets all aliases for exits
| RETURNS: | array | Alias/direction pairs |
getExitDestination [line 276]
string getExitDestination(
string
$direction
)
Gets URL of "exit" out of this page
Exits are links that can be typed on the command line or used by computer controlled character to wander around the site.
| PARAMETERS: |
string |
$direction |
Command to use link, "home", "bar" |
| RETURNS: | string | URL |
getExitMapArea [line 312]
string getExitMapArea(
string
$direction
)
Gets URL of "exit" out of this page
Exits are links that can be typed on the command line or used by computer controlled character to wander around the site.
| PARAMETERS: |
string |
$direction |
Command to use link, "home", "bar" |
| RETURNS: | string | URL |
string getExitMethod(
string
$direction
)
Gets URL of "exit" out of this page
Exits are links that can be typed on the command line or used by computer controlled character to wander around the site.
| PARAMETERS: |
string |
$direction |
Command to use link, "home", "bar" |
| RETURNS: | string | URL |
array getExits(
)
Gets all "exits" out of this page
Exits are links that can be typed on the command line or used by computer controlled character to wander around the site.
| RETURNS: | array | Direction/destination pairs |
getInputAreaOptions [line 530]
void getInputAreaOptions(
)
Tells the current user the HTML with the input area options menu
getNavigationTrail [line 472]
array getNavigationTrail(
)
Gets data for the navigation trail for this page, if any
| RETURNS: | array | navigation trail elements |
getNavigationTrailHtml [line 482]
string getNavigationTrailHtml(
)
Gets HTML with a navigation trail for this page
void openInputArea(
)
Enables the input area called from client-side JavaScript
void removeExit(
string
$direction
)
Removes the given "exit" from the page
void resetDpObject(
)
Resets this page
Calls the method 'resetDpPage' in this page.
void resetDpPage(
)
Resets this object
void setExits(
array
$exits
)
Sets all "exits" out of this page at once
Exits are links that can be typed on the command line or used by computer controlled character to wander around the site.
setNavigationTrail [line 448]
void setNavigationTrail(
mixed
$navitem
)
Sets data to later generate a HTML navigation trail for this page
Each item is either a string with the element's title for the last tiem in the navigation trail, or an array with each key such a title, and each value the destination path within dpuniverse.
| PARAMETERS: |
mixed |
$navitem |
string or string/destination pairs |
void tell(
string
$data , [object
&$from = NULL] , object
&$from2
)
Sends a message to all objects in this page, "makes sound or movement"
Calls the tell method in all objects in this page with the message. One or more extra arguments can be given to specify objects which should be skipped. For example: $user->tell('You smile happily. '); $user->getEnvironment()->tell(ucfirst( $user->getTitle(DPUNIVERSE_TITLE_TYPE_DEFINITE)) . ' smiles happily. ', $user);
| PARAMETERS: |
string |
$data |
message string |
| object |
&$from |
First object to skip |
| object |
&$from2 |
Second object to skip, etc. |
| REDEFINITION OF: |
DpObject::tell(): Tells data (message, window, location, ...) to this object |
boolean useExit(
string
$verb , [string
$noun = '']
)
Makes the active object exit this page and go to a new URL
| PARAMETERS: |
string |
$verb |
The name or verb part of the action, "home" |
| string |
$noun |
The given id, noun or remainder, usually empty |
| RETURNS: | boolean | FALSE in case of failure, TRUE for success |
|
|