Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ReadFactory.php
Go to the documentation of this file.
1 <?php
7 
9 
11 {
17  private $driverPool;
18 
24  public function __construct(DriverPool $driverPool)
25  {
26  $this->driverPool = $driverPool;
27  }
28 
36  public function create($path, $driverCode = DriverPool::FILE)
37  {
38  $driver = $this->driverPool->getDriver($driverCode);
39  $factory = new \Magento\Framework\Filesystem\File\ReadFactory(
40  $this->driverPool
41  );
42 
43  return new Read(
44  $factory,
45  $driver,
46  $path,
47  new PathValidator($driver)
48  );
49  }
50 }
create($path, $driverCode=DriverPool::FILE)
Definition: ReadFactory.php:36