Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New configuration widget for people from other frameworks/libraries #128

Closed
twinh opened this issue Aug 8, 2013 · 0 comments
Closed

New configuration widget for people from other frameworks/libraries #128

twinh opened this issue Aug 8, 2013 · 0 comments
Milestone

Comments

@twinh
Copy link
Owner

twinh commented Aug 8, 2013

For most people come from other frameworks/libraries, they are familiar with the configuration like below

return array(
    'domain' => 'http://example.com',
    'isSiteOpen' => true,
    'closeTips' => 'Sorry, we are maintaining, please wait a moment',
    'cacheDriver' => 'apc',
    'maxCacheTime' => 5,
);

It's not the recommend way to write configuration in widget, for we do not know which configuration is used in which class.
However, I think I should add a new widget to support this kind of configuration, it's really good for some application and when you work with others. :)

return array(
    'widget' => array(
        'xx' => 'xx'
    ),
    // name `config` may conflict with widget()->config
    'config' => array(
       // Move your old configuration here...
       'domain' => 'http://example.com',
       'isSiteOpen' => true,
       'closeTips' => 'Sorry, we are maintaining, please wait a moment',
       'cacheDriver' => 'apc',
       'maxCacheTime' => 5,
    )
);

Noted: website widget is good enough but have a bad name.

@twinh twinh closed this as completed in d4f9200 Aug 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant