Свойство | Тип | Описание | |
---|---|---|---|
$parseResult | |||
$runResult | |||
$variables |
Метод | Описание | |
---|---|---|
addRule ( string $type, array $rule ) : void | Adds a rule to the result list | |
escapePercent ( string $str ) : string | Escapes percent string to be used in format string. | |
getParseResult ( ) : mixed | Get parseResult | |
getRunResult ( ) : mixed | Get runResult | |
getVariables ( ) : mixed | Get variables | |
parseRulesFile ( ) : array | Reads the rule file into an array, throwing errors messages on syntax errors. | |
ruleExprEvaluate ( string $expr ) : integer | Runs a code expression, replacing variable names with their respective values | |
run ( ) : array | Parses and executes advisor rules | |
runRules ( ) : boolean | Executes advisor rules | |
setParseResult ( array $parseResult ) : |
Set parseResult | |
setRunResult ( array $runResult ) : |
Set runResult | |
setVariable ( string | integer $variable, mixed $value ) | Set a variable and its value | |
setVariables ( array $variables ) : |
Set variables | |
splitJustification ( array $rule ) : string[] | Splits justification to text and formula. | |
storeError ( string $description, Exception $exception ) : void | Stores current error in run results. | |
translate ( string $str, string $param = null ) : string | Wrapper function for translating. |
Метод | Описание | |
---|---|---|
replaceLinkURL ( array $matches ) : string | Callback for wrapping links with PMA_linkURL | |
ruleExprEvaluateFired ( array $matches ) : string | Callback for evaluating fired() condition. | |
ruleExprEvaluateVariable ( array $matches ) : string | Callback for evaluating variables in expression. |
public static escapePercent ( string $str ) : string | ||
$str | string | string to escape |
Результат | string |
public static parseRulesFile ( ) : array | ||
Результат | array | with parsed data |
public ruleExprEvaluate ( string $expr ) : integer | ||
$expr | string | expression to evaluate |
Результат | integer | result of evaluated expression |
public setParseResult ( array $parseResult ) : |
||
$parseResult | array | Parse result |
Результат |
public setRunResult ( array $runResult ) : |
||
$runResult | array | Run result |
Результат |
public setVariables ( array $variables ) : |
||
$variables | array | Variables |
Результат |
public static splitJustification ( array $rule ) : string[] | ||
$rule | array | the rule |
Результат | string[] |
public storeError ( string $description, Exception $exception ) : void | ||
$description | string | description of an error. |
$exception | Exception | exception raised |
Результат | void |