RockLobsterInc\Swv\Rules

AllRule::toArray │ public │ CF7 1.0

Returns an array that represents the rule properties.

Метод класса: AllRule{}

Хуков нет.

Возвращает

array. Array of rule properties.

Использование

$AllRule = new AllRule();
$AllRule->toArray(): array;

Код AllRule::toArray() CF7 6.2.4.1

public function toArray(): array
{
    $rules = [];

    foreach ($this->rules() as $rule) {
        $rules[] = $rule->toArray();
    }

    return [
        "rule" => self::RULE_NAME,
        "field" => $this->field,
        "error" => $this->error,
        "rules" => $rules,
    ];
}