POT
POT
POT
Main menu

Download

Forum

SVN

Class: OTS_IPBan

Source Location: /classes/OTS_IPBan.php

Class OTS_IPBan

Class Overview

OTServ IP ban.

OTServ IP ban.

Located in /classes/OTS_IPBan.php [line 19]

OTS_Base_DAO
   |
   --OTS_Row_DAO
      |
      --OTS_Ban
         |
         --OTS_IPBan
Author(s):
Information Tags:
Version:  0.1.6
Since:  0.1.5

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From OTS_Base_DAO

OTS_Base_DAO::$db

Inherited From OTS_Ban

OTS_Ban::activate()
Activates ban.
OTS_Ban::deactivate()
Deactivates ban.
OTS_Ban::delete()
Deletes ban.
OTS_Ban::getAdded()
Banned time.
OTS_Ban::getAdminId()
Ban creator.
OTS_Ban::getComment()
Explaination comment.
OTS_Ban::getCustomField()
Reads custom field.
OTS_Ban::getExpires()
Expiration time.
OTS_Ban::getId()
Ban ID.
OTS_Ban::getParam()
Additional parameter.
OTS_Ban::getReason()
Ban reason.
OTS_Ban::getValue()
Banned target.
OTS_Ban::isActive()
Activation state.
OTS_Ban::isLoaded()
Checks if object is loaded.
OTS_Ban::load()
Loads ban with given id.
OTS_Ban::save()
Saves ban in database.
OTS_Ban::setAdded()
Sets banned time.
OTS_Ban::setAdminId()
Sets ban creator.
OTS_Ban::setComment()
Sets explaination comment.
OTS_Ban::setCustomField()
Writes custom field.
OTS_Ban::setExpires()
Sets expiration time.
OTS_Ban::setParam()
Sets additional parameter.
OTS_Ban::setReason()
Sets ban reason.
OTS_Ban::setValue()
Sets banned target.
OTS_Ban::__get()
Magic PHP5 method.
OTS_Ban::__set()
Magic PHP5 method.

Inherited From OTS_Row_DAO

OTS_Row_DAO::__construct()
Handles automatic loading for record.
OTS_Row_DAO::find()
Loads row by it's name.
OTS_Row_DAO::load()
Loads row by it's ID.

Inherited From OTS_Base_DAO

OTS_Base_DAO::__construct()
Sets database connection handler.
OTS_Base_DAO::__clone()
Creates clone of object.
OTS_Base_DAO::__set_state()
Magic PHP5 method.
OTS_Base_DAO::__sleep()
Magic PHP5 method.
OTS_Base_DAO::__wakeup()
Magic PHP5 method.

[ Top ]
Property Summary
array   $data   Ban data.

[ Top ]
Method Summary
void   find()   Loads IP ban by banned IP.
void   load()   Loads IP ban with given id.

[ Top ]
Properties
array   $data = array('type' => POT::BAN_IP, 'param' => 0, 'active' => true, 'admin_id' => 0, 'comment' => '', 'reason' => 0) [line 28]

Ban data.

Ban data.

API Tags:
Access:  protected

Information Tags:
Version:  0.1.6
Since:  0.1.5

Redefinition of:
OTS_Ban::$data
Ban data.

[ Top ]
Methods
find  [line 56]

  void find( int $ip  )

Loads IP ban by banned IP.

Loads IP ban by banned IP. This method loads ban that matches given IP (including mask). To unban IP you should rather use load() method to load exacly that ban that you are seeking for.

Parameters:
int   $ip:  IP.

API Tags:
Access:  public

Information Tags:
Version:  0.1.5
Throws:  PDOException On PDO operation error.
Since:  0.1.5

Redefinition of:
OTS_Row_DAO::find()
Loads row by it's name.

[ Top ]
load  [line 38]

  void load( int $id  )

Loads IP ban with given id.

Loads IP ban with given id.

Parameters:
int   $id:  Ban ID.

API Tags:
Access:  public

Information Tags:
Version:  0.1.5
Throws:  PDOException On PDO operation error.
Since:  0.1.5

Redefinition of:
OTS_Ban::load()
Loads ban with given id.

[ Top ]