BaseController
class BaseController extends Controller
The class BaseController is the heart the simulation engine
Properties
ControllersHelper | $helper | ||
Simulator | $simu | ||
protected Parser | $parser | ||
protected bool | $error | ||
protected int | $recursion | ||
protected array | $simuWidgets | ||
protected array | $variables | ||
protected array | $memo | ||
protected mixed|null | $sources | ||
protected array | $log | ||
protected int | $script | ||
protected array | $sequence | ||
protected string | $path | ||
array | $uricache | ||
string | $databasesDir | ||
string | $simulatorsDir | ||
string | $publicDir | ||
string | $viewsDir |
Methods
Run the simulation engine for a step
Adds a widget to the list of widgets
Adds widgets that depend on a widget in the list of widgets
Returns the simulators attributes in JSON response format
Returns the requested source attributes in JSON response format
Get the simulators directory
Evaluates a condition with the expression parser
Evaluates the default value of all data
Evaluates the minimum and the maximum value of all data
Evaluates the conditions of a business rule an executes the suitable actions
Evaluates the conditions of all business rules an executes the suitable actions
Processes all data for the step
Details
at line 219
protected Response|Step|null
runStep(Request $request, array $form, string $simu, string $view, bool $test)
Run the simulation engine for a step
at line 510
protected void
addWidget(string $widget)
Adds a widget to the list of widgets
at line 526
protected void
widgetDeps(string $widget, array $widgets, array $availWidgets)
Adds widgets that depend on a widget in the list of widgets
at line 547
protected Response
runFields(Request $request, string $simu, bool $test = false)
Returns the simulators attributes in JSON response format
at line 568
protected Response
runSource(Request $request, string $simu, bool $test = false)
Returns the requested source attributes in JSON response format
at line 614
protected string
getSimuPath(string $simu, bool $test = false)
Get the simulators directory
at line 642
protected void
checkField(Field $field, array $form, bool $skipValidation)
Checks the given field
at line 702
protected void
processField(Field $field, Step $step, bool $displayable)
Processes the given field for the step
at line 752
protected void
replaceFieldNotes(Field $field)
Replaces data values in the notes of a field
at line 772
protected string|false
evaluate(string $condition)
Evaluates a condition with the expression parser
at line 788
protected void
evaluateDefault(Data $data)
Evaluates the default value of the given data
at line 807
protected void
evaluateDefaults()
Evaluates the default value of all data
at line 829
protected void
evaluateMin(Data $data)
Evaluates the minimum value of the given data
at line 851
protected void
evaluateMax(Data $data)
Evaluates the maximum value of the given data
at line 872
protected void
evaluateMinMax()
Evaluates the minimum and the maximum value of all data
at line 896
protected void
processData(Data $data, int $istep)
Processes the given data for the step
at line 995
protected void
processActions(Action $actions, int $istep)
Executes all the actions of a business rule of the step
at line 1195
protected void
processRule(BusinessRule $businessrule, int $istep)
Evaluates the conditions of a business rule an executes the suitable actions
at line 1214
protected void
processRules(int $istep)
Evaluates the conditions of all business rules an executes the suitable actions
at line 1230
protected void
processDatas(int $istep)
Processes all data for the step