Arikaim CMS

RuleBuilder
in package

Rule builder

Table of Contents

Methods

__call()  : RuleInterface
Create rule
createRule()  : RuleInterface|null
Create rule from text descriptor pattern: name:param1=value|param2=value
createRules()  : array<string|int, mixed>
Create rules from array
getValidatorRuleClass()  : string
Get validator rule full class name
parseRuleDescriptor()  : array<string|int, mixed>
Parse rule descriptor pattern: name:param1=value|param2=value
parseRuleParam()  : array<string|int, mixed>
parse rule parameter pattern: name:param1 | name
parseRuleParams()  : array<string|int, mixed>
Parse rule params pattern: name:param1=value|param2=value

Methods

__call()

Create rule

public __call(string $name, array<string|int, mixed>|null $args) : RuleInterface
Parameters
$name : string
$args : array<string|int, mixed>|null
Return values
RuleInterface

createRule()

Create rule from text descriptor pattern: name:param1=value|param2=value

public static createRule(string $descriptor[, string|null $error = null ]) : RuleInterface|null
Parameters
$descriptor : string
$error : string|null = null
Return values
RuleInterface|null

createRules()

Create rules from array

public static createRules(array<string|int, mixed> $descriptor) : array<string|int, mixed>
Parameters
$descriptor : array<string|int, mixed>
Return values
array<string|int, mixed>

getValidatorRuleClass()

Get validator rule full class name

public static getValidatorRuleClass(string $baseClass) : string
Parameters
$baseClass : string
Return values
string

parseRuleDescriptor()

Parse rule descriptor pattern: name:param1=value|param2=value

public static parseRuleDescriptor(string $descriptor) : array<string|int, mixed>
Parameters
$descriptor : string
Return values
array<string|int, mixed>

parseRuleParam()

parse rule parameter pattern: name:param1 | name

public static parseRuleParam(string $param) : array<string|int, mixed>
Parameters
$param : string
Return values
array<string|int, mixed>

parseRuleParams()

Parse rule params pattern: name:param1=value|param2=value

public static parseRuleParams(string $params) : array<string|int, mixed>
Parameters
$params : string
Return values
array<string|int, mixed>

        
On this page

Search results