base.php
5 years ago
get-from-db.php
5 years ago
get-from-field.php
5 years ago
num-range.php
5 years ago
base.php
33 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Jet_Form_Builder\Generators; |
| 4 | |
| 5 | abstract class Base { |
| 6 | |
| 7 | /** |
| 8 | * Returns generator ID |
| 9 | * |
| 10 | * @return [type] [description] |
| 11 | */ |
| 12 | abstract public function get_id(); |
| 13 | |
| 14 | /** |
| 15 | * Returns generator name |
| 16 | * |
| 17 | * @return [type] [description] |
| 18 | */ |
| 19 | abstract public function get_name(); |
| 20 | |
| 21 | /** |
| 22 | * Returns generated options list |
| 23 | * |
| 24 | * @return array |
| 25 | */ |
| 26 | abstract public function generate( $field ); |
| 27 | |
| 28 | public function can_generate() { |
| 29 | return true; |
| 30 | } |
| 31 | |
| 32 | } |
| 33 |