Omeka_Plugin_Ini

Package: Plugin

class Omeka_Plugin_Ini

Responsible for parsing the plugin.ini file for any given plugin.

property _pluginsRootDir

protected string

Plugins directory.

property _configs

protected array

Set of Zend_Config_Ini objects corresponding to each plugin.

__construct($pluginsRootDir)
Parameters:
  • $pluginsRootDir (string) – Plugins directory.

getPluginIniValue($pluginDirName, $iniKeyName)

Retrieve a value in plugin.ini for a given key.

Will return a null value if no value can be found in the ini file for the key.

Parameters:
  • $pluginDirName (string) – Plugin name.

  • $iniKeyName (string) – INI key to retrieve.

Returns:

string|null Retrieved INI value (null if not found).

hasPluginIniFile($pluginDirName)

Return whether a plugin has a plugin.ini file

Parameters:
  • $pluginDirName (string) – Plugin name.

Returns:

bool

getPluginIniFilePath($pluginDirName)

Return the path to the plugin.ini file

Parameters:
  • $pluginDirName (string) – Plugin name.

Returns:

string

load(Plugin $plugin)

Initialize a Plugin model object with the values from the INI file.

Parameters:
  • $plugin (Plugin) – The plugin model to initialize.