getString(0), order: $result->getInteger(1), name: $result->getString(2), title: $result->getString(3), regex: $result->getString(4), ); } public function getId(): string { return $this->id; } public function getOrder(): int { return $this->order; } public function getName(): string { return $this->name; } public function getTitle(): string { return $this->title; } public function getRegEx(): string { return $this->regex; } public function checkValue(string $value): bool { return preg_match($this->regex, $value) === 1; } public function matchValue(string $value): string|false { return preg_match($this->regex, $value, $matches) === 1 ? $matches[1] : false; } }