Apix\Plugin\PluginAbstract

class Apix\Plugin\PluginAbstract
property $adapter

Holds a plugin’s adapter.

Var:closure|object
property $options

Holds an array of plugin’s options.

Var:array
__construct()

Constructor

Parameters:
  • $options (mix) – Array of options
checkAdapterClass()

Checks the plugin’s adapter comply to a class/interface

Parameters:
  • $adapter (object) –
  • $class (object) –
Throws:

\RuntimeException

Returns:

true

setOptions()

Sets and merge the defaults options for this plugin

Parameters:
  • $options (mix) – Array of options if it is an object set as an adapter
getOptions()

Gets this plugin’s options

Returns:array
setAdapter()

Sets this plugin’s adapter

Parameters:
  • $adapter (closure|object) –
getAdapter()

Gets this plugin’s adapter

Returns:mix
log()

Just a shortcut for now. This is TEMP and will be moved elsewhere! TODO: TEMP to refactor