src/Environaut/Cache/ReadOnlyCache.php
public function getAll($groups = null, $flag = null)
    {
        $settings = array();

        if (null === $groups) {
            foreach ($this->settings as $setting) {
                $settings[] = $setting;
            }
        } elseif (is_string($groups) || is_array($groups)) {
            foreach ($this->settings as $setting) {
                if ($setting->matchesGroup($groups) && $setting->matchesFlag($flag)) {
                    $settings[] = $setting;
                }
            }
        } else {
            throw new \InvalidArgumentException(
                'Only a null value, a single string as group name or an array of group names are supported.'
            );
        }

        return $settings;
    }
public function getAll($groups = null, $flag = null)
    {
        $settings = array();

        if (null === $groups) {
            foreach ($this->settings as $setting) {
                $settings[] = $setting;
            }
        } elseif (is_string($groups) || is_array($groups)) {
            foreach ($this->settings as $setting) {
                if ($setting->matchesGroup($groups) && $setting->matchesFlag($flag)) {
                    $settings[] = $setting;
                }
            }
        } else {
            throw new \InvalidArgumentException(
                'Only a null value, a single string as group name or an array of group names are supported.'
            );
        }

        return $settings;
    }
Returns an array of settings matching the given criterias.

@param mixed $groups name of a group or array of group names or null for all settings regardless of group
@param type $flag only return settings that match the given flag value

@return array of setting instances matching the specification

@throws \InvalidArgumentException if $groups is neither null nor a string or an array