コード例 #1
0
ファイル: PathMapping.php プロジェクト: sensorario/manager
 /**
  * Creates a new path mapping.
  *
  * @param string          $repositoryPath The repository path.
  * @param string|string[] $pathReferences The path references.
  *
  * @throws InvalidArgumentException If any of the arguments is invalid.
  */
 public function __construct($repositoryPath, $pathReferences)
 {
     Assert::path($repositoryPath);
     $pathReferences = (array) $pathReferences;
     Assert::notEmpty($pathReferences, 'At least one filesystem path must be passed.');
     Assert::allString($pathReferences, 'The filesystem paths must be strings. Got: %s');
     Assert::allNotEmpty($pathReferences, 'The filesystem paths must not be empty.');
     $this->repositoryPath = $repositoryPath;
     $this->pathReferences = $pathReferences;
 }