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

"array" missing as possible param type in Cascade::fileConfig #70

Open
cheeZery opened this issue Dec 22, 2016 · 1 comment
Open

"array" missing as possible param type in Cascade::fileConfig #70

cheeZery opened this issue Dec 22, 2016 · 1 comment

Comments

@cheeZery
Copy link
Contributor

In the PHP DocBlock for the method \Cascade\Cascade::fileConfig() "array" is missing as a valid type for $resource, as the param descriptions states.

/**
 * Load configuration options from a file or a string
 *
 * @param string $resource Path to config file or string or array
 */
public static function fileConfig($resource)
{
    self::$config = new Config($resource, new ConfigLoader());
    self::$config->load();
    self::$config->configure();
}

Maybe there should be another method which only expects an array, which is called something like "setConfig"(?)

@rantonmattei
Copy link
Contributor

Thanks for reporting this. The doc needs to be fixed indeed.

Regarding your other point. I'm aware of this. I started with a config file then extended to more resource types.
I'll fix that when I get a chance or feel free to shoot a PR 😁

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

2 participants