CountLimiter implements iLimiter
Class CountLimiter
Table of Contents
Interfaces
- iLimiter
- Interface iLimiter
Methods
- __construct() : mixed
- Limitation constructor.
- create() : static
- Create instance.
- getAvailable() : int
- Get current limit rate.
- getCaption() : string
- Get caption.
- getCurrent() : int
- Get current limit rate.
- getInitialLimit() : int
- Get initial limit.
- getLimit() : int
- Get limit rate.
- getName() : string
- Get name.
- getParameter() : mixed|null
- Get parameter.
- getText() : string
- Get text.
- getTimestamp() : int
- Get timestamp of current period.
- getUnit() : string
- Get unit.
- getUnitInterval() : int
- Create unit interval.
- getUnitName() : string
- Get unit name.
- inc() : $this
- Inc current limit rate.
- isHidden() : bool
- Returns true if limiter should be hidden on the CRM-marketing settings page
- setHidden() : $this
- Set limiter hidden.
- setParameter() : $this
- Set parameter.
- withCaption() : $this
- With caption.
- withCurrent() : $this
- Set current.
- withInterval() : $this
- With time interval in seconds.
- withLimit() : $this
- With limit.
- withName() : $this
- With name.
- withUnit() : $this
- With unit.
- withUnitName() : $this
- With unit name.
Methods
__construct()
Limitation constructor.
public
__construct() : mixed
create()
Create instance.
public
static create() : static
Return values
staticgetAvailable()
Get current limit rate.
public
getAvailable() : int
Return values
intgetCaption()
Get caption.
public
getCaption() : string
Return values
stringgetCurrent()
Get current limit rate.
public
getCurrent() : int
Return values
intgetInitialLimit()
Get initial limit.
public
getInitialLimit() : int
Return values
intgetLimit()
Get limit rate.
public
getLimit() : int
Return values
intgetName()
Get name.
public
getName() : string
Return values
stringgetParameter()
Get parameter.
public
getParameter(string $name) : mixed|null
Parameters
- $name : string
-
Name.
Return values
mixed|nullgetText()
Get text.
public
getText() : string
Return values
stringgetTimestamp()
Get timestamp of current period.
public
getTimestamp() : int
Return values
intgetUnit()
Get unit.
public
getUnit() : string
Return values
stringgetUnitInterval()
Create unit interval.
public
static getUnitInterval(string $unit) : int
Parameters
- $unit : string
-
Unit.
Return values
intgetUnitName()
Get unit name.
public
getUnitName() : string
Return values
stringinc()
Inc current limit rate.
public
inc([int $amount = 1 ]) : $this
Parameters
- $amount : int = 1
-
Amount.
Tags
Return values
$thisisHidden()
Returns true if limiter should be hidden on the CRM-marketing settings page
public
isHidden() : bool
Tags
Return values
boolsetHidden()
Set limiter hidden.
public
setHidden(bool $hidden) : $this
Parameters
- $hidden : bool
Return values
$thissetParameter()
Set parameter.
public
setParameter(string $name, mixed $value) : $this
Parameters
- $name : string
-
Name.
- $value : mixed
-
Value.
Return values
$thiswithCaption()
With caption.
public
withCaption(string $caption) : $this
Parameters
- $caption : string
-
Caption.
Return values
$thiswithCurrent()
Set current.
public
withCurrent(callable $callable) : $this
Parameters
- $callable : callable
-
Callable.
Tags
Return values
$thiswithInterval()
With time interval in seconds.
public
withInterval(int $interval) : $this
Parameters
- $interval : int
-
Time interval.
Return values
$thiswithLimit()
With limit.
public
withLimit(int $limit) : $this
Parameters
- $limit : int
-
Limit.
Return values
$thiswithName()
With name.
public
withName(string $name) : $this
Parameters
- $name : string
-
Name.
Return values
$thiswithUnit()
With unit.
public
withUnit(string $unit) : $this
Parameters
- $unit : string
-
Unit.
Return values
$thiswithUnitName()
With unit name.
public
withUnitName(string $unitName) : $this
Parameters
- $unitName : string
-
Unit.