| | |
| | | protected string $description = ''; |
| | | protected string $icon = ''; |
| | | protected array $fields = []; |
| | | protected Registrar $registrar; |
| | | private Registrar $registrar; |
| | | |
| | | public function __construct(string $title, Registrar $registrar) { |
| | | $this->title = $title; |
| | | $this->slug = sanitize_title($title); |
| | | public function __construct(string $slug, Registrar $registrar) { |
| | | $this->slug = sanitize_title($slug); |
| | | $this->registrar = $registrar; |
| | | } |
| | | |
| | |
| | | } |
| | | public function getTitle():string |
| | | { |
| | | return $this->title; |
| | | return $this->title ?? ucwords(implode(' ', explode('-', $this->slug))); |
| | | } |
| | | |
| | | public function setDescription(string $description):self |
| | |
| | | $this->icon = $icon; |
| | | return $this; |
| | | } |
| | | public function getIcon():string |
| | | { |
| | | return $this->icon; |
| | | } |
| | | |
| | | protected function checkFields(string|array $fields):string|array |
| | | { |