You are here

public function MatchablePaths::match in AmazonS3 7.2

Return the first object that matches a subject.

Overrides Matchable::match

File

src/Matchable/MatchablePaths.php, line 35

Class

MatchablePaths
A list of paths that can be matched against a regular expression.

Namespace

Drupal\amazons3\Matchable

Code

public function match($subject) {
  foreach ($this->paths as $path) {
    if ($path
      ->match($subject)) {
      return $path;
    }
  }
  return FALSE;
}