GoogleApiPush
FinalYes
Old API
Table of Contents
Constants
- TYPE_CONNECTION = 'CONNECTION'
- TYPE_SECTION = 'SECTION'
Methods
- checkPushChannel() : mixed
- checkSectionsPush() : mixed
- clearPushChannels() : null|string
- Stop all push channels agent Recommended interval - 60 sec. Response from google not required
- createWatchChannels() : string
- Creates and renew watch channels for connections Recommended interval = 1 hour, for push enable - recommended interval 3 minutes
- deletePushChannel() : void
- getConnectionPushByConnectionId() : array<string|int, mixed>|false
- getPush() : array<string|int, mixed>|null
- isAuthError() : bool
- isConnectionError() : bool
- isSyncTokenExpiresError() : bool
- isWrongChannel() : bool
- processIncomingPush() : void
- Handles incoming push for entity - runs synchronization for connection or for section
- processPush() : mixed
- Agent method. Does nothing, just for compatibility
- receivePushSignal() : void
- renewWatchChannels() : mixed
- Checks connection and ability to create push channel Recommended agent interval = 4h
- setBlockPush() : void
- setUnblockPush() : void
- setUnprocessedPush() : void
- stopChannel() : void
Constants
TYPE_CONNECTION
public
mixed
TYPE_CONNECTION
= 'CONNECTION'
TYPE_SECTION
public
mixed
TYPE_SECTION
= 'SECTION'
Methods
checkPushChannel()
public
static checkPushChannel([int $lastIdConnection = 0 ]) : mixed
Parameters
- $lastIdConnection : int = 0
checkSectionsPush()
public
static checkSectionsPush(mixed $localSections, mixed $userId, mixed $connectionId) : mixed
Parameters
- $localSections : mixed
- $userId : mixed
- $connectionId : mixed
clearPushChannels()
Stop all push channels agent Recommended interval - 60 sec. Response from google not required
public
static clearPushChannels() : null|string
Return values
null|stringcreateWatchChannels()
Creates and renew watch channels for connections Recommended interval = 1 hour, for push enable - recommended interval 3 minutes
public
static createWatchChannels([int $start = 0 ]) : string
Parameters
- $start : int = 0
Return values
stringdeletePushChannel()
public
static deletePushChannel(array<string|int, mixed> $row) : void
Parameters
- $row : array<string|int, mixed>
Tags
getConnectionPushByConnectionId()
public
static getConnectionPushByConnectionId(int $id) : array<string|int, mixed>|false
Parameters
- $id : int
Tags
Return values
array<string|int, mixed>|falsegetPush()
public
static getPush(string $type, int $entityId) : array<string|int, mixed>|null
Parameters
- $type : string
- $entityId : int
Return values
array<string|int, mixed>|nullisAuthError()
public
static isAuthError([string $lastResult = null ]) : bool
Parameters
- $lastResult : string = null
Return values
boolisConnectionError()
public
static isConnectionError([string $lastResult = null ]) : bool
Parameters
- $lastResult : string = null
Return values
boolisSyncTokenExpiresError()
public
static isSyncTokenExpiresError([string $lastResult = null ]) : bool
Parameters
- $lastResult : string = null
Return values
boolisWrongChannel()
public
static isWrongChannel([string $error = null ]) : bool
Parameters
- $error : string = null
Return values
boolprocessIncomingPush()
Handles incoming push for entity - runs synchronization for connection or for section
public
static processIncomingPush(string $entityType, int $entityId) : void
Parameters
- $entityType : string
- $entityId : int
processPush()
Agent method. Does nothing, just for compatibility
public
static processPush() : mixed
receivePushSignal()
public
static receivePushSignal(mixed $channelId, mixed $resourceId) : void
Parameters
- $channelId : mixed
- $resourceId : mixed
renewWatchChannels()
Checks connection and ability to create push channel Recommended agent interval = 4h
public
static renewWatchChannels() : mixed
setBlockPush()
public
static setBlockPush(string $type, int $entityId) : void
Parameters
- $type : string
- $entityId : int
setUnblockPush()
public
static setUnblockPush(string $type, int $entityId) : void
Parameters
- $type : string
- $entityId : int
setUnprocessedPush()
public
static setUnprocessedPush(string $type, int $entityId) : void
Parameters
- $type : string
- $entityId : int
stopChannel()
public
static stopChannel([array<string|int, mixed>|null $row = null ][, int $ownerId = 0 ]) : void
Parameters
- $row : array<string|int, mixed>|null = null
- $ownerId : int = 0