PHP Class Microweber\Providers\OptionManager

Afficher le fichier Open project: microweber/microweber

Méthodes publiques

Свойство Type Description
$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

Méthodes publiques

Méthode Description
__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 )

Method Details

__construct() public méthode

public __construct ( $app = null )

_create_mw_default_options() public méthode

delete() public méthode

public delete ( $key, $option_group = false, $module_id = false )

get() public méthode

Getting options from the database.
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');

get_all() public méthode

public get_all ( $params = '' )

get_by_id() public méthode

public get_by_id ( $id )

get_groups() public méthode

public get_groups ( $is_system = false )

get_items_per_page() public méthode

public get_items_per_page ( $group = 'website' )

override() public méthode

public override ( $option_group, $key, $value )

save() public méthode

You can use this function to store options in the database.
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);

set_default() public méthode

public set_default ( $data )

set_table_names() public méthode

public set_table_names ( $tables = false )

Property Details

$adapters_dir public_oe property

public $adapters_dir

$app public_oe property

public $app

$options_memory public_oe property

public $options_memory

$override_memory public_oe property

internal array to hold options in cache
public $override_memory

$table_prefix public_oe property

public $table_prefix

$tables public_oe property

array to hold options values that are not persistent in DB and changed on runtime
public $tables