Bitrix API

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
static

getAvailable()

Get current limit rate.

public getAvailable() : int
Return values
int

getCaption()

Get caption.

public getCaption() : string
Return values
string

getCurrent()

Get current limit rate.

public getCurrent() : int
Return values
int

getInitialLimit()

Get initial limit.

public getInitialLimit() : int
Return values
int

getLimit()

Get limit rate.

public getLimit() : int
Return values
int

getName()

Get name.

public getName() : string
Return values
string

getParameter()

Get parameter.

public getParameter(string $name) : mixed|null
Parameters
$name : string

Name.

Return values
mixed|null

getText()

Get text.

public getText() : string
Return values
string

getTimestamp()

Get timestamp of current period.

public getTimestamp() : int
Return values
int

getUnit()

Get unit.

public getUnit() : string
Return values
string

getUnitInterval()

Create unit interval.

public static getUnitInterval(string $unit) : int
Parameters
$unit : string

Unit.

Return values
int

getUnitName()

Get unit name.

public getUnitName() : string
Return values
string

inc()

Inc current limit rate.

public inc([int $amount = 1 ]) : $this
Parameters
$amount : int = 1

Amount.

Tags
throws
SystemException
Return values
$this

isHidden()

Returns true if limiter should be hidden on the CRM-marketing settings page

public isHidden() : bool
Tags
inheritDoc
Return values
bool

setHidden()

Set limiter hidden.

public setHidden(bool $hidden) : $this
Parameters
$hidden : bool
Return values
$this

setParameter()

Set parameter.

public setParameter(string $name, mixed $value) : $this
Parameters
$name : string

Name.

$value : mixed

Value.

Return values
$this

withCaption()

With caption.

public withCaption(string $caption) : $this
Parameters
$caption : string

Caption.

Return values
$this

withCurrent()

Set current.

public withCurrent(callable $callable) : $this
Parameters
$callable : callable

Callable.

Tags
throws
ArgumentException
Return values
$this

withInterval()

With time interval in seconds.

public withInterval(int $interval) : $this
Parameters
$interval : int

Time interval.

Return values
$this

withLimit()

With limit.

public withLimit(int $limit) : $this
Parameters
$limit : int

Limit.

Return values
$this

withName()

With name.

public withName(string $name) : $this
Parameters
$name : string

Name.

Return values
$this

withUnit()

With unit.

public withUnit(string $unit) : $this
Parameters
$unit : string

Unit.

Return values
$this

withUnitName()

With unit name.

public withUnitName(string $unitName) : $this
Parameters
$unitName : string

Unit.

Return values
$this

        
On this page

Search results