MethodAttribute.php 408 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace ePHPic\View\Attributes;
  3. use ePHPic\View\EnumAttribute;
  4. class MethodAttribute extends EnumAttribute
  5. {
  6. protected function getValidValues(): array
  7. {
  8. return [
  9. "post", "get", "put", "delete"
  10. ];
  11. }
  12. protected function name(): string
  13. {
  14. return "method";
  15. }
  16. public function __toString(): string
  17. {
  18. return $this->value;
  19. }
  20. }