// If it is null then get default command
if (is_null($commandName)) {
+ // Get default command
$commandName = $responseInstance->getDefaultCommand();
+
+ // Set it in request
+ $requestInstance->setRequestElement('page');
} // END - if
// Get a resolver
* @return $shortName This selector's short name
*/
public function getAppShortName() {
- $shortName = $this->getConfigInstance()->readConfig('selector_path');
+ $shortName = $this->getConfigInstance()->getConfigEntry('selector_path');
return $shortName;
}
*/
public function readApplicationDirectory () {
// Generate the base path for all applications
- $appBasePath = $this->getConfigInstance()->readConfig('application_path');
+ $appBasePath = $this->getConfigInstance()->getConfigEntry('application_path');
// Add the selector path to the ignore list
- $this->addDirIgnoreList($this->getConfigInstance()->readConfig('selector_path'));
+ $this->addDirIgnoreList($this->getConfigInstance()->getConfigEntry('selector_path'));
// Get a directory pointer for the application path
$dirInstance = FrameworkDirectoryPointer::createFrameworkDirectoryPointer($appBasePath);
// Try to load the web template
$templateInstance->loadWebTemplate(sprintf("%s_%s",
- $this->getConfigInstance()->readConfig('tpl_selector_prefix'),
+ $this->getConfigInstance()->getConfigEntry('tpl_selector_prefix'),
strtolower($appInstance->getAppShortName())
));
$templateInstance = $this->prepareTemplateInstance($this);
// Load the selector's template
- $templateInstance->loadCodeTemplate($this->getConfigInstance()->readConfig('selector_main_tpl'));
+ $templateInstance->loadCodeTemplate($this->getConfigInstance()->getConfigEntry('selector_main_tpl'));
// Now store it in the class, we need this later on final compilation of available applications
$this->setTemplateInstance($templateInstance);
$templateInstance = $this->prepareTemplateInstance($this);
// Load template which shall later hold all application templates
- $templateInstance->loadCodeTemplate($this->getConfigInstance()->readConfig('selector_apps_tpl'));
+ $templateInstance->loadCodeTemplate($this->getConfigInstance()->getConfigEntry('selector_apps_tpl'));
// Add all loaded application templates together
$dummy = "";
// Get an instance of the helper
$app = call_user_func_array(
- array($cfg->readConfig('app_helper_class'), 'getInstance'),
+ array($cfg->getConfigEntry('app_helper_class'), 'getInstance'),
array()
);
// Set application name and version
$app->setAppName("Applikationsauswähler");
$app->setAppVersion("0.1a");
-$app->setAppShortName($cfg->readConfig('selector_name'));
+$app->setAppShortName($cfg->getConfigEntry('selector_name'));
// [EOF]
?>
$cfg = FrameworkConfiguration::getInstance();
// Initialize output system
-require($cfg->readConfig('base_path') . 'inc/output.php');
+require($cfg->getConfigEntry('base_path') . 'inc/output.php');
// Initialize file i/o system
-require($cfg->readConfig('base_path') . 'inc/file_io.php');
+require($cfg->getConfigEntry('base_path') . 'inc/file_io.php');
// Include the language sub-system
-require($cfg->readConfig('base_path') . 'inc/language.php');
+require($cfg->getConfigEntry('base_path') . 'inc/language.php');
// [EOF]
?>
$cfg = FrameworkConfiguration::getInstance();
// Load all classes
-ClassLoader::getInstance()->scanClassPath(sprintf("%s/%s/", $cfg->readConfig('application_path'), $cfg->readConfig('app_name')));
+ClassLoader::getInstance()->scanClassPath(sprintf("%s/%s/", $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name')));
// Clean up the global namespace
unset($lowerClasses);
// Is there an application helper instance? We need the method main() for
// maining the application
-$app = call_user_func_array(array(FrameworkConfiguration::getInstance()->readConfig('app_helper_class'), 'getInstance'), array());
+$app = call_user_func_array(array(FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class'), 'getInstance'), array());
// Some sanity checks
if ((empty($app)) || (is_null($app))) {
// Something went wrong!
ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the helper class <span class=\"class_name\">%s</span> is not loaded.",
$application,
- FrameworkConfiguration::getInstance()->readConfig('app_helper_class')
+ FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class')
));
} elseif (!is_object($app)) {
// No object!
ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because 'app' is not an object.",
$application
));
-} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) {
+} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->getConfigEntry('entry_method'))) {
// Method not found!
ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the method <span class=\"method_name\">%s</span> is missing.",
$application,
- FrameworkConfiguration::getInstance()->readConfig('entry_method')
+ FrameworkConfiguration::getInstance()->getConfigEntry('entry_method')
));
}
// Call the entry point method
-call_user_func_array(array($app, FrameworkConfiguration::getInstance()->readConfig('entry_method')), array());
+call_user_func_array(array($app, FrameworkConfiguration::getInstance()->getConfigEntry('entry_method')), array());
// [EOF]
?>
// If it is null then get default command
if (is_null($commandName)) {
+ // Get the default command
$commandName = $responseInstance->getDefaultCommand();
+
+ // Set it in request
+ $requestInstance->setRequestElement('page');
} // END - if
// Get a resolver
// Get an instance of the helper
$app = call_user_func_array(
- array($cfg->readConfig('app_helper_class'), 'getInstance'),
+ array($cfg->getConfigEntry('app_helper_class'), 'getInstance'),
array()
);
$cfg = FrameworkConfiguration::getInstance();
// Initialize output system
-require($cfg->readConfig('base_path') . 'inc/output.php');
+require($cfg->getConfigEntry('base_path') . 'inc/output.php');
// Initialize file i/o system
-require($cfg->readConfig('base_path') . 'inc/file_io.php');
+require($cfg->getConfigEntry('base_path') . 'inc/file_io.php');
// Include the language sub-system
-require($cfg->readConfig('base_path') . 'inc/language.php');
+require($cfg->getConfigEntry('base_path') . 'inc/language.php');
// This application needs a database connection then we have to simply include
// the inc/database.php script
-require($cfg->readConfig('base_path') . 'inc/database.php');
+require($cfg->getConfigEntry('base_path') . 'inc/database.php');
// [EOF]
?>
// Load all classes for the application
foreach ($lowerClasses as $className) {
// Load the application classes
- ClassLoader::getInstance()->scanClassPath(sprintf("%s/%s/%s", $cfg->readConfig('application_path'), $cfg->readConfig('app_name'), $className));
+ ClassLoader::getInstance()->scanClassPath(sprintf("%s/%s/%s", $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name'), $className));
} // END - if
// Clean up the global namespace
// Prepare a filter based on the requested type we shall refill
$filterName = sprintf("refill_request_%s_%s_book_filter",
$requestInstance->getRequestElement('type'),
- $this->getConfigInstance()->readConfig($paymentTypeConfig)
+ $this->getConfigInstance()->getConfigEntry($paymentTypeConfig)
);
// Now, try to load that filter
*/
public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
// Which login type do we have?
- switch ($this->getConfigInstance()->readConfig('login_type')) {
+ switch ($this->getConfigInstance()->getConfigEntry('login_type')) {
case "username": // Login via username
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_verifier_filter'));
break;
parent::execute($requestInstance, $responseInstance);
// Is the configuration variable set?
- if ($this->getConfigInstance()->readConfig('refill_page_active') === "N") {
+ if ($this->getConfigInstance()->getConfigEntry('refill_page_active') === "N") {
// Password is empty
$requestInstance->requestIsValid(false);
$maximumPayed = false;
// Cache startup help limit
- $helpLimit = $this->getConfigInstance()->readConfig('government_startup_help_limit');
+ $helpLimit = $this->getConfigInstance()->getConfigEntry('government_startup_help_limit');
// Now get a search criteria and set the user's name as criteria
$criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
if (is_null($method)) {
// Then abort here
throw new UserAuthMethodException($this, self::EXCEPTION_MISSING_METHOD);
- } elseif (!method_exists($this->getConfigInstance()->readConfig('guest_class'), $method)) {
+ } elseif (!method_exists($this->getConfigInstance()->getConfigEntry('guest_class'), $method)) {
// The method is invalid!
throw new MissingMethodException(array($this, $method), self::EXCEPTION_MISSING_METHOD);
}
// Get a user instance
- $userInstance = call_user_func_array(array($this->getConfigInstance()->readConfig('guest_class'), $method), array($data));
+ $userInstance = call_user_func_array(array($this->getConfigInstance()->getConfigEntry('guest_class'), $method), array($data));
// Remember this new instance in registry
Registry::getRegistry()->addInstance('user', $userInstance);
$data = "";
// Get member class
- $userClass = $this->getConfigInstance()->readConfig('user_class');
+ $userClass = $this->getConfigInstance()->getConfigEntry('user_class');
// Get a user instance
$userInstance = call_user_func_array(array($userClass, 'createMemberByRequest'), array($requestInstance));
* @return void
*/
protected function setDefaultAuthMethod () {
- $this->authMethod = $this->getConfigInstance()->readConfig('auth_method_class');
+ $this->authMethod = $this->getConfigInstance()->getConfigEntry('auth_method_class');
}
/**
$configEntry = 'user_status_unconfirmed';
// Is the confirmation process entirely disabled?
- if ($this->getConfigInstance()->readConfig('confirm_email_enabled') === "N") {
+ if ($this->getConfigInstance()->getConfigEntry('confirm_email_enabled') === "N") {
// No confirmation of email needed
$configEntry = 'user_status_confirmed';
} // END - if
}
// Is this a guest account?
- if ((($element == "username") || ($alias == "username")) && ($this->getRequestInstance()->getRequestElement($element) == $this->getConfigInstance()->readConfig('guest_login_user'))) {
+ if ((($element == "username") || ($alias == "username")) && ($this->getRequestInstance()->getRequestElement($element) == $this->getConfigInstance()->getConfigEntry('guest_login_user'))) {
// Yes, then set the config entry to guest status
$configEntry = 'user_status_guest';
} // END - if
} // END - if
// Is the command empty? Then fall back to default command
- if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_web_command');
+ if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_web_command');
// Check if command is valid
if ($this->isCommandValid($commandName) === false) {
$commandInstance = null;
// Is the command empty? Then fall back to default command
- if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_web_command');
+ if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_web_command');
// Check if command is valid
if ($this->isCommandValid($commandName) === false) {
*/
private function loadCommand ($commandName) {
// Cache default command
- $defaultCommand = $this->getConfigInstance()->readConfig('default_web_command');
+ $defaultCommand = $this->getConfigInstance()->getConfigEntry('default_web_command');
// Init command instance
$commandInstance = null;
*/
public function ifUserCreatedMaximumAllowedCompanies () {
// Get max allowed companies to found
- $maxFound = $this->getConfigInstance()->readConfig('max_allowed_companies_found');
+ $maxFound = $this->getConfigInstance()->getConfigEntry('max_allowed_companies_found');
// Now get a search criteria and set the user's name as criteria
$criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
// If there is no action use the default on
if (is_null($lastAction)) {
- $lastAction = $this->getConfigInstance()->readConfig('login_default_action');
+ $lastAction = $this->getConfigInstance()->getConfigEntry('login_default_action');
} // END - if
// Get a critieria instance
// Is there an application helper instance? We need the method main() for
// maining the application
-$app = call_user_func_array(array(FrameworkConfiguration::getInstance()->readConfig('app_helper_class'), 'getInstance'), array());
+$app = call_user_func_array(array(FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class'), 'getInstance'), array());
// Some sanity checks
if ((empty($app)) || (is_null($app))) {
// Something went wrong!
ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the helper class <span class=\"class_name\">%s</span> is not loaded.",
$application,
- FrameworkConfiguration::getInstance()->readConfig('app_helper_class')
+ FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class')
));
} elseif (!is_object($app)) {
// No object!
ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because 'app' is not an object.",
$application
));
-} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) {
+} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->getConfigEntry('entry_method'))) {
// Method not found!
ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the method <span class=\"method_name\">%s</span> is missing.",
$application,
- FrameworkConfiguration::getInstance()->readConfig('entry_method')
+ FrameworkConfiguration::getInstance()->getConfigEntry('entry_method')
));
}
// Call user function
-call_user_func_array(array($app, FrameworkConfiguration::getInstance()->readConfig('entry_method')), array());
+call_user_func_array(array($app, FrameworkConfiguration::getInstance()->getConfigEntry('entry_method')), array());
// [EOF]
?>
$configInstance = FrameworkConfiguration::getInstance();
// Do we have debug installation?
- if (($configInstance->readConfig('product_install_mode') == 'productive') || ($silentMode === true)) {
+ if (($configInstance->getConfigEntry('product_install_mode') == 'productive') || ($silentMode === true)) {
// Abort here
die();
} // END - if
// Get some instances
- $tpl = FrameworkConfiguration::getInstance()->readConfig('template_class');
+ $tpl = FrameworkConfiguration::getInstance()->getConfigEntry('template_class');
$lang = LanguageSystem::getInstance();
// Get response instance
require(self::detectCorePath() . '/inc/config.php');
// Load all include files
- require($cfg->readConfig('base_path') . 'inc/includes.php');
+ require($cfg->getConfigEntry('base_path') . 'inc/includes.php');
// Load all framework classes
- require($cfg->readConfig('base_path') . 'inc/classes.php');
+ require($cfg->getConfigEntry('base_path') . 'inc/classes.php');
// Include the application selector
- require($cfg->readConfig('base_path') . 'inc/selector.php');
+ require($cfg->getConfigEntry('base_path') . 'inc/selector.php');
} // END - main()
} // END - class