projects
/
core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Class template for template engines updated
[core.git]
/
inc
/
classes
/
main
/
template
/
class_
diff --git
a/inc/classes/main/template/class_
b/inc/classes/main/template/class_
index 0a26f17e924a702e58c09db0d82125104f61720a..271558093f478b55af491b1c61c8febb2422b74c 100644
(file)
--- a/
inc/classes/main/template/class_
+++ b/
inc/classes/main/template/class_
@@
-35,8
+35,8
@@
class ???TemplateEngine extends BaseTemplateEngine implements CompileableTemplat
/**
* Creates an instance of the class TemplateEngine and prepares it for usage
*
/**
* Creates an instance of the class TemplateEngine and prepares it for usage
*
- * @param $appInstance A manageable application
- * @return $t
plInstance
An instance of TemplateEngine
+ * @param $appInstance
A manageable application
+ * @return $t
emplateInstance
An instance of TemplateEngine
* @throws BasePathIsEmptyException If the provided $templateBasePath is empty
* @throws InvalidBasePathStringException If $templateBasePath is no string
* @throws BasePathIsNoDirectoryException If $templateBasePath is no
* @throws BasePathIsEmptyException If the provided $templateBasePath is empty
* @throws InvalidBasePathStringException If $templateBasePath is no string
* @throws BasePathIsNoDirectoryException If $templateBasePath is no
@@
-44,51
+44,40
@@
class ???TemplateEngine extends BaseTemplateEngine implements CompileableTemplat
* @throws BasePathReadProtectedException If $templateBasePath is
* read-protected
*/
* @throws BasePathReadProtectedException If $templateBasePath is
* read-protected
*/
- public final static function create???TemplateEngine (ManageableApplication $appInstance) {
+ public final static function create???TemplateEngine (ManageableApplication $app
lication
Instance) {
// Get a new instance
// Get a new instance
- $tplInstance = new ???TemplateEngine();
-
- // Get language and file I/O instances from application
- $langInstance = $appInstance->getLanguageInstance();
- $ioInstance = $appInstance->getFileIoInstance();
+ $templateInstance = new ???TemplateEngine();
// Determine base path
// Determine base path
- $templateBasePath = $t
plInstance->getConfigInstance()->getConfigEntry('application_base_path') . $app
Instance->getRequestInstance()->getRequestElement('app') . '/';
+ $templateBasePath = $t
emplateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $application
Instance->getRequestInstance()->getRequestElement('app') . '/';
// Is the base path valid?
if (empty($templateBasePath)) {
// Base path is empty
// Is the base path valid?
if (empty($templateBasePath)) {
// Base path is empty
- throw new BasePathIsEmptyException($t
pl
Instance, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+ throw new BasePathIsEmptyException($t
emplate
Instance, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
} elseif (!is_string($templateBasePath)) {
// Is not a string
} elseif (!is_string($templateBasePath)) {
// Is not a string
- throw new InvalidBasePathStringException(array($t
pl
Instance, $templateBasePath), self::EXCEPTION_INVALID_STRING);
+ throw new InvalidBasePathStringException(array($t
emplate
Instance, $templateBasePath), self::EXCEPTION_INVALID_STRING);
} elseif (!is_dir($templateBasePath)) {
// Is not a path
} elseif (!is_dir($templateBasePath)) {
// Is not a path
- throw new BasePathIsNoDirectoryException(array($t
pl
Instance, $templateBasePath), self::EXCEPTION_INVALID_PATH_NAME);
+ throw new BasePathIsNoDirectoryException(array($t
emplate
Instance, $templateBasePath), self::EXCEPTION_INVALID_PATH_NAME);
} elseif (!is_readable($templateBasePath)) {
// Is not readable
} elseif (!is_readable($templateBasePath)) {
// Is not readable
- throw new BasePathReadProtectedException(array($t
pl
Instance, $templateBasePath), self::EXCEPTION_READ_PROTECED_PATH);
+ throw new BasePathReadProtectedException(array($t
emplate
Instance, $templateBasePath), self::EXCEPTION_READ_PROTECED_PATH);
}
}
- // Get configuration instance
- $configInstance = FrameworkConfiguration::getInstance();
-
// Set the base path
// Set the base path
- $tplInstance->setTemplateBasePath($templateBasePath);
-
- // Set the language and IO instances
- $tplInstance->setLanguageInstance($langInstance);
- $tplInstance->setFileIoInstance($ioInstance);
+ $templateInstance->setTemplateBasePath($templateBasePath);
// Set template extensions
// Set template extensions
- $t
plInstance->setRawTemplateExtension($configInstance
->getConfigEntry('raw_template_extension'));
- $t
plInstance->setCodeTemplateExtension($configInstance
->getConfigEntry('code_template_extension'));
+ $t
emplateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()
->getConfigEntry('raw_template_extension'));
+ $t
emplateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()
->getConfigEntry('code_template_extension'));
// Absolute output path for compiled templates
// Absolute output path for compiled templates
- $t
plInstance->setCompileOutputPath($configInstance->getConfigEntry('base_path') . $configInstance
->getConfigEntry('compile_output_path'));
+ $t
emplateInstance->setCompileOutputPath($templateInstance->getConfigInstance()->getConfigEntry('base_path') . $templateInstance->getConfigInstance()
->getConfigEntry('compile_output_path'));
// Return the prepared instance
// Return the prepared instance
- return $t
pl
Instance;
+ return $t
emplate
Instance;
}
}
}
}