Eloquent\Phony\Matcher\MatcherFactory::adaptAll PHP Метод

adaptAll() публичный Метод

Create new matchers for the all supplied values.
public adaptAll ( array $values ) : array
$values array The values to create matchers for.
Результат array
    public function adaptAll(array $values)
    {
        $matchers = array();
        foreach ($values as $value) {
            if ($value instanceof Matcher || $value instanceof WildcardMatcher) {
                $matchers[] = $value;
                continue;
            }
            if (is_object($value)) {
                foreach ($this->driverIndex as $className => $driver) {
                    if (is_a($value, $className)) {
                        $matchers[] = $driver->wrapMatcher($value);
                        continue 2;
                    }
                }
            }
            if ('*' === $value) {
                $matchers[] = $this->wildcardAnyMatcher;
            } elseif ('~' === $value) {
                $matchers[] = $this->anyMatcher;
            } else {
                $matchers[] = new EqualToMatcher($value, true, $this->exporter);
            }
        }
        return $matchers;
    }