Config

Categories

Component ID

2471355

Component name

Config

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

1219

Component created

Component changed

Component body

Config provides a basic API for providing configuration from files (PHP, JSON, YAML) for Drupal 7.

Config is unlikely to get a release for 8.x.

Usage

<?php
// Load the Config class.
$config = DrupalconfigConfig::load();

// Supports JSON, PHP, and optionally YAML. Want XML? Its extensible.
$parser_type = CONFIG_PARSER_JSON;

// Get the Config.
return $config->getConfig('my_module_name', 'directory_within_module', 'file_within_directory.ext', $parser_type);

?>