You are here

public static function BasicPath::factory in AmazonS3 7.2

Create an array of BasicPaths.

Parameters

array $patterns: An array of regular expression patterns to use when creating the basic path.

Return value

BasicPath[] An array of BasicPaths.

11 calls to BasicPath::factory()
BasicPathTest::testFactory in tests/Matchable/BasicPathTest.php
@covers Drupal\amazons3\Matchable\BasicPath::factory @covers Drupal\amazons3\Matchable\BasicPath::__construct @covers Drupal\amazons3\Matchable\BasicPath::getPath
MatchablePathsTest::testImplode in tests/Matchable/MatchablePathsTest.php
@covers Drupal\amazons3\Matchable\MatchablePaths::__construct @covers Drupal\amazons3\Matchable\MatchablePaths::__toString
MatchablePathsTest::testMatch in tests/Matchable/MatchablePathsTest.php
@covers Drupal\amazons3\Matchable\MatchablePaths::match
MatchablePathsTest::testNoMatch in tests/Matchable/MatchablePathsTest.php
@covers Drupal\amazons3\Matchable\MatchablePaths::match
StreamWrapperConfiguration::fromDrupalVariables in src/StreamWrapperConfiguration.php
Set the stream wrapper configuration using Drupal variables.

... See full list

1 method overrides BasicPath::factory()
PresignedPath::factory in src/Matchable/PresignedPath.php
Create an array of PresignedPaths.

File

src/Matchable/BasicPath.php, line 31

Class

BasicPath
A path pattern to use when testing URL paths.

Namespace

Drupal\amazons3\Matchable

Code

public static function factory(array $patterns) {
  $basicPaths = array();
  foreach ($patterns as $pattern) {
    $basicPaths[] = new static($pattern);
  }
  return $basicPaths;
}