Returns number of player within.
Returns number of player within.
API Tags:
| Return: | Count of players. |
| Access: | public |
Information Tags:
| Version: | 0.0.5 |
| Version: | 0.0.4 |
| Throws: | PDOException On PDO operation error. |
| Throws: | E_OTS_NotLoaded If rank is not loaded. |
| Since: | 0.0.4 |
| Since: | 0.0.5 |
Implementation of:
- Countable::count
Deletes guild rank.
Deletes guild rank.
API Tags:
Information Tags:
| Version: | 0.0.5 |
| Version: | 0.0.4 |
| Throws: | PDOException On PDO operation error. |
| Throws: | E_OTS_NotLoaded If guild rank is not loaded. |
| Since: | 0.0.4 |
| Since: | 0.0.5 |
void find(
string
$name, [OTS_Guild
$guild = null]
)
|
|
Loads rank by it's name.
Loads rank by it's name.
As there can be several ranks with same name in different guilds you can pass optional second parameter to specify in which guild script should look for rank.
Parameters:
|
string |
$name: |
Rank's name. |
|
OTS_Guild |
$guild: |
Guild in which rank should be found. |
API Tags:
Information Tags:
| Version: | 0.0.5 |
| Version: | 0.0.4 |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.0.4 |
| Throws: | E_OTS_NotLoaded If given $guild object is not loaded. |
Redefinition of:
- OTS_Row_DAO::find()
- Loads row by it's name.
string getCustomField(
string
$field
)
|
|
Reads custom field.
Reads custom field.
Reads field by it's name. Can read any field of given record that exists in database.
Note: You should use this method only for fields that are not provided in standard setters/getters (SVN fields). This method runs SQL query each time you call it so it highly overloads used resources.
Parameters:
|
string |
$field: |
Field name. |
API Tags:
| Return: | Field value. |
| Access: | public |
Information Tags:
| Version: | 0.0.5 |
| Version: | 0.0.4 |
| Throws: | E_OTS_NotLoaded If rank is not loaded. |
| Since: | 0.0.4 |
| Throws: | PDOException On PDO operation error. |
Returns guild of this rank.
Returns guild of this rank.
API Tags:
| Return: | Guild of this rank. |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Version: | 0.0.4 |
| Throws: | E_OTS_NotLoaded If rank is not loaded. |
| Since: | 0.0.4 |
| Throws: | PDOException On PDO operation error. |
Rank ID.
Rank ID.
API Tags:
| Return: | Rank ID. |
| Access: | public |
Information Tags:
| Version: | 0.0.4 |
| Throws: | E_OTS_NotLoaded If rank is not loaded. |
| Since: | 0.0.4 |
Returns players iterator.
Returns players iterator.
There is no need to implement entire Iterator interface since we have players list class for it.
API Tags:
| Return: | List of players. |
| Access: | public |
Information Tags:
| Version: | 0.0.5 |
| Version: | 0.0.4 |
| Throws: | PDOException On PDO operation error. |
| Throws: | E_OTS_NotLoaded If rank is not loaded. |
| Since: | 0.0.4 |
| Since: | 0.0.5 |
Implementation of:
- IteratorAggregate::getIterator
Rank's access level.
Rank's access level.
API Tags:
| Return: | Rank access level within guild. |
| Access: | public |
Information Tags:
| Version: | 0.0.4 |
| Throws: | E_OTS_NotLoaded If rank is not loaded. |
| Since: | 0.0.4 |
Rank name.
Rank name.
API Tags:
| Return: | Rank's name. |
| Access: | public |
Information Tags:
| Version: | 0.0.4 |
| Throws: | E_OTS_NotLoaded If rank is not loaded. |
| Since: | 0.0.4 |
API Tags:
| Return: | List of members. |
| Deprecated: | 0.0.5 Use getPlayersList(). |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Version: | 0.0.4 |
| Since: | 0.0.4 |
| Throws: | E_OTS_NotLoaded If rank is not loaded. |
List of characters with current rank.
List of characters with current rank.
In difference to getPlayers() method this method returns filtered OTS_Players_List object instead of array of OTS_Player objects. It is more effective since OTS_Player_List doesn't perform all rows loading at once.
Note: Returned object is only prepared, but not initialised. When using as parameter in foreach loop it doesn't matter since it will return it's iterator, but if you will wan't to execute direct operation on that object you will need to call rewind() method first.
API Tags:
| Return: | List of players with current rank. |
| Access: | public |
Information Tags:
| Version: | 0.1.4 |
| Version: | 0.0.4 |
| Throws: | E_OTS_NotLoaded If rank is not loaded. |
| Since: | 0.0.5 |
| Since: | 0.0.4 |
Checks if object is loaded.
Checks if object is loaded.
API Tags:
| Return: | Load state. |
| Access: | public |
Information Tags:
| Version: | 0.0.4 |
| Since: | 0.0.4 |
Loads rank with given id.
Loads rank with given id.
Parameters:
API Tags:
Information Tags:
| Version: | 0.0.5 |
| Version: | 0.0.4 |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.0.4 |
Redefinition of:
- OTS_Row_DAO::load()
- Loads row by it's ID.
Saves rank in database.
Saves rank in database.
If rank is not loaded to represent any existing group it will create new row for it.
API Tags:
Information Tags:
| Version: | 0.0.8 |
| Version: | 0.0.4 |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.0.4 |
void setCustomField(
string
$field, mixed
$value
)
|
|
Writes custom field.
Writes custom field.
Write field by it's name. Can write any field of given record that exists in database.
Note: You should use this method only for fields that are not provided in standard setters/getters (SVN fields). This method runs SQL query each time you call it so it highly overloads used resources.
Note: Make sure that you pass $value argument of correct type. This method determinates whether to quote field value. It is safe - it makes you sure that no unproper queries that could lead to SQL injection will be executed, but it can make your code working wrong way. For example: $object->setCustomField('foo', '1'); will quote 1 as as string ('1') instead of passing it as a integer.
Parameters:
|
string |
$field: |
Field name. |
|
mixed |
$value: |
Field value. |
API Tags:
Information Tags:
| Version: | 0.0.5 |
| Version: | 0.0.4 |
| Throws: | E_OTS_NotLoaded If rank is not loaded. |
| Since: | 0.0.4 |
| Throws: | PDOException On PDO operation error. |
Assigns rank to guild.
Assigns rank to guild.
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.0.4 |
| Throws: | E_OTS_NotLoaded If given $guild object is not loaded. |
| Since: | 0.0.4 |
void setLevel(
int
$level
)
|
|
Sets rank's access level within guild.
Sets rank's access level within guild.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
Parameters:
|
int |
$level: |
access level within guild. |
API Tags:
Information Tags:
| Version: | 0.0.4 |
| Since: | 0.0.4 |
void setName(
string
$name
)
|
|
Sets rank's name.
Sets rank's name.
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.0.4 |
| Since: | 0.0.4 |
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 |
| Version: | 0.0.4 |
| Throws: | PDOException On PDO operation error. |
| Throws: | OutOfBoundsException For non-supported properties. |
| Since: | 0.0.4 |
| 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 |
| Version: | 0.0.4 |
| Throws: | PDOException On PDO operation error. |
| Throws: | OutOfBoundsException For non-supported properties. |
| Since: | 0.0.4 |
| Since: | 0.1.0 |
Returns string representation of object.
Returns string representation of object.
If any display driver is currently loaded then it uses it's method. Else it returns rank name.
API Tags:
| Return: | String representation of object. |
| Access: | public |
Information Tags:
| Version: | 0.1.3 |
| Version: | 0.0.4 |
| Since: | 0.0.4 |
| Since: | 0.1.0 |