Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/contao-community-alliance/dc-general-data-provider-php-globals-config-file
https://github.com/contao-community-alliance/dc-general-data-provider-php-globals-config-file
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/contao-community-alliance/dc-general-data-provider-php-globals-config-file
- Owner: contao-community-alliance
- Created: 2014-03-17T17:10:06.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-03-16T12:30:47.000Z (almost 7 years ago)
- Last Synced: 2024-04-26T01:04:57.272Z (9 months ago)
- Language: PHP
- Size: 5.86 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PHP GLOBALS configuration file provider
=======================================This data provider for the [dc-general](https://github.com/contao-community-alliance/dc-general) load and store the
data in the PHP `$GLOBALS` array, using a single php file.DCA Usage example
-----------------```php
use ContaoCommunityAlliance\DcGeneral\DataProvider\PhpGlobalsConfigFileProvider;$GLOBALS['TL_DCA']['my_dca'] = array
(
'config' => array(
'dataContainer' => 'General',
),
'dca_config' => array
(
'data_provider' => array
(
'default' => array
(
'class' => 'ContaoCommunityAlliance\DcGeneral\DataProvider\PhpGlobalsConfigFileProvider',/**
* The source filename.
*/
'source' => 'path/to/the/config.php',/**
* The namespace definition (default=null, optional).
*/
'namespace' => 'my/dca',/**
* The property key name pattern (default="*", optional).
*/
'pattern' => 'my_*',/**
* Save mode (default="diff", optional)
*/
'mode' => PhpGlobalsConfigFileProvider::MODE_ALL,
)
),
),
);
```Output example
--------------The produces file look like this:
```php