Use this adapter if you want to use Zend\Db
for settings persistence.
- Import the MySQL schema located in
vendor/hrevert/ht-settings-module/data/schema.sql
if you use MySQL. - Install ZfcBase by adding
"zf-commons/zfc-base": "0.1.*"
to require section of composer.json - Add the following config:
return [
'ht_settings' => [
// This is optional.
// You can specify this is config/autoload/ht-settings-module.global.php
'parameter_entity_class' => 'HtSettingsModule\Entity\IdAwareParameter',
]
];
Use this adapter if you want to store settings in XML format.
- Install flysystem and Zend\Config.
- Add the following config:
return [
'ht_settings' => [
// This is optional.
// You can specify this in config/autoload/ht-settings-module.global.php
'storage_path' => 'data/settings',
],
'service_manager' => [
'aliases' => [
'HtSettingsModule_SettingsMapper' => 'HtSettingsModule\Mapper\XmlSettingsMapper',
]
]
];
Use this adapter if you want to store settings in JSON format.
return [
'ht_settings' => [
// This is optional.
// You can specify this in config/autoload/ht-settings-module.global.php
'storage_path' => 'data/settings',
],
'service_manager' => [
'aliases' => [
'HtSettingsModule_SettingsMapper' => 'HtSettingsModule\Mapper\JsonSettingsMapper',
]
]
];