CLI API Documentation

Axigen's PHP Command Line Interface API reference guide

List of all members.

Public Member Functions

  __construct ($accesscontrolObj, $parent)
  __get ($varName)
  __set ($varName, $varValue)
  addAllowRule ($ipRangeNetwork, $enable="yes", $priority=null)
  addDenyRule ($ipRangeNetwork, $enable="yes", $priority=null)
  getAccessControlObj ()
  getRulesObj ()
  getSessionObj ()
  listAllowRules ()
  listDenyRules ()
  removeAllowRule ($ipRangeNetwork)
  removeDenyRule ($ipRangeNetwork)
  save ()
  saveRules ()
  updateAllowRule ($ipRangeNetwork)
  updateDenyRule ($ipRangeNetwork, $enable=null, $priority=null)

Member Function Documentation

AccessControl::__get ( varName  ) 

Get members.

member

description

maxConnections

maximum number of connections

timeInterval

the time interval

maxIntervalConnections

maximum number of connections in time interval

peerMaxConnections

maximum number of connections from a single host

peerTimeInterval

the time interval - single host

peerMaxIntervalConnections

maximum number of connections in time interval - single host

AccessControl::__set ( varName,
varValue  
)

Set members.

member

description

maxConnections

maximum number of connections

timeInterval

the time interval

maxIntervalConnections

maximum number of connections in time interval

peerMaxConnections

maximum number of connections from a single host

peerTimeInterval

the time interval - single host

peerMaxIntervalConnections

maximum number of connections in time interval - single host

AccessControl::addAllowRule ( ipRangeNetwork,
enable = "yes",
priority = null  
)

Adds an allow rule

Returns:
bool
Parameters:
$ipRangeNetwork  string IP range or network/mask (ex: 1.2.3.4-1.2.3.5 or 1.2.3.0/255.255.255.0)
$enable  string enable rule (optional default: yes)
$priority  int rule priority (optional default: auto)
AccessControl::addDenyRule ( ipRangeNetwork,
enable = "yes",
priority = null  
)

Adds a deny rule

Returns:
bool
Parameters:
$ipRangeNetwork  string IP range or network/mask (ex: 1.2.3.4-1.2.3.5 or 1.2.3.0/255.255.255.0)
$enable  string enable rule (optional default: yes)
$priority  int rule priority (optional default: auto)
AccessControl::listAllowRules (  ) 

Returns an array with all the allow rules

Returns:
array
AccessControl::listDenyRules (  ) 

returns an array with all the deny rules

Returns:
array
AccessControl::removeAllowRule ( ipRangeNetwork  ) 

Removes an allow rule

Returns:
bool
Parameters:
$ipRangeNetwork  string IP range or network/mask (ex: 1.2.3.4-1.2.3.5 or 1.2.3.0/255.255.255.0)
AccessControl::removeDenyRule ( ipRangeNetwork  ) 

Removes a deny rule

Returns:
bool
Parameters:
$ipRangeNetwork  string IP range or network/mask (ex: 1.2.3.4-1.2.3.5 or 1.2.3.0/255.255.255.0)
AccessControl::save (  ) 

This method must be called if one of the members has been changed

Returns:
bool
AccessControl::updateAllowRule ( ipRangeNetwork  ) 

Returns an object with an allow rule loaded

Returns:
object AllowRule
Parameters:
$ipRangeNetwork  string IP range or network/mask (ex: 1.2.3.4-1.2.3.5 or 1.2.3.0/255.255.255.0)
AccessControl::updateDenyRule ( ipRangeNetwork,
enable = null,
priority = null  
)

This method updates a deny rule

Returns:
Parameters:
$ipRangeNetwork  string IP range or network/mask (ex: 1.2.3.4-1.2.3.5 or 1.2.3.0/255.255.255.0)
$enable  string enable/disable rule (yes/no)
$priority  int rule priority