Represent an Item in the shop or in the Inventory.
package |
inc\Item.inc |
---|---|
author |
Alexandre Renoux |
author |
Pierre-Emmanuel Novac |
__construct(string $name, integer $cost, string $icon, string $desc, array $feat) : void
string
Item's name
integer
Item's cost
string
Item's icon
string
Item's description
array
associative array of strings describing the Item's features
addToXML( $root, integer $count) : void
integer
numbers of Items
consume() : void
fromXML(\SimpleXMLElement $xml) : void
\SimpleXMLElement
root XML element representing the Item
name : string
var |
Name of the item. |
---|
string
cost : integer
var |
Item's cost. |
---|
integer
icon : string
var |
Item's icon. |
---|
string
desc : string
var |
Item's description. |
---|
string
feat : array
var |
Item's features as an associative array |
---|
array