| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
die( 'You are not allowed to call this page directly.' ); |
| 5 |
} |
| 6 |
|
| 7 |
/** |
| 8 |
* This class keeps a static record of field type options for each type. |
| 9 |
* The result is stored in memory so it can be re-used. |
| 10 |
* |
| 11 |
* @since 6.9.1 |
| 12 |
*/ |
| 13 |
class FrmFieldTypeOptionData { |
| 14 |
|
| 15 |
/** |
| 16 |
* @var array |
| 17 |
*/ |
| 18 |
private static $data = array(); |
| 19 |
|
| 20 |
/** |
| 21 |
* @param string $type |
| 22 |
* |
| 23 |
* @return array |
| 24 |
*/ |
| 25 |
public static function get_field_types( $type ) { |
| 26 |
if ( ! isset( self::$data[ $type ] ) ) { |
| 27 |
self::$data[ $type ] = FrmFieldsHelper::get_field_types( $type ); |
| 28 |
} |
| 29 |
return self::$data[ $type ]; |
| 30 |
} |
| 31 |
} |
| 32 |
|