07-enum_converter.php 490 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace cx_newsletter;
  3. abstract class enum_converter
  4. implements enum_converter_interface {
  5. public function __construct() {
  6. }
  7. public function load_enum(mixed $target) : self {
  8. $this->target = $target;
  9. return $this;
  10. }
  11. public function get_enum() : mixed {
  12. return $this->target;
  13. }
  14. public abstract function load_string(string $target) : self;
  15. public abstract function get_string() : string;
  16. protected mixed $target;
  17. }