ComponentCustomAttribute.php 410 B

123456789101112131415161718192021
  1. <?php
  2. namespace ePHPic\View\Attributes;
  3. use ePHPic\View\CustomAttribute;
  4. class ComponentCustomAttribute extends CustomAttribute
  5. {
  6. protected function getSuffix(): string
  7. {
  8. return "component";
  9. }
  10. protected function validate($value): bool
  11. {
  12. return is_string($value) || is_null($value);
  13. }
  14. public function __toString(): string
  15. {
  16. return $this->value;
  17. }
  18. }