Amiro.CMS API Reference
Amiro.Ru / Manual
Loading search...

The AMI_ModSettings class

• Introduction

Module setting manipulation class.

• Class synopsis

AMI_ModSettings {
/* Methods */
// Free options cache to optimize memory usage.
public static freeOptions ( string $modId, [ string $source = 'modules' ] ) returns void;
// Loads and returns module options/option.
public static getOptions ( string $modId, [ string $name = '' ], [ bool $standalone = FALSE ], [ bool $autofree = FALSE ], [ bool $forceLoad = FALSE ] ) returns mixed;
// Saves standalone option.
public static saveStandaloneOption ( string $modId, string $name, mixed $value, [ int $forceShortValue = NULL ] ) returns void;
}
Tags:
since 6.0.2

• Class Methods

// Free options cache to optimize memory usage.
public static freeOptions ( string $modId, [ string $source = 'modules' ] ) returns void;
  • string $modId
    Module Id
  • string $source
    'standalone' | 'modules'
// Loads and returns module options/option.
public static getOptions ( string $modId, [ string $name = '' ], [ bool $standalone = FALSE ], [ bool $autofree = FALSE ], [ bool $forceLoad = FALSE ] ) returns mixed;
  • string $modId
    Module Id
  • string $name
    Option name, if empty string passed, all options will be returned
  • bool $standalone
    Flag specifying to load stanalone option
  • bool $autofree
    Flag specifying to free options cache before returning value
  • bool $forceLoad
    Flag specifying to force load value from DB (since 6.0.6)
// Saves standalone option.
public static saveStandaloneOption ( string $modId, string $name, mixed $value, [ int $forceShortValue = NULL ] ) returns void;
  • string $modId
    Module Id
  • string $name
    Option name
  • mixed $value
    Option value, NULL to delete option
  • int $forceShortValue
    Will be described later
Tags:
todo Describe $forceShortValue parameter
since 6.0.6