Documentation

Ipaddress_Controller
in package

IP addresses.

Tags
subpackage

Ipaddress

version
7.x
author

Hostmake LLC

copyright

© 2005-2022 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

$instance  : mixed
The singleton instances.
$_cacheName  : string
Cache name
clearCache()  : self
Clear ipaddresses cache
instance()  : object
Register an existing instance as a singleton.
ipCheck()  : bool
Check IP in CIDR
isBackendBlocked()  : bool
Check is IP blocked in Backend
isBlocked()  : bool
Check is IP blocked in Frontend

Properties

$instance

The singleton instances.

public static mixed $instance = \NULL

$_cacheName

Cache name

protected string $_cacheName = 'ipaddresses'

Methods

clearCache()

Clear ipaddresses cache

public clearCache() : self
Return values
self

instance()

Register an existing instance as a singleton.

public static instance() : object
Return values
object

ipCheck()

Check IP in CIDR

public ipCheck(string $ip, strin $cidr) : bool
Parameters
$ip : string

IP

$cidr : strin

CIDR (Classless Inter-Domain Routing)

Return values
bool

isBackendBlocked()

Check is IP blocked in Backend

public isBackendBlocked(mixed $ip) : bool
Parameters
$ip : mixed

array of IPs or IP

Return values
bool

isBlocked()

Check is IP blocked in Frontend

public isBlocked(mixed $ip) : bool
Parameters
$ip : mixed

array of IPs or IP

Return values
bool

Search results