__construct() public method

Creates a new repository.
public __construct ( string $path, string $baseDirectory, boolean $validateJson = false, Puli\Repository\Api\ChangeStream\ChangeStream $changeStream = null )
$path string The path to the JSON file. If relative, it must be relative to the base directory.
$baseDirectory string The base directory of the store. Paths inside that directory are stored as relative paths. Paths outside that directory are stored as absolute paths.
$validateJson boolean Whether to validate the JSON file against the schema. Slow but spots problems.
$changeStream Puli\Repository\Api\ChangeStream\ChangeStream If provided, the repository will append resource changes to this change stream.
Example #1
0
 /**
  * Creates a new repository.
  *
  * @param string $path          The path to the JSON file. If relative, it
  *                              must be relative to the base directory.
  * @param string $baseDirectory The base directory of the store. Paths
  *                              inside that directory are stored as relative
  *                              paths. Paths outside that directory are
  *                              stored as absolute paths.
  * @param bool   $validateJson  Whether to validate the JSON file against
  *                              the schema. Slow but spots problems.
  */
 public function __construct($path, $baseDirectory, $validateJson = false)
 {
     // Does not accept ChangeStream objects
     // The ChangeStream functionality is implemented by the repository itself
     parent::__construct($path, $baseDirectory, $validateJson);
 }