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

feat: redis driver #6

Merged
merged 4 commits into from
Jul 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
helye
azuradara committed Jul 13, 2024
commit 475bb8f5f794e149f79569a9a0916bdfa5fd52f3
10 changes: 8 additions & 2 deletions src/FogGen.php
Original file line number Diff line number Diff line change
@@ -9,13 +9,19 @@ class FogGen
{
/**
* @param string $path The config's dotted path
* @param string $separator
*
* @return callable
*/
public static function inconfig(string $path): callable
public static function inconfig(string $path, string $separator = ','): callable
{
return function ($context) use ($path) {
return function ($context) use ($path, $separator) {
$config = config($path, []);

if (is_string($config)) {
$config = splode($config, $separator);
}

if (in_array('*', $config)) {
return true;
}