| 1 |
<?php |
| 2 |
namespace YayMail\Abstracts; |
| 3 |
|
| 4 |
/** |
| 5 |
* BasePattern Class |
| 6 |
*/ |
| 7 |
abstract class BasePattern { |
| 8 |
protected $id = null; |
| 9 |
public const TYPE = ''; |
| 10 |
|
| 11 |
protected $section = null; |
| 12 |
|
| 13 |
protected $available = true; |
| 14 |
protected $position = 10; |
| 15 |
protected $name = ''; |
| 16 |
protected $elements = []; |
| 17 |
|
| 18 |
public function get_data() { |
| 19 |
return [ |
| 20 |
'id' => $this->id, |
| 21 |
'type' => static::TYPE, |
| 22 |
'section' => $this->section, |
| 23 |
'available' => $this->available, |
| 24 |
'position' => $this->position, |
| 25 |
'elements' => $this->elements, |
| 26 |
'name' => $this->name, |
| 27 |
]; |
| 28 |
} |
| 29 |
|
| 30 |
public function get_type() { |
| 31 |
return static::TYPE; |
| 32 |
} |
| 33 |
|
| 34 |
/** |
| 35 |
* @return string |
| 36 |
*/ |
| 37 |
public function get_section() { |
| 38 |
return $this->section; |
| 39 |
} |
| 40 |
|
| 41 |
public function get_raw_data() { |
| 42 |
return $this->get_data(); |
| 43 |
} |
| 44 |
|
| 45 |
} |
| 46 |
|