PHP Class OptionsMock

Inheritance: extends Pressbooks\Options
Show file Open project: pressbooks/pressbooks

Public Properties

Property Type Description
$currentVersion integer The value for option: pressbooks_mock_options_version
$defaults array Export defaults.
$options array Export options.

Public Methods

Method Description
__construct ( array $options ) Constructor.
display ( ) Display the mock options page description.
filterDefaults ( array $defaults ) : array Filter the array of default values for this set of options
getBooleanOptions ( ) : array Get an array of options which return booleans.
getDefaults ( )
getFloatOptions ( ) : array Get an array of options which return floats.
getIntegerOptions ( ) : array Get an array of options which return integers.
getPredefinedOptions ( ) : array Get an array of options which return predefined values.
getSlug ( ) : string Get the slug for the mock options page.
getStringOptions ( ) : array Get an array of options which return strings.
getTitle ( ) : string Get the localized title of the mock options page.
init ( )
render ( )
upgrade ( $version )

Method Details

__construct() public method

Constructor.
public __construct ( array $options )
$options array The retrieved options.

display() public method

Display the mock options page description.
public display ( )

filterDefaults() static public method

Filter the array of default values for this set of options
static public filterDefaults ( array $defaults ) : array
$defaults array The input array of default values.
return array $defaults

getBooleanOptions() static public method

Get an array of options which return booleans.
static public getBooleanOptions ( ) : array
return array $options

getDefaults() static public method

static public getDefaults ( )

getFloatOptions() static public method

Get an array of options which return floats.
static public getFloatOptions ( ) : array
return array $options

getIntegerOptions() static public method

Get an array of options which return integers.
static public getIntegerOptions ( ) : array
return array $options

getPredefinedOptions() static public method

Get an array of options which return predefined values.
static public getPredefinedOptions ( ) : array
return array $options

getSlug() static public method

Get the slug for the mock options page.
static public getSlug ( ) : string
return string $slug

getStringOptions() static public method

Get an array of options which return strings.
static public getStringOptions ( ) : array
return array $options

getTitle() static public method

Get the localized title of the mock options page.
static public getTitle ( ) : string
return string $title

init() public method

public init ( )

render() public method

public render ( )

upgrade() public method

public upgrade ( $version )

Property Details

$currentVersion static public property

The value for option: pressbooks_mock_options_version
See also: upgrade()
static public int $currentVersion
return integer

$defaults public property

Export defaults.
public array $defaults
return array

$options public property

Export options.
public array $options
return array