rename EntityFactory for writers and readers #526
This commit is contained in:
1 parent
e1acdc1fc5
commit
8a1c48b6b0
18 files changed
+97
-97
No files matched your search
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Box\Spout\Reader\Common\Creator;
|
||||
|
||||
use Box\Spout\Reader\ReaderInterface;
|
||||
|
||||
/**
|
||||
* Class ReaderEntityFactory
|
||||
* Factory to create external entities
|
||||
*/
|
||||
class ReaderEntityFactory
|
||||
{
|
||||
/**
|
||||
* This creates an instance of the appropriate reader, given the type of the file to be read
|
||||
*
|
||||
* @param string $readerType Type of the reader to instantiate
|
||||
* @throws \Box\Spout\Common\Exception\UnsupportedTypeException
|
||||
* @return ReaderInterface
|
||||
*/
|
||||
public static function createReader($readerType)
|
||||
{
|
||||
return (new ReaderFactory())->create($readerType);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user