/**
* Assigns all the application data with template variables
*
- * @param $appInstance A manageable application instance
+ * @param $applicationInstance A manageable application instance
* @return void
*/
- function assignApplicationData (ManageableApplication $appInstance);
+ function assignApplicationData (ManageableApplication $applicationInstance);
/**
* "Compiles" a variable by replacing {?var?} with it's content
* Prepare the template engine (WebTemplateEngine by default) for a given
* application helper instance (ApplicationHelper by default).
*
- * @param $appInstance An application helper instance or
+ * @param $applicationInstance An application helper instance or
* null if we shall use the default
* @return $templateInstance The template engine instance
* @throws NullPointerException If the template engine could not
* @throws NullPointerException If the discovered application
* instance is still null
*/
- protected function prepareTemplateInstance (ManageableApplication $appInstance = null) {
+ protected function prepareTemplateInstance (ManageableApplication $applicationInstance = null) {
// Is the application instance set?
- if (is_null($appInstance)) {
+ if (is_null($applicationInstance)) {
// Get the current instance
- $appInstance = $this->getApplicationInstance();
+ $applicationInstance = $this->getApplicationInstance();
// Still null?
- if (is_null($appInstance)) {
+ if (is_null($applicationInstance)) {
// Thrown an exception
throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
} // END - if
} // END - if
// Initialize the template engine
- $templateInstance = ObjectFactory::createObjectByConfiguredName('web_template_class', array($appInstance));
+ $templateInstance = ObjectFactory::createObjectByConfiguredName('web_template_class', array($applicationInstance));
// Return the prepared instance
return $templateInstance;
$decryptedCode = $requestInstance->getRequestElement('decrypted');
// Get the application instance
- $appInstance = $this->getResolverInstance()->getApplicationInstance();
+ $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
// Prepare a template instance
- $templateInstance = $this->prepareTemplateInstance($appInstance);
+ $templateInstance = $this->prepareTemplateInstance($applicationInstance);
// Assign variable
$templateInstance->assignVariable('decrypted_code', $decryptedCode);
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get the application instance
- $appInstance = $this->getResolverInstance()->getApplicationInstance();
+ $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
// Prepare a template instance
- $templateInstance = $this->prepareTemplateInstance($appInstance);
+ $templateInstance = $this->prepareTemplateInstance($applicationInstance);
// Assign application data with template engine
- $templateInstance->assignApplicationData($appInstance);
+ $templateInstance->assignApplicationData($applicationInstance);
// Assign base URL
$templateInstance->assignConfigVariable('base_url');
// Load the master template
- $masterTemplate = $appInstance->buildMasterTemplateName();
+ $masterTemplate = $applicationInstance->buildMasterTemplateName();
// Load header template
$templateInstance->loadCodeTemplate('header');
// Construct the menu in every command. We could do this in BaseCommand class. But this means
// *every* command has a navigation system and that is want we don't want.
- $menuInstance = ObjectFactory::createObjectByConfiguredName('confirm_menu_class', array($appInstance));
+ $menuInstance = ObjectFactory::createObjectByConfiguredName('confirm_menu_class', array($applicationInstance));
// Render the menu
$menuInstance->renderMenu();
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get the application instance
- $appInstance = $this->getResolverInstance()->getApplicationInstance();
+ $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
// Prepare a template instance
- $templateInstance = $this->prepareTemplateInstance($appInstance);
+ $templateInstance = $this->prepareTemplateInstance($applicationInstance);
// Transfer application data
- $templateInstance->assignApplicationData($appInstance);
+ $templateInstance->assignApplicationData($applicationInstance);
// Load the master template
- $masterTemplate = $appInstance->buildMasterTemplateName();
+ $masterTemplate = $applicationInstance->buildMasterTemplateName();
// Load header template
$templateInstance->loadCodeTemplate('header');
// Construct the menu in every command. We could do this in BaseCommand class. But this means
// *every* command has a navigation system and that is want we don't want.
- $menuInstance = ObjectFactory::createObjectByConfiguredName('home_menu_class', array($appInstance));
+ $menuInstance = ObjectFactory::createObjectByConfiguredName('home_menu_class', array($applicationInstance));
// Render the menu
$menuInstance->renderMenu();
} // END - if
// Get the application instance
- $appInstance = $this->getResolverInstance()->getApplicationInstance();
+ $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
// Prepare a template instance
- $templateInstance = $this->prepareTemplateInstance($appInstance);
+ $templateInstance = $this->prepareTemplateInstance($applicationInstance);
// Assign base URL
$templateInstance->assignConfigVariable('base_url');
// Assign all the application's data with template variables
- $templateInstance->assignApplicationData($appInstance);
+ $templateInstance->assignApplicationData($applicationInstance);
// Load the master template
- $masterTemplate = $appInstance->buildMasterTemplateName();
+ $masterTemplate = $applicationInstance->buildMasterTemplateName();
// Load header template
$templateInstance->loadCodeTemplate('header');
// Construct the menu in every command. We could do this in BaseCommand class. But this means
// *every* command has a navigation system and that is want we don't want.
- $menuInstance = ObjectFactory::createObjectByConfiguredName('login_area_menu_class', array($appInstance));
+ $menuInstance = ObjectFactory::createObjectByConfiguredName('login_area_menu_class', array($applicationInstance));
// Render the menu
$menuInstance->renderMenu();
$registryInstance = Registry::getRegistry();
// Get our application instance from the registry
- $appInstance = $registryInstance->getInstance('application');
+ $applicationInstance = $registryInstance->getInstance('application');
// Default action is the one from configuration
- $this->actionName = $this->convertDashesToUnderscores($appInstance->getAppShortName()) . '_login_' . $this->getConfigInstance()->getConfigEntry('login_default_action');
+ $this->actionName = $this->convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . $this->getConfigInstance()->getConfigEntry('login_default_action');
// Get "action" from request
$actReq = $requestInstance->getRequestElement('action');
// Do we have a "action" parameter set?
if ((is_string($actReq)) && (!empty($actReq))) {
// Then use it with prefix
- $this->actionName = $this->convertDashesToUnderscores($appInstance->getAppShortName()) . '_login_' . $actReq;
+ $this->actionName = $this->convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . $actReq;
} // END - if
// Get application instance
Registry::getRegistry()->addInstance('extra', $this);
// Get the application instance
- $appInstance = $this->getResolverInstance()->getApplicationInstance();
+ $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
// Prepare a template instance
- $templateInstance = $this->prepareTemplateInstance($appInstance);
+ $templateInstance = $this->prepareTemplateInstance($applicationInstance);
// Assign application data with template engine
- $templateInstance->assignApplicationData($appInstance);
+ $templateInstance->assignApplicationData($applicationInstance);
// Assign base URL
$templateInstance->assignConfigVariable('base_url');
// Load the master template
- $masterTemplate = $appInstance->buildMasterTemplateName();
+ $masterTemplate = $applicationInstance->buildMasterTemplateName();
// Load header template
$templateInstance->loadCodeTemplate('header');
// Construct the menu in every command. We could do this in BaseCommand class. But this means
// *every* command has a navigation system and that is want we don't want.
- $menuInstance = ObjectFactory::createObjectByConfiguredName('login_menu_class', array($appInstance));
+ $menuInstance = ObjectFactory::createObjectByConfiguredName('login_menu_class', array($applicationInstance));
// Render the menu
$menuInstance->renderMenu();
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get the application instance
- $appInstance = $this->getResolverInstance()->getApplicationInstance();
+ $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
// Prepare a template instance
- $templateInstance = $this->prepareTemplateInstance($appInstance);
+ $templateInstance = $this->prepareTemplateInstance($applicationInstance);
// Assign application data with template engine
- $templateInstance->assignApplicationData($appInstance);
+ $templateInstance->assignApplicationData($applicationInstance);
// Load the master template
- $masterTemplate = $appInstance->buildMasterTemplateName();
+ $masterTemplate = $applicationInstance->buildMasterTemplateName();
// Load header template
$templateInstance->loadCodeTemplate('header');
// Construct the menu in every command. We could do this in BaseCommand class. But this means
// *every* command has a navigation system and that is want we don't want.
- $menuInstance = ObjectFactory::createObjectByConfiguredName('login_failed_menu_class', array($appInstance));
+ $menuInstance = ObjectFactory::createObjectByConfiguredName('login_failed_menu_class', array($applicationInstance));
// Render the menu
$menuInstance->renderMenu();
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get the application instance
- $appInstance = $this->getResolverInstance()->getApplicationInstance();
+ $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
// Prepare a template instance
- $templateInstance = $this->prepareTemplateInstance($appInstance);
+ $templateInstance = $this->prepareTemplateInstance($applicationInstance);
// Assign application data
- $templateInstance->assignApplicationData($appInstance);
+ $templateInstance->assignApplicationData($applicationInstance);
// Load the master template
- $masterTemplate = $appInstance->buildMasterTemplateName();
+ $masterTemplate = $applicationInstance->buildMasterTemplateName();
// Load header template
$templateInstance->loadCodeTemplate('header');
// Construct the menu in every command. We could do this in BaseCommand class. But this means
// *every* command has a navigation system and that is want we don't want.
- $menuInstance = ObjectFactory::createObjectByConfiguredName('logout_menu_class', array($appInstance));
+ $menuInstance = ObjectFactory::createObjectByConfiguredName('logout_menu_class', array($applicationInstance));
// Render the menu
$menuInstance->renderMenu();
Registry::getRegistry()->addInstance('extra', $this);
// Get the application instance
- $appInstance = $this->getResolverInstance()->getApplicationInstance();
+ $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
// Prepare a template instance
- $templateInstance = $this->prepareTemplateInstance($appInstance);
+ $templateInstance = $this->prepareTemplateInstance($applicationInstance);
// Assign all the application's data with template variables
- $templateInstance->assignApplicationData($appInstance);
+ $templateInstance->assignApplicationData($applicationInstance);
// Assign base URL
$templateInstance->assignConfigVariable('base_url');
// Load the master template
- $masterTemplate = $appInstance->buildMasterTemplateName();
+ $masterTemplate = $applicationInstance->buildMasterTemplateName();
// Load header template
$templateInstance->loadCodeTemplate('header');
// Construct the menu in every command. We could do this in BaseCommand class. But this means
// *every* command has a navigation system and that is want we don't want.
- $menuInstance = ObjectFactory::createObjectByConfiguredName('register_menu_class', array($appInstance));
+ $menuInstance = ObjectFactory::createObjectByConfiguredName('register_menu_class', array($applicationInstance));
// Render the menu
$menuInstance->renderMenu();
$userInstance = Registry::getRegistry()->getInstance('user');
// Get an application instance
- $appInstance = $this->getResolverInstance()->getApplicationInstance();
+ $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
// Get a RNG instance (Random Number Generator)
$rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class');
$this->getConfigInstance()->setConfigEntry('web_template_class', $this->getConfigInstance()->getConfigEntry('mail_template_class'));
// Prepare the template engine
- $templateInstance = $this->prepareTemplateInstance($appInstance);
+ $templateInstance = $this->prepareTemplateInstance($applicationInstance);
// Assign the application data with the template engine
- $templateInstance->assignApplicationData($appInstance);
+ $templateInstance->assignApplicationData($applicationInstance);
// Get a mailer class
- $mailerInstance = ObjectFactory::createObjectByConfiguredName('mailer_class', array($templateInstance, $appInstance, 'resend_link'));
+ $mailerInstance = ObjectFactory::createObjectByConfiguredName('mailer_class', array($templateInstance, $applicationInstance, 'resend_link'));
// Set this mailer in our template engine
$templateInstance->setMailerInstance($mailerInstance);
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get the application instance
- $appInstance = $this->getResolverInstance()->getApplicationInstance();
+ $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
// Prepare a template instance
- $templateInstance = $this->prepareTemplateInstance($appInstance);
+ $templateInstance = $this->prepareTemplateInstance($applicationInstance);
// Transfer application data
- $templateInstance->assignApplicationData($appInstance);
+ $templateInstance->assignApplicationData($applicationInstance);
// Load the master template
- $masterTemplate = $appInstance->buildMasterTemplateName();
+ $masterTemplate = $applicationInstance->buildMasterTemplateName();
// Load header template
$templateInstance->loadCodeTemplate('header');
// Construct the menu in every command. We could do this in BaseCommand class. But this means
// *every* command has a navigation system and that is want we don't want.
- $menuInstance = ObjectFactory::createObjectByConfiguredName('status_menu_class', array($appInstance));
+ $menuInstance = ObjectFactory::createObjectByConfiguredName('status_menu_class', array($applicationInstance));
// Render the menu
$menuInstance->renderMenu();
/**
* Assigns all the application data with template variables
*
- * @param $appInstance A manageable application instance
+ * @param $applicationInstance A manageable application instance
* @return void
*/
- public function assignApplicationData (ManageableApplication $appInstance) {
+ public function assignApplicationData (ManageableApplication $applicationInstance) {
// Call the inner class' method
- $this->getTemplateInstance()->assignApplicationData($appInstance);
+ $this->getTemplateInstance()->assignApplicationData($applicationInstance);
}
/**
/**
* Creates an instance of this mailer class
*
- * @param $templateInstance A template instance
- * @param $appInstance An application helper class
- * @param $templateName Name of email template to set
- * @return $mailerInstance An instance of this mailer class
+ * @param $templateInstance A template instance
+ * @param $applicationInstance An application helper class
+ * @param $templateName Name of email template to set
+ * @return $mailerInstance An instance of this mailer class
*/
- public static final function createDebugMailer (CompileableTemplate $templateInstance, ManageableApplication $appInstance, $templateName) {
+ public static final function createDebugMailer (CompileableTemplate $templateInstance, ManageableApplication $applicationInstance, $templateName) {
// Get a new instance
$mailerInstance = new DebugMailer();
$mailerInstance->setTemplateInstance($templateInstance);
// Set application instance
- $mailerInstance->setApplicationInstance($appInstance);
+ $mailerInstance->setApplicationInstance($applicationInstance);
// Set template name
$mailerInstance->setTemplateName('resend_link');
* Creates an instance of a Web action resolver with a given default action
*
* @param $actionName The default action we shall execute
- * @param $appInstance An instance of a manageable application helper class
+ * @param $applicationInstance An instance of a manageable application helper class
* @return $resolverInstance The prepared action resolver instance
* @throws EmptyVariableException Thrown if default action is not set
* @throws InvalidActionException Thrown if default action is invalid
*/
- public static final function createWebActionResolver ($actionName, ManageableApplication $appInstance) {
+ public static final function createWebActionResolver ($actionName, ManageableApplication $applicationInstance) {
// Create the new instance
$resolverInstance = new WebActionResolver();
}
// Set the application instance
- $resolverInstance->setApplicationInstance($appInstance);
+ $resolverInstance->setApplicationInstance($applicationInstance);
// Return the prepared instance
return $resolverInstance;
* Creates an instance of a Console command resolver with a given default command
*
* @param $commandName The default command we shall execute
- * @param $appInstance An instance of a manageable application helper class
+ * @param $applicationInstance An instance of a manageable application helper class
* @return $resolverInstance The prepared command resolver instance
* @throws EmptyVariableException Thrown if default command is not set
* @throws InvalidCommandException Thrown if default command is invalid
*/
- public static final function createConsoleCommandResolver ($commandName, ManageableApplication $appInstance) {
+ public static final function createConsoleCommandResolver ($commandName, ManageableApplication $applicationInstance) {
// Create the new instance
$resolverInstance = new ConsoleCommandResolver();
}
// Set the application instance
- $resolverInstance->setApplicationInstance($appInstance);
+ $resolverInstance->setApplicationInstance($applicationInstance);
// Return the prepared instance
return $resolverInstance;
* Creates an instance of a Image command resolver with a given default command
*
* @param $commandName The default command we shall execute
- * @param $appInstance An instance of a manageable application helper class
+ * @param $applicationInstance An instance of a manageable application helper class
* @return $resolverInstance The prepared command resolver instance
* @throws EmptyVariableException Thrown if default command is not set
* @throws InvalidCommandException Thrown if default command is invalid
*/
- public static final function createImageCommandResolver ($commandName, ManageableApplication $appInstance) {
+ public static final function createImageCommandResolver ($commandName, ManageableApplication $applicationInstance) {
// Create the new instance
$resolverInstance = new ImageCommandResolver();
}
// Set the application instance
- $resolverInstance->setApplicationInstance($appInstance);
+ $resolverInstance->setApplicationInstance($applicationInstance);
// Return the prepared instance
return $resolverInstance;
* Creates an instance of a Web command resolver with a given default command
*
* @param $commandName The default command we shall execute
- * @param $appInstance An instance of a manageable application helper class
+ * @param $applicationInstance An instance of a manageable application helper class
* @return $resolverInstance The prepared command resolver instance
* @throws EmptyVariableException Thrown if default command is not set
* @throws InvalidCommandException Thrown if default command is invalid
*/
- public static final function createWebCommandResolver ($commandName, ManageableApplication $appInstance) {
+ public static final function createWebCommandResolver ($commandName, ManageableApplication $applicationInstance) {
// Create the new instance
$resolverInstance = new WebCommandResolver();
}
// Set the application instance
- $resolverInstance->setApplicationInstance($appInstance);
+ $resolverInstance->setApplicationInstance($applicationInstance);
// Return the prepared instance
return $resolverInstance;
* Creates an instance of a resolver class with a given command
*
* @param $controllerName The controller we shall resolve
- * @param $appInstance An instance of a manageable application helper class
+ * @param $applicationInstance An instance of a manageable application helper class
* @return $resolverInstance The prepared controller resolver instance
* @throws EmptyVariableException Thrown if default command is not set
* @throws InvalidControllerException Thrown if default controller is invalid
*/
- public static final function createConsoleControllerResolver ($controllerName, ManageableApplication $appInstance) {
+ public static final function createConsoleControllerResolver ($controllerName, ManageableApplication $applicationInstance) {
// Create the new instance
$resolverInstance = new ConsoleControllerResolver();
}
// Set the application instance
- $resolverInstance->setApplicationInstance($appInstance);
+ $resolverInstance->setApplicationInstance($applicationInstance);
// Set command name
$resolverInstance->setControllerName($controllerName);
* Creates an instance of a resolver class with a given command
*
* @param $controllerName The controller we shall resolve
- * @param $appInstance An instance of a manageable application helper class
+ * @param $applicationInstance An instance of a manageable application helper class
* @return $resolverInstance The prepared controller resolver instance
* @throws EmptyVariableException Thrown if default command is not set
* @throws InvalidControllerException Thrown if default controller is invalid
*/
- public static final function createImageControllerResolver ($controllerName, ManageableApplication $appInstance) {
+ public static final function createImageControllerResolver ($controllerName, ManageableApplication $applicationInstance) {
// Create the new instance
$resolverInstance = new ImageControllerResolver();
}
// Set the application instance
- $resolverInstance->setApplicationInstance($appInstance);
+ $resolverInstance->setApplicationInstance($applicationInstance);
// Set command name
$resolverInstance->setControllerName($controllerName);
* Creates an instance of a resolver class with a given command
*
* @param $controllerName The controller we shall resolve
- * @param $appInstance An instance of a manageable application helper class
+ * @param $applicationInstance An instance of a manageable application helper class
* @return $resolverInstance The prepared controller resolver instance
* @throws EmptyVariableException Thrown if default command is not set
* @throws InvalidControllerException Thrown if default controller is invalid
*/
- public static final function createWebControllerResolver ($controllerName, ManageableApplication $appInstance) {
+ public static final function createWebControllerResolver ($controllerName, ManageableApplication $applicationInstance) {
// Create the new instance
$resolverInstance = new WebControllerResolver();
}
// Set the application instance
- $resolverInstance->setApplicationInstance($appInstance);
+ $resolverInstance->setApplicationInstance($applicationInstance);
// Set command name
$resolverInstance->setControllerName($controllerName);
/**
* Creates an object of this class
*
- * @param $appInstance An instance of a manageable application
- * @return $responseInstance A prepared instance of this class
+ * @param $applicationInstance An instance of a manageable application
+ * @return $responseInstance A prepared instance of this class
*/
- public static final function createConsoleResponse (ManageableApplication $appInstance) {
+ public static final function createConsoleResponse (ManageableApplication $applicationInstance) {
// Get a new instance
$responseInstance = new ConsoleResponse();
// Set the application instance
- $responseInstance->setApplicationInstance($appInstance);
+ $responseInstance->setApplicationInstance($applicationInstance);
// Initialize the template engine here
- $responseInstance->initTemplateEngine($appInstance);
+ $responseInstance->initTemplateEngine($applicationInstance);
// Return the prepared instance
return $responseInstance;
/**
* Initializes the template engine instance
*
- * @param $appInstance An instance of a manageable application
+ * @param $applicationInstance An instance of a manageable application
* @return void
*/
- public final function initTemplateEngine (ManageableApplication $appInstance) {
- $this->setTemplateInstance($this->prepareTemplateInstance($appInstance));
+ public final function initTemplateEngine (ManageableApplication $applicationInstance) {
+ $this->setTemplateInstance($this->prepareTemplateInstance($applicationInstance));
}
/**
/**
* Creates an object of this class
*
- * @param $appInstance An instance of a manageable application
- * @return $responseInstance A prepared instance of this class
+ * @param $applicationInstance An instance of a manageable application
+ * @return $responseInstance A prepared instance of this class
*/
- public static final function createHttpResponse (ManageableApplication $appInstance) {
+ public static final function createHttpResponse (ManageableApplication $applicationInstance) {
// Get a new instance
$responseInstance = new HttpResponse();
// Set the application instance
- $responseInstance->setApplicationInstance($appInstance);
+ $responseInstance->setApplicationInstance($applicationInstance);
// Initialize the template engine here
- $responseInstance->initTemplateEngine($appInstance);
+ $responseInstance->initTemplateEngine($applicationInstance);
// Return the prepared instance
return $responseInstance;
/**
* Initializes the template engine instance
*
- * @param $appInstance An instance of a manageable application
+ * @param $applicationInstance An instance of a manageable application
* @return void
*/
- public final function initTemplateEngine (ManageableApplication $appInstance) {
- $this->setTemplateInstance($this->prepareTemplateInstance($appInstance));
+ public final function initTemplateEngine (ManageableApplication $applicationInstance) {
+ $this->setTemplateInstance($this->prepareTemplateInstance($applicationInstance));
}
/**
/**
* Creates an object of this class
*
- * @param $appInstance An instance of a manageable application
- * @return $responseInstance A prepared instance of this class
+ * @param $applicationInstance An instance of a manageable application
+ * @return $responseInstance A prepared instance of this class
*/
- public static final function createImageResponse (ManageableApplication $appInstance) {
+ public static final function createImageResponse (ManageableApplication $applicationInstance) {
// Get a new instance
$responseInstance = new ImageResponse();
// Set the application instance
- $responseInstance->setApplicationInstance($appInstance);
+ $responseInstance->setApplicationInstance($applicationInstance);
// Initialize the template engine here
- $responseInstance->initTemplateEngine($appInstance);
+ $responseInstance->initTemplateEngine($applicationInstance);
// Return the prepared instance
return $responseInstance;
/**
* Initializes the template engine instance
*
- * @param $appInstance An instance of a manageable application
+ * @param $applicationInstance An instance of a manageable application
* @return void
*/
- public final function initTemplateEngine (ManageableApplication $appInstance) {
+ public final function initTemplateEngine (ManageableApplication $applicationInstance) {
// Get config instance
$cfg = $this->getConfigInstance();
$cfg->setConfigEntry('code_template_type' , 'image');
// Get a prepared instance
- $this->setTemplateInstance($this->prepareTemplateInstance($appInstance));
+ $this->setTemplateInstance($this->prepareTemplateInstance($applicationInstance));
}
/**
/**
* Assigns all the application data with template variables
*
- * @param $appInstance A manageable application instance
+ * @param $applicationInstance A manageable application instance
* @return void
*/
- public function assignApplicationData (ManageableApplication $appInstance) {
+ public function assignApplicationData (ManageableApplication $applicationInstance) {
// Get long name and assign it
- $this->assignVariable('app_full_name' , $appInstance->getAppName());
+ $this->assignVariable('app_full_name' , $applicationInstance->getAppName());
// Get short name and assign it
- $this->assignVariable('app_short_name', $appInstance->getAppShortName());
+ $this->assignVariable('app_short_name', $applicationInstance->getAppShortName());
// Get version number and assign it
- $this->assignVariable('app_version' , $appInstance->getAppVersion());
+ $this->assignVariable('app_version' , $applicationInstance->getAppVersion());
// Assign extra application-depending data
- $appInstance->assignExtraTemplateData($this);
+ $applicationInstance->assignExtraTemplateData($this);
}
/**
/**
* Creates an instance of the class TemplateEngine and prepares it for usage
*
- * @param $appInstance A manageable application
- * @return $templateInstance An instance of TemplateEngine
+ * @param $applicationInstance A manageable application
+ * @return $templateInstance 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 BasePathReadProtectedException If $templateBasePath is
* read-protected
*/
- public static final function createConsoleTemplateEngine (ManageableApplication $appInstance) {
+ public static final function createConsoleTemplateEngine (ManageableApplication $applicationInstance) {
// Get a new instance
$templateInstance = new ConsoleTemplateEngine();
// Determine base path
- $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+ $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
// Is the base path valid?
if (empty($templateBasePath)) {
/**
* Creates an instance of the class TemplateEngine and prepares it for usage
*
- * @param $appInstance A manageable application
- * @return $templateInstance An instance of TemplateEngine
+ * @param $applicationInstance A manageable application
+ * @return $templateInstance 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 BasePathReadProtectedException If $templateBasePath is
* read-protected
*/
- public static final function createImageTemplateEngine (ManageableApplication $appInstance) {
+ public static final function createImageTemplateEngine (ManageableApplication $applicationInstance) {
// Get a new instance
$templateInstance = new ImageTemplateEngine();
// Determine base path
- $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+ $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
// Is the base path valid?
if (empty($templateBasePath)) {
/**
* Creates an instance of the class TemplateEngine and prepares it for usage
*
- * @param $appInstance A manageable application
- * @return $templateInstance An instance of TemplateEngine
+ * @param $applicationInstance A manageable application
+ * @return $templateInstance 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 BasePathReadProtectedException If $templateBasePath is
* read-protected
*/
- public static final function createMailTemplateEngine (ManageableApplication $appInstance) {
+ public static final function createMailTemplateEngine (ManageableApplication $applicationInstance) {
// Get a new instance
$templateInstance = new MailTemplateEngine();
// Determine base path
- $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+ $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
// Is the base path valid?
if (empty($templateBasePath)) {
/**
* Creates an instance of the class TemplateEngine and prepares it for usage
*
- * @param $appInstance A manageable application
- * @param $menuInstance A RenderableMenu instance
- * @return $templateInstance An instance of TemplateEngine
+ * @param $applicationInstance A manageable application
+ * @param $menuInstance A RenderableMenu instance
+ * @return $templateInstance 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 BasePathReadProtectedException If $templateBasePath is
* read-protected
*/
- public static final function createMenuTemplateEngine (ManageableApplication $appInstance, RenderableMenu $menuInstance) {
+ public static final function createMenuTemplateEngine (ManageableApplication $applicationInstance, RenderableMenu $menuInstance) {
// Get a new instance
$templateInstance = new MenuTemplateEngine();
// Determine base path
- $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+ $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
// Is the base path valid?
if (empty($templateBasePath)) {
/**
* Creates an instance of the class TemplateEngine and prepares it for usage
*
- * @param $appInstance A manageable application
- * @return $templateInstance An instance of TemplateEngine
+ * @param $applicationInstance A manageable application
+ * @return $templateInstance 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 BasePathReadProtectedException If $templateBasePath is
* read-protected
*/
- public static final function createWebTemplateEngine (ManageableApplication $appInstance) {
+ public static final function createWebTemplateEngine (ManageableApplication $applicationInstance) {
// Get a new instance
$templateInstance = new WebTemplateEngine();
// Determine base path
- $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+ $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
// Is the base path valid?
if (empty($templateBasePath)) {