PHP Class AdminPageFrameworkLoader_Option

Since: 3.5.0
Datei anzeigen Open project: michaeluno/admin-page-framework Class Usage Examples

Public Properties

Property Type Description
$aInstances Stores instances by option key.
$aOptions Stores the option values.

Protected Properties

Property Type Description
$bIsNetworkAdmin Stores whether the currently loading page is in the network admin area.
$sOptionKey stores the option key for this plugin.

Public Methods

Method Description
__construct ( $sOptionKey ) Sets up properties.
delete ( ) Deletes the option from the database.
get ( ) Returns the specified option value.
getInstance ( $sOptionKey = '' ) Returns the instance of the class.
hasUpgraded ( ) : boolean Checks the version number
save ( $aOptions = null ) Saves the options.
set ( ) Sets the options.
update ( ) Sets and save the options.

Private Methods

Method Description
_getFormattedOptions ( $sOptionKey ) Returns the formatted options array.
_getVersionByDepth ( $sVersion, $iDepth = 2 ) Returns a stating part of version by the given depth.

Method Details

__construct() public method

Sets up properties.
public __construct ( $sOptionKey )

delete() public method

Deletes the option from the database.
public delete ( )

get() public method

Returns the specified option value.
Since: 3.5.0
public get ( )

getInstance() public static method

This is to ensure only one instance exists.
Since: 3.5.0
public static getInstance ( $sOptionKey = '' )

hasUpgraded() public method

Checks the version number
Since: 3.5.0
public hasUpgraded ( ) : boolean
return boolean True if yes; otherwise, false.

save() public method

Saves the options.
public save ( $aOptions = null )

set() public method

Sets the options.
public set ( )

update() public method

Sets and save the options.
public update ( )

Property Details

$aInstances public_oe static_oe property

Stores instances by option key.
Since: 3.5.0
public static $aInstances

$aOptions public_oe property

Stores the option values.
public $aOptions

$bIsNetworkAdmin protected_oe property

Stores whether the currently loading page is in the network admin area.
protected $bIsNetworkAdmin

$sOptionKey protected_oe property

stores the option key for this plugin.
protected $sOptionKey