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

Class: DpHeap

SOURCE LOCATION:  /dpuniverse/std/DpHeap.php

Class Overview

A heap of credits, stones, etc., represented by one object

When instances of these objects get the same environment, they will merge.

Creates the following DutchPIPE properties:

  • int amount - Number of units in heap
  • string isHeap - Set to TRUE
  • string heapTitleSingular - Title for single unit
  • string heapTitlePlural - Title for more units
  • int|float heapWeightModifier - Weight increase per unit
  • int|float heapVolumeModifier - Volume increase per unit
  • int|float heapValueModifier - Value increase per unit

DpProperties
   |
   --DpObject
      |
      --DpHeap
LOCATED IN:  /dpuniverse/std/DpHeap.php [line 53]
SEE:  DpObject
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
METHODS:

Direct Descendants

Child Class Description
Credits Credits object for monetary system

Inherits

Inherited Methods

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

Methods Summary

void   createDpHeap()   Sets this heap object up at the time it is created
boolean   isId()   Checks if the given id is a valid id for this object
int   moveDpObject()   Moves this object into the inventory of another object
void   resetDpHeap()   Resets this heap object
bool   setAmount()   Sets the amount of items in the heap

Methods

createDpHeap  [line 92]
void createDpHeap( )

Sets this heap object up at the time it is created

An empty function which can be redefined by the heap object extending on DpHeap.


SEE:  DpHeap::resetDpHeap()
REDEFINED AS:   Credits::createDpHeap(): Sets up the object at object creation time
isId  [line 183]
boolean isId( string $id , [string $checkWithArticle = TRUE]   )

Checks if the given id is a valid id for this object

PARAMETERS: string   $id  name string to check
string   $checkWithArticle  also check ids with articles
RETURNS:  boolean  TRUE if the id is valid, FALSE otherwise
SEE:  DpObject::isId()
REDEFINITION OF:   DpObject::isId(): Checks if the given id is a valid id for this object
moveDpObject  [line 133]
int moveDpObject( mixed &$target_ob , [boolean $simple = FALSE] , [ $heap_amount = FALSE]   )

Moves this object into the inventory of another object

PARAMETERS: mixed   &$target_ob  path or object to move into to
boolean   $simple  skip some checks
   $heap_amount 
RETURNS:  int  TRUE for success, an error code for failure
REDEFINITION OF:   DpObject::moveDpObject(): Moves this object into the inventory of another object
resetDpHeap  [line 122]
void resetDpHeap( )

Resets this heap object

Called by this heap object at regular intervals as defined in dpuniverse-ini.php. An empty function which can be redefined by the heap object extending on DpDrink. To be used to periodically do stuff such as alter the state of the heap object.


setAmount  [line 203]
bool setAmount( string $amount   )

Sets the amount of items in the heap

PARAMETERS: string   $amount  new number of items in the heap
RETURNS:  bool  TRUE for success, FALSE for failure
ACCESS:  protected

Documentation generated on Mon, 03 Sep 2007 22:19:22 +0200 by phpDocumentor 1.3.0RC6

Click me!
Guest#1829
 
 
 
  Go to Top
 
 
Input Field OptionsClose Input Field Go to Top
 
Legal Notices | Copyright © 2006, 2007 Lennert Stock. All rights reserved. Last update: Mon Sep 03 2007, 21:50 CET.