namespace Org\Mxchange\CoreFramework\Factory\Template;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
* @param $configKey Config entry name for the template engine
* @return $templateInstance A template engine instance
*/
- public static final function createXmlTemplateEngineInstance (string $configKey): XmlTemplateEngineFactory {
+ public static final function createXmlTemplateEngineInstance (string $configKey): CompileableXmlTemplate {
// Validate parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('XML-TEMPLATE-ENGINE-FACTORY: configKey=%s - CALLED!', $configKey));
if (empty($configKey)) {
* Reads from a local file
*
* @param $infoInstance An instance of a SplFileInfo class
- * @return $array An array with the element 'header' and 'data'
+ * @return $content Raw file content
* @see FileInputStreamer
*/
- public final function loadFileContents (SplFileInfo $infoInstance): array {
+ public final function loadFileContents (SplFileInfo $infoInstance): string {
// Initialize some variables and arrays
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('FILE-IO-STREAM: infoInstance=%s - CALLED!', $infoInstance));
$inputBuffer = '';
* Reads from a local or remote file
*
* @param $infoInstance An instance of a SplFileInfo class
- * @return $array An array containing all read lines
+ * @return $content Raw file content
* @throws InvalidArrayCountException If an array has not the expected size
* @throws InvalidMD5ChecksumException If two MD5 hashes did not match
*/
- public function loadFileContents (SplFileInfo $infoInstance): array {
+ public function loadFileContents (SplFileInfo $infoInstance): string {
/*
* This class (or its implementations) are special file readers/writers.
* There is no need to read/write the whole file.
* Reads from a local or remote file
*
* @param $infoInstance An instance of a SplFileInfo class
- * @return $array An array containing all read lines
+ * @return $content Raw file content
* @throws InvalidArrayCountException If an array has not the expected size
* @throws InvalidMD5ChecksumException If two MD5 hashes did not match
*/
- function loadFileContents (SplFileInfo $infoInstance);
+ function loadFileContents (SplFileInfo $infoInstance): string;
}
/** Loads data from a file over the input handler
*
* @param $infoInstance An instance of a SplFileInfo class
- * @return $array Array with the file contents
+ * @return $content Raw file content
*/
- public function loadFileContents (SplFileInfo $infoInstance): array {
+ public function loadFileContents (SplFileInfo $infoInstance): string {
// Read from the input handler
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('FILE-IO-HANDLER: infoInstance=%s - CALLED!', $infoInstance->__toString()));
return $this->getInputStreamerInstance()->loadFileContents($infoInstance);