namespace Org\Mxchange\CoreFramework\Filesystem\Text;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filesystem\File\BaseTextFile;
+// Import SPL stuff
+use \SplFileInfo;
+
/**
* A general text input file class
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
* @param $className Name of the class
* @return void
*/
- protected function __construct ($className) {
+ protected function __construct (string $className) {
// Call parent constructor
parent::__construct($className);
}
/**
* Initializes this text file for reading
*
- * @param $fileName File's name
+ * @param $infoInstance An instance of a SplFileInfo class
* @return void
*/
- protected function initFile ($fileName) {
+ protected function initFile (SplFileInfo $infoInstance) {
// Get a file i/o pointer instance
- $pointerInstance = ObjectFactory::createObjectByConfiguredName('text_file_input_class', array($fileName));
+ $pointerInstance = ObjectFactory::createObjectByConfiguredName('text_file_input_class', array($infoInstance));
// ... and set it here
$this->setPointerInstance($pointerInstance);