Converter extends Stepper implements IConverter
Class Converter
Table of Contents
Interfaces
Constants
- CONTINUE_EXECUTION = true
- DELAY_COEFFICIENT = 0.5
- FINISH_EXECUTION = false
- THRESHOLD_TIME = 20.0
Methods
- __destruct() : mixed
- bind() : void
- Adds agent for current class.
- bindClass() : void
- Adds agent for class $className for $moduleId module. Example for updater: \Bitrix\Main\Stepper::bindClass('\Bitrix\SomeModule\SomeClass', 'somemodule').
- checkRequest() : void
- Just method to check request.
- createInstance() : Stepper
- Just a fabric method.
- execAgent() : string
- Executes an agent.
- execute() : bool
- Executes some action, and if return value is false, agent will be deleted.
- getHtml() : string
- Returns HTML to show updates.
- getModuleId() : string
- Wrap-function to get moduleId.
- getOuterParams() : array<string|int, mixed>
- getTitle() : mixed
- isCompleted() : bool
- isMigrated() : bool
- makeArguments() : string
- It is possible to pass only integer and string values for now. But you can make your own method or extend this one.
- runMigration() : void
- setOuterParams() : void
- showMigrationProgress() : void
Constants
CONTINUE_EXECUTION
public
mixed
CONTINUE_EXECUTION
= true
DELAY_COEFFICIENT
public
mixed
DELAY_COEFFICIENT
= 0.5
FINISH_EXECUTION
public
mixed
FINISH_EXECUTION
= false
THRESHOLD_TIME
public
mixed
THRESHOLD_TIME
= 20.0
Methods
__destruct()
public
__destruct() : mixed
Does nothing.
bind()
Adds agent for current class.
public
static bind([int $delay = 300 ][, array<string|int, mixed> $withArguments = [] ]) : void
Parameters
- $delay : int = 300
-
Delay for running agent
- $withArguments : array<string|int, mixed> = []
-
Data that will available in $stepper->outerParams
bindClass()
Adds agent for class $className for $moduleId module. Example for updater: \Bitrix\Main\Stepper::bindClass('\Bitrix\SomeModule\SomeClass', 'somemodule').
public
static bindClass(string $className, string $moduleId[, int $delay = 300 ][, array<string|int, mixed> $withArguments = [] ]) : void
Parameters
- $className : string
-
Class like \Bitrix\SomeModule\SomeClass extends Stepper.
- $moduleId : string
-
Module ID like somemodule.
- $delay : int = 300
-
Delay for running agent
- $withArguments : array<string|int, mixed> = []
checkRequest()
Just method to check request.
public
static checkRequest() : void
createInstance()
Just a fabric method.
public
static createInstance() : Stepper
Return values
StepperexecAgent()
Executes an agent.
public
static execAgent() : string
Return values
stringexecute()
Executes some action, and if return value is false, agent will be deleted.
public
execute(mixed &$option) : bool
Parameters
- $option : mixed
-
Array with main data to show if it is necessary like {steps : 35, count : 7}, where steps is an amount of iterations, count - current position.
Tags
Return values
boolgetHtml()
Returns HTML to show updates.
public
static getHtml([array<string|int, mixed>|string $ids = [] ][, string $title = "" ]) : string
Parameters
- $ids : array<string|int, mixed>|string = []
- $title : string = ""
Return values
stringgetModuleId()
Wrap-function to get moduleId.
public
static getModuleId() : string
Return values
stringgetOuterParams()
public
getOuterParams() : array<string|int, mixed>
Return values
array<string|int, mixed>getTitle()
public
static getTitle() : mixed
Tags
isCompleted()
public
static isCompleted() : bool
Return values
boolisMigrated()
public
static isMigrated() : bool
Return values
boolmakeArguments()
It is possible to pass only integer and string values for now. But you can make your own method or extend this one.
public
static makeArguments([array<string|int, mixed> $arguments = [] ]) : string
Parameters
- $arguments : array<string|int, mixed> = []
Return values
stringrunMigration()
public
static runMigration() : void
setOuterParams()
public
setOuterParams(array<string|int, mixed> $outerParams) : void
Parameters
- $outerParams : array<string|int, mixed>
showMigrationProgress()
public
static showMigrationProgress() : void