Activates ban.
Activates ban.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
API Tags:
Information Tags:
| Version: | 0.1.5 |
| Since: | 0.1.5 |
Deactivates ban.
Deactivates ban.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
API Tags:
Information Tags:
| Version: | 0.1.5 |
| Since: | 0.1.5 |
Deletes ban.
Deletes ban.
API Tags:
Information Tags:
| Version: | 0.1.5 |
| Throws: | E_OTS_NotLoaded If ban is not loaded. |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.1.5 |
Banned time.
Banned time.
API Tags:
| Return: | Ban creation time. |
| Access: | public |
Information Tags:
| Version: | 0.1.5 |
| Throws: | E_OTS_NotLoaded If ban is not loaded. |
| Since: | 0.1.5 |
Ban creator.
Ban creator.
API Tags:
| Return: | ID of administrator who created ban entry. |
| Access: | public |
Information Tags:
| Version: | 0.1.5 |
| Throws: | E_OTS_NotLoaded If ban is not loaded. |
| Since: | 0.1.5 |
Explaination comment.
Explaination comment.
API Tags:
| Return: | Ban description. |
| Access: | public |
Information Tags:
| Version: | 0.1.5 |
| Throws: | E_OTS_NotLoaded If ban is not loaded. |
| Since: | 0.1.5 |
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.1.5 |
| Throws: | E_OTS_NotLoaded If ban is not loaded. |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.1.5 |
Expiration time.
Expiration time.
API Tags:
| Return: | Ban expiration time (0 - forever). |
| Access: | public |
Information Tags:
| Version: | 0.1.5 |
| Throws: | E_OTS_NotLoaded If ban is not loaded. |
| Since: | 0.1.5 |
Ban ID.
Ban ID.
API Tags:
| Return: | Ban ID. |
| Access: | public |
Information Tags:
| Version: | 0.1.5 |
| Throws: | E_OTS_NotLoaded If ban is not loaded. |
| Since: | 0.1.5 |
Additional parameter.
Additional parameter.
API Tags:
| Return: | Parameter value (usualy used as IP mask). |
| Access: | public |
Information Tags:
| Version: | 0.1.5 |
| Throws: | E_OTS_NotLoaded If ban is not loaded. |
| Since: | 0.1.5 |
Ban reason.
Ban reason.
API Tags:
| Return: | Reason for which ban was created. |
| Access: | public |
Information Tags:
| Version: | 0.1.5 |
| Throws: | E_OTS_NotLoaded If ban is not loaded. |
| Since: | 0.1.5 |
Banned target.
Banned target.
API Tags:
| Return: | Target identifier. |
| Access: | public |
Information Tags:
| Version: | 0.1.5 |
| Throws: | E_OTS_NotLoaded If ban is not loaded. |
| Since: | 0.1.5 |
Activation state.
Activation state.
API Tags:
| Return: | Is ban active. |
| Access: | public |
Information Tags:
| Version: | 0.1.5 |
| Throws: | E_OTS_NotLoaded If ban is not loaded. |
| Since: | 0.1.5 |
Checks if object is loaded.
Checks if object is loaded.
API Tags:
| Return: | Load state. |
| Access: | public |
Information Tags:
| Version: | 0.1.5 |
| Since: | 0.1.5 |
Loads ban with given id.
Loads ban with given id.
Parameters:
API Tags:
Information Tags:
| Version: | 0.1.5 |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.1.5 |
Redefinition of:
- OTS_Row_DAO::load()
- Loads row by it's ID.
Redefined in descendants as:
Saves ban in database.
Saves ban in database.
If object is not loaded to represent any existing ban it will create new row for it.
API Tags:
Information Tags:
| Version: | 0.1.5 |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.1.5 |
void setAdded(
int
$added
)
|
|
Sets banned time.
Sets banned time.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
Parameters:
|
int |
$added: |
Ban creation time. |
API Tags:
Information Tags:
| Version: | 0.1.5 |
| Since: | 0.1.5 |
void setAdminId(
int
$adminId
)
|
|
Sets ban creator.
Sets ban creator.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
Parameters:
|
int |
$adminId: |
ID of administrator who created ban entry. |
API Tags:
Information Tags:
| Version: | 0.1.5 |
| Since: | 0.1.5 |
void setComment(
string
$comment
)
|
|
Sets explaination comment.
Sets explaination comment.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
Parameters:
|
string |
$comment: |
Ban description. |
API Tags:
Information Tags:
| Version: | 0.1.5 |
| Since: | 0.1.5 |
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 name. 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.1.5 |
| Throws: | E_OTS_NotLoaded If account is not loaded. |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.1.5 |
void setExpires(
int
$expires
)
|
|
Sets expiration time.
Sets expiration time.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
Parameters:
|
int |
$expires: |
Ban expiration time (0 - forever). |
API Tags:
Information Tags:
| Version: | 0.1.5 |
| Since: | 0.1.5 |
void setParam(
int
$param
)
|
|
Sets additional parameter.
Sets additional parameter.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
Parameters:
|
int |
$param: |
Parameter value (usualy used as IP mask). |
API Tags:
Information Tags:
| Version: | 0.1.5 |
| Since: | 0.1.5 |
void setReason(
int
$reason
)
|
|
Sets ban reason.
Sets ban reason.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
Parameters:
|
int |
$reason: |
Reason for which ban was created. |
API Tags:
Information Tags:
| Version: | 0.1.5 |
| Since: | 0.1.5 |
void setValue(
int
$value
)
|
|
Sets banned target.
Sets banned target.
This method only updates object state. To save changes in database you need to use save() method to flush changed to database.
Parameters:
|
int |
$value: |
Banned target identifier. |
API Tags:
Information Tags:
| Version: | 0.1.5 |
| Since: | 0.1.5 |
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.5 |
| Throws: | E_OTS_NotLoaded If ban is not loaded. |
| Throws: | OutOfBoundsException For non-supported properties. |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.1.5 |
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.5 |
| Throws: | OutOfBoundsException For non-supported properties. |
| Throws: | PDOException On PDO operation error. |
| Since: | 0.1.5 |