68 public function addRule($type, $prompt = NULL, $value = NULL) {
69 if ($type instanceof
Rule) {
72 $this->customRules[] = $type;
73 $this->hasCustomRules =
true;
75 } elseif (\is_array($type)) {
79 $rule =
new Rule($type, $prompt, $value);
81 $rule =
new Rule($type, $prompt, $value);
83 $this->rules[] = $rule;
87 #[\ReturnTypeWillChange] 93 if ($this->optional) {
94 $result[
"optional"] =
true;
96 if (isset($this->depends)) {
113 if ($this->hasCustomRules) {
114 foreach ($this->customRules as $rule) {
static getValue($array, $key, $pos)
addRule($type, $prompt=NULL, $value=NULL)
setIdentifier($identifier)
Ajax$CustomRule This class is part of phpmv-ui.