OTS_House __construct(
$element
)
|
|
Creates wrapper for given house element.
Creates wrapper for given house element.
Parameters:
|
DOMElement |
$element: |
House information. |
API Tags:
Information Tags:
| Version: | 0.1.0 |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.1.0 |
Redefinition of:
- OTS_Base_DAO::__construct()
- Sets database connection handler.
Adds tile to house.
Adds tile to house.
Parameters:
API Tags:
Information Tags:
| Version: | 0.1.0 |
| Since: | 0.1.0 |
Deletes house info from database.
Deletes house info from database.
API Tags:
Information Tags:
| Version: | 0.1.0 |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.1.0 |
Returns entry position.
Returns entry position.
API Tags:
| Return: | Entry coordinations on map. |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Since: | 0.1.0 |
Returns house's ID.
Returns house's ID.
API Tags:
| Return: | House ID. |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Throws: | DOMException On DOM operation error. |
| Since: | 0.1.0 |
Return house's name.
Return house's name.
API Tags:
| Return: | House name. |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Throws: | DOMException On DOM operation error. |
| Since: | 0.1.0 |
Returns current house owner.
Returns current house owner.
API Tags:
| Return: | Player that currently owns house (null if there is no owner). |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Since: | 0.1.0 |
Returns paid date.
Returns paid date.
API Tags:
| Return: | Date timestamp until which house is rent (false if none). |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Since: | 0.1.0 |
Returns house rent cost.
Returns house rent cost.
API Tags:
| Return: | Rent cost. |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Throws: | DOMException On DOM operation error. |
| Since: | 0.1.0 |
Returns house size.
Returns house size.
API Tags:
| Return: | House size. |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Throws: | DOMException On DOM operation error. |
| Since: | 0.1.0 |
Returns tiles list.
Returns tiles list.
This returns list of coords of tiles used by this house on map. It will succeed only if house object was created during map loading with houses file opened to assign loaded tiles.
API Tags:
| Return: | List of tiles. |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Since: | 0.1.0 |
Returns town ID in which house is located.
Returns town ID in which house is located.
API Tags:
| Return: | Town ID. |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Throws: | DOMException On DOM operation error. |
| Since: | 0.1.0 |
Returns town name.
Returns town name.
API Tags:
| Return: | Town name. |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Throws: | E_OTS_NotLoaded When map file is not loaded to fetch towns names. |
| Since: | 0.1.0 |
Returns house warnings.
Returns house warnings.
API Tags:
| Return: | Warnings text (false if none). |
| Access: | public |
Information Tags:
| Version: | 0.1.2 |
| Version: | 0.1.0 |
| Since: | 0.1.0 |
Saves info in database.
Saves info in database.
API Tags:
Information Tags:
| Version: | 0.1.0 |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.1.0 |
Sets house owner.
Sets house owner.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
Parameters:
API Tags:
Information Tags:
| Version: | 0.1.0 |
| Throws: | E_OTS_NotLoaded If given $player object is not loaded. |
| Since: | 0.1.0 |
void setPaid(
int
$paid
)
|
|
Sets paid date.
Sets paid date.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
Parameters:
|
int |
$paid: |
Sets paid timestamp to passed one. |
API Tags:
Information Tags:
| Version: | 0.1.0 |
| Since: | 0.1.0 |
void setWarnings(
int
$warnings
)
|
|
Sets house warnings.
Sets house warnings.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
Parameters:
|
int |
$warnings: |
Sets house warnings. |
API Tags:
Information Tags:
| Version: | 0.1.2 |
| Version: | 0.1.0 |
| Since: | 0.1.0 |
mixed __get(
string
$name
)
|
|
Magic PHP5 method.
Magic PHP5 method.
Parameters:
|
string |
$name: |
Property name. |
API Tags:
| Return: | Property value. |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Throws: | E_OTS_NotLoaded When atempt to read info about map while map not being loaded. |
| Throws: | OutOfBoundsException For non-supported properties. |
| Throws: | DOMException On DOM operation error. |
| Since: | 0.1.0 |
void __set(
string
$name, mixed
$value
)
|
|
Magic PHP5 method.
Magic PHP5 method.
Parameters:
|
string |
$name: |
Property name. |
|
mixed |
$value: |
Property value. |
API Tags:
Information Tags:
| Version: | 0.1.0 |
| Throws: | E_OTS_NotLoaded If passed parameter for owner field won't be loaded. |
| Throws: | OutOfBoundsException For non-supported properties. |
| Since: | 0.1.0 |
Magic PHP5 method.
Magic PHP5 method.
Allows object serialisation.
API Tags:
| Return: | List of properties that should be saved. |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Since: | 0.1.0 |
Redefinition of:
- OTS_Base_DAO::__sleep()
- Magic PHP5 method.
Returns string representation of object.
Returns string representation of object.
If any display driver is currently loaded then it uses it's method. Otherwise just returns house ID.
API Tags:
| Return: | String representation of object. |
| Access: | public |
Information Tags:
| Version: | 0.1.3 |
| Version: | 0.1.0 |
| Since: | 0.1.0 |
| Since: | 0.1.3 |