Свойство | Тип | Описание | |
---|---|---|---|
$adapters_dir | |||
$app | |||
$options_memory | |||
$override_memory | internal array to hold options in cache | ||
$table_prefix | |||
$tables | array to hold options values that are not persistent in DB and changed on runtime |
Метод | Описание | |
---|---|---|
__construct ( $app = null ) | ||
_create_mw_default_options ( ) | ||
delete ( $key, $option_group = false, $module_id = false ) | ||
get ( $key, $option_group = false, $return_full = false, $orderby = false, $module = false ) | Getting options from the database. | |
get_all ( $params = '' ) | ||
get_by_id ( $id ) | ||
get_groups ( $is_system = false ) | ||
get_items_per_page ( $group = 'website' ) | ||
override ( $option_group, $key, $value ) | ||
save ( $data ) | You can use this function to store options in the database. | |
set_default ( $data ) | ||
set_table_names ( $tables = false ) |
public get ( $key, $option_group = false, $return_full = false, $orderby = false, $module = false ) | ||
$key | array|string - if array it will replace the db params | |
$option_group | string - your option group | |
$return_full | bool - if true it will return the whole db row as array rather then just the value | |
$module | string - if set it will store option for module Example usage: $this->get('my_key', 'my_group'); |
public save ( $data ) | ||
$data | array|string Example usage: $option = array(); $option['option_value'] = 'my value'; $option['option_key'] = 'my_option'; $option['option_group'] = 'my_option_group'; mw()->option_manager->save($option); |