class IpAccessControlCategory (View source)

Represent an IP Access Control Category.

Constants

TIMEWINDOW_UNITS

The units of the time limit.

Array keys are the number of seconds, array values are the Unicode CLDR names of these numbers of seconds.

Properties

protected int|null $ipAccessControlCategoryID

The IP Access Control Category identifier.

protected string $handle

The IP Access Control Category handle.

protected string $name

The IP Access Control Category name.

protected Package|null $package

The package that defines this IP Access Control Category.

protected bool $enabled

Is this IP Access Control Category enabled?

protected int $maxEvents

The maximum allowed events in the time window.

protected int|null $timeWindow

The time window (in seconds) where the events should be counted (NULL means no limits).

protected int|null $banDuration

The duration (in seconds) of the ban when the maximum number of events occur in the time window (NULL means forever).

protected bool $siteSpecific

Is this IP Access Control Category site-specific?

protected string $logChannelHandle

The log channel handle.

protected ArrayCollection|IpAccessControlEvent[] $events

The list of recorded events associated to this category.

protected ArrayCollection|IpAccessControlRange[] $ranges

The list of defined ranges associated to this category.

Methods

__construct()

Initialize the instance.

int|null
getIpAccessControlCategoryID()

Get the IP Access Control Category identifier.

string
getHandle()

Get the IP Access Control handle.

$this
setHandle(string $value)

Set the IP Access Control handle.

string
getName()

Get the IP Access Control name.

string
getDisplayName()

Get the IP Access Control display name.

$this
setName(string $value)

Set the IP Access Control name.

Package|null
getPackage()

Get the package that defines this IP Access Control Category.

$this
setPackage(Package $value = null)

Set the package that defines this IP Access Control Category.

bool
isEnabled()

Is this IP Access Control Category enabled?

$this
setEnabled(bool $value)

Is this IP Access Control Category enabled?

int
getMaxEvents()

Get the maximum allowed events in the time window.

$this
setMaxEvents(int $value)

Set the maximum allowed events in the time window.

int|null
getTimeWindow()

Get the time window (in seconds) where the events should be counted (NULL means no limits).

$this
setTimeWindow(int|null $value)

Get the time window (in seconds) where the events should be counted (NULL means no limits).

int|null
getBanDuration()

Get the duration (in seconds) of the ban when the maximum number of events occur in the time window (NULL means forever).

$this
setBanDuration(int|null $value)

Set the duration (in seconds) of the ban when the maximum number of events occur in the time window (NULL means forever).

bool
isSiteSpecific()

Is this IP Access Control Category site-specific?

$this
setSiteSpecific(bool $value)

Is this IP Access Control Category site-specific?

string
getLogChannelHandle()

Get the log channel handle (empty string if log is disabled).

$this
setLogChannelHandle(string $value)

Set the log channel handle (empty string if log is disabled).

ArrayCollection|IpAccessControlEvent[]
getEvents()

Get the list of recorded events associated to this category.

ArrayCollection|IpAccessControlRange[]
getRanges()

Get the list of defined ranges associated to this category.

static array|null
splitTimeWindow(int|null $timeWindow)

Get the representation of a time window expressed in seconds.

string
describeTimeWindow()

No description

Details

__construct()

Initialize the instance.

int|null getIpAccessControlCategoryID()

Get the IP Access Control Category identifier.

Return Value

int|null

returns NULL when the record has not been saved yet

string getHandle()

Get the IP Access Control handle.

Return Value

string

$this setHandle(string $value)

Set the IP Access Control handle.

Parameters

string $value

Return Value

$this

string getName()

Get the IP Access Control name.

Return Value

string

string getDisplayName()

Get the IP Access Control display name.

Return Value

string

$this setName(string $value)

Set the IP Access Control name.

Parameters

string $value

Return Value

$this

Package|null getPackage()

Get the package that defines this IP Access Control Category.

Return Value

Package|null

$this setPackage(Package $value = null)

Set the package that defines this IP Access Control Category.

Parameters

Package $value

Return Value

$this

bool isEnabled()

Is this IP Access Control Category enabled?

Return Value

bool

$this setEnabled(bool $value)

Is this IP Access Control Category enabled?

Parameters

bool $value

Return Value

$this

int getMaxEvents()

Get the maximum allowed events in the time window.

Return Value

int

$this setMaxEvents(int $value)

Set the maximum allowed events in the time window.

Parameters

int $value

Return Value

$this

int|null getTimeWindow()

Get the time window (in seconds) where the events should be counted (NULL means no limits).

Return Value

int|null

$this setTimeWindow(int|null $value)

Get the time window (in seconds) where the events should be counted (NULL means no limits).

Parameters

int|null $value

Return Value

$this

int|null getBanDuration()

Get the duration (in seconds) of the ban when the maximum number of events occur in the time window (NULL means forever).

Return Value

int|null

$this setBanDuration(int|null $value)

Set the duration (in seconds) of the ban when the maximum number of events occur in the time window (NULL means forever).

Parameters

int|null $value

Return Value

$this

bool isSiteSpecific()

Is this IP Access Control Category site-specific?

Return Value

bool

$this setSiteSpecific(bool $value)

Is this IP Access Control Category site-specific?

Parameters

bool $value

Return Value

$this

string getLogChannelHandle()

Get the log channel handle (empty string if log is disabled).

Return Value

string

$this setLogChannelHandle(string $value)

Set the log channel handle (empty string if log is disabled).

Parameters

string $value

Return Value

$this

ArrayCollection|IpAccessControlEvent[] getEvents()

Get the list of recorded events associated to this category.

Return Value

ArrayCollection|IpAccessControlEvent[]

ArrayCollection|IpAccessControlRange[] getRanges()

Get the list of defined ranges associated to this category.

Return Value

ArrayCollection|IpAccessControlRange[]

static array|null splitTimeWindow(int|null $timeWindow)

Get the representation of a time window expressed in seconds.

Parameters

int|null $timeWindow

Return Value

array|null

index 0 is the number of the new units, index 1 is the Unicode CLSR name of the number of seconds in the new units (one of the keys returned by getTimeWindowUnits). If the time window is empty, you'll get NULL

Examples

splitTimeWindowUnits(300) returns [5, 'duration/minute']

string describeTimeWindow()

No description

Return Value

string