PHP Class Pommo_Api, poMMo

Show file Open project: soonick/poMMo Class Usage Examples

Public Methods

Method Description
configGet ( $arg ) * configGet Gets specified config value(s) from the DB.
configGetBase ( ) * configGetBase Returns Base Configuration Data
configUpdate ( $input, $force = FALSE ) $input must be an array as key:value ([config_name] => config_value)
getAttachmentsWithNames ( $attachments ) : array Get attachments names based on attachment indexes
getParams ( $defaults, $args ) * getParams Merges default and given params
stateInit ( $name = 'default', $defaults = [], $source = [] ) * stateInit initializes a page state
stateReset ( $state = [] ) returns (bool)

Method Details

configGet() static public method

Pass a single or array of config_names, returns array name->value.
static public configGet ( $arg )

configGetBase() public static method

* configGetBase Returns Base Configuration Data
public static configGetBase ( )

configUpdate() static public method

$input must be an array as key:value ([config_name] => config_value)
static public configUpdate ( $input, $force = FALSE )

getAttachmentsWithNames() public static method

Get attachments names based on attachment indexes
public static getAttachmentsWithNames ( $attachments ) : array
return array $result = Array with attachments details: array( array( 'id' => 1, 'name' => 'file.txt' ), array( 'id' => 2, 'name' => 'image.jpg' ) )

getParams() public static method

* getParams Merges default and given params
public static getParams ( $defaults, $args )

stateInit() static public method

* stateInit initializes a page state
static public stateInit ( $name = 'default', $defaults = [], $source = [] )

stateReset() public method

returns (bool)
public stateReset ( $state = [] )