return $this->imageInstance;
}
- /**
- * Initializes the template engine instance
- *
- * @param $applicationInstance An instance of a manageable application
- * @return void
- */
- public final function initTemplateEngine (ManageableApplication $applicationInstance) {
- // Get config instance
- $cfg = FrameworkBootstrap::getConfigurationInstance();
-
- // Set new template engine
- $cfg->setConfigEntry('html_template_class' , $cfg->getConfigEntry('image_template_class'));
- $cfg->setConfigEntry('raw_template_extension' , '.img');
- $cfg->setConfigEntry('code_template_extension', '.xml');
- $cfg->setConfigEntry('tpl_base_path' , 'templates/images/');
- // @TODO Please fix this
- $cfg->setConfigEntry('code_template_type' , 'image');
-
- // Get a prepared instance
- $this->setTemplateInstance($this->prepareTemplateInstance($applicationInstance));
- }
-
/**
* Adds a cookie to the response
*
* @todo If the return statement is removed and setcookie() commented out,
* @todo this will send only one cookie out, the first one.
*/
- public function addCookie ($cookieName, $cookieValue, $encrypted = false, $expires = NULL) {
+ public function addCookie (string $cookieName, $cookieValue, bool $encrypted = FALSE, int $expires = NULL) {
// Are headers already sent?
if (headers_sent()) {
// Throw an exception here
throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
- } // END - if
+ }
// Shall we encrypt the cookie?
- if ($encrypted === true) {
+ if ($encrypted) {
// Unsupported at the moment
$this->partialStub('Encryption is unsupported at the moment.');
- } // END - if
+ }
// For slow browsers set the cookie array element first
$_COOKIE[$cookieName] = $cookieValue;