Bitrix API

Usage

Table of Contents

Methods

__construct()  : mixed
decrement()  : void
Decrements usage count for specific date and time.
deleteForUser()  : void
Finally removes all records for the user.
increment()  : void
Increments usage count for specific date and time.
isInLimit()  : bool
Checks that current request is in limits.

Methods

__construct()

public __construct(Context $context) : mixed
Parameters
$context : Context

decrement()

Decrements usage count for specific date and time.

public decrement(int $value[, DateTime|null $time = null ]) : void
Parameters
$value : int

Changed count.

$time : DateTime|null = null

Datetime for period.

deleteForUser()

Finally removes all records for the user.

public static deleteForUser(int $userId) : void
Parameters
$userId : int

User id.

increment()

Increments usage count for specific date and time.

public increment(int $value[, DateTime|null $time = null ]) : void
Parameters
$value : int

Changed count.

$time : DateTime|null = null

Datetime for period.

isInLimit()

Checks that current request is in limits.

public isInLimit([string|null &$limitCode = null ][, int $cost = self::DEFAULT_COST ]) : bool
Parameters
$limitCode : string|null = null

Will be returned code of limit.

$cost : int = self::DEFAULT_COST
Return values
bool

        
On this page

Search results