Singleton class. Stores instances of other objects, process data cache, event handlers.

This class has a set of getters which return objects that affect performance logic.

Event capturing via onDriverCollectClasses can pass its own classes to be used instead of standard classes.


Method Description Available from version
public static function getInstance(): Driver Returns object instance.
public function getFactory(): Factory Returns instance Bitrix\Rpa\Factory.
public function getUserId(): int Returns current user identifier. When not found (code is excited on agent), then returns 0.
public function getType(int $typeId): ?Type Returns process by its ID $typeId.

Its recommended to use this method for specifically getting a process object, because process data are cached and uploaded from the database only once.

public function getUserPermissions(int $userId = null): UserPermissions Returns instance of user permissions with ID $userId.

When $userId is empty, it will be retrieved from $this->getUserId().

public function getUrlManager(): UrlManager Returns instance of address manager.
public function getDirector(): Director Returns instance of scenario manager.
public function getTaskManager(): ?TaskManager Returns authorization manager, when available.
public function getPullManager(): PullManager Returns instance of push manager.
public function isAutomationEnabled(): bool Returns true, when automation is accessible (installs module bizproc).
public function deleteAllData(): Result Deletes all elements, stages and processes. Called when deleting module.

This method is required for correctly deleting associated data, specifically files from disk and b_file.

© «Bitrix24», 2001-2022