*/
private $configVariables = array();
- /**
- * The language instance which should link to an object of LanguageSystem
- */
- private $langInstance = null;
-
/**
* Loaded templates for recursive protection and detection
*/
* @throws BasePathReadProtectedException If $basePath is
* read-protected
*/
- public final static function createTemplateEngine ($basePath, $langInstance, $ioInstance) {
+ public final static function createTemplateEngine ($basePath, ManageableLanguage $langInstance, FileIOHandler $ioInstance) {
// Get a new instance
$tplInstance = new TemplateEngine();
// Set the language and IO instances
$tplInstance->setLanguageInstance($langInstance);
- $tplInstance->setIOInstance($ioInstance);
+ $tplInstance->setFileIOInstance($ioInstance);
// Set template extensions
$tplInstance->setRawTemplateExtension($cfgInstance->readConfig("raw_template_extension"));
$this->varStack = new FrameworkArrayObject();
}
- /**
- * Setter for language instance which should be LanguageSystem
- *
- * @param $langInstance The language instance
- * @return void
- */
- public final function setLanguageInstance (ManageableLanguage $langInstance) {
- $this->langInstance = $langInstance;
- }
-
- /**
- * Setter for file I/O instance which should be FileIOHandler
- *
- * @param $ioInstance The file I/O instance
- * @return void
- */
- public final function setIOInstance (FileIOHandler $ioInstance) {
- $this->ioInstance = $ioInstance;
- }
-
- /**
- * Getter for file I/O instance which should be FileIOHandler
- *
- * @return $ioInstance The file I/O instance
- */
- public final function getIOInstance () {
- return $this->ioInstance;
- }
-
/**
* Setter for base path
*
// Construct the FQFN for the template by honoring the current language
$fqfn = sprintf("%s%s/%s/%s%s",
$this->getBasePath(),
- $this->langInstance->getLanguageCode(),
+ $this->getLanguageInstance()->getLanguageCode(),
$this->getTemplateType(),
$template,
$ext
));
// Get a input/output instance from the middleware
- $ioInstance = $this->getIOInstance();
+ $ioInstance = $this->getFileIOInstance();
// Validate the instance
if (is_null($ioInstance)) {