* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createTestsConsoleMainCommand (CommandResolver $resolverInstance) {
+ public static final function createTestsConsoleMainCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new TestsConsoleMainCommand();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Debug message
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('TESTS-CONSOLE-MAIN-COMMAND: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('MAIN: --- Starting tests ... ---');
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Add pre filters (e.g. for requirements checks)
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('TESTS-CONSOLE-MAIN-COMMAND: controllerInstance=%s,requestInstance=%s - CALLED!', $controllerInstance->__toString(), $requestInstance->__toString()));
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('tests_php_requirements_filter_class'));
* @param $resolverInstance An instance of a command resolver class
* @return $controllerInstance A prepared instance of this class
*/
- public static final function createTestsConsoleDefaultNewsController (CommandResolver $resolverInstance) {
+ public static final function createTestsConsoleDefaultNewsController (CommandResolver $resolverInstance): Controller {
// Create the instance
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('TEST-CONSOLE-DEFAULT-NEWS-CONTROLLER: resolverInstance=%s - CALLED!', $resolverInstance->__toString()));
$controllerInstance = new TestsConsoleDefaultNewsController();
* @param $responseInstance An instance of a response class
* @return void
*/
- public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
+ public function handleRequest (Requestable $requestInstance, Responseable $responseInstance): void {
// Get the command instance from the resolver by sending a request instance to the resolver
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('TEST-CONSOLE-DEFAULT-NEWS-CONTROLLER: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
$commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
* @param $filterInstance A Filterable class
* @return void
*/
- public function addBootstrapFilter (Filterable $filterInstance) {
+ public function addBootstrapFilter (Filterable $filterInstance): void {
$this->addFilter('bootstrap', $filterInstance);
}
* @param $filterInstance A Filterable class
* @return void
*/
- public function addTestsFilter (Filterable $filterInstance) {
+ public function addTestsFilter (Filterable $filterInstance): void {
$this->addFilter('tests', $filterInstance);
}
* @param $responseInstance A Responseable class
* @return void
*/
- public function executeBootstrapFilters (Requestable $requestInstance, Responseable $responseInstance) {
+ public function executeBootstrapFilters (Requestable $requestInstance, Responseable $responseInstance): void {
$this->executeFilters('bootstrap', $requestInstance, $responseInstance);
}
* @param $responseInstance A Responseable class
* @return void
*/
- public function executeTestsFilters (Requestable $requestInstance, Responseable $responseInstance) {
+ public function executeTestsFilters (Requestable $requestInstance, Responseable $responseInstance): void {
$this->executeFilters('tests', $requestInstance, $responseInstance);
}
*
* @return $filterInstance An instance of this filter class
*/
- public final static function createTestConfigurationLoadableClassesFilter () {
+ public final static function createTestConfigurationLoadableClassesFilter (): Filterable {
// Get a new instance
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('TESTS-CONFIGURATION-LOADABLE-CLASSES-FILTER: CALLED!');
$filterInstance = new TestConfigurationLoadableClassesFilter();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Init counter
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('TESTS-CONFIGURATION-LOADABLE-CLASSES-FILTER: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
$passed = $failed = $skipped = $warning = 0;
*
* @return $filterInstance An instance of this filter class
*/
- public final static function createTestsConfigurationIsEnabledFilter () {
+ public final static function createTestsConfigurationIsEnabledFilter (): Filterable {
// Get a new instance
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('TESTS-CONFIGURATION-IS-ENABLED-FILTER: CALLED!');
$filterInstance = new TestsConfigurationIsEnabledFilter();
* @return void
* @todo 0% done
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Init counter
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('TESTS-CONFIGURATION-IS-ENABLED-FILTER: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
$passed = $failed = $skipped = $warning = 0;
*
* @return $filterInstance An instance of this filter class
*/
- public final static function createTestsPhpRequirementsFilter () {
+ public final static function createTestsPhpRequirementsFilter (): Filterable {
// Get a new instance
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('TESTS-PHP-REQUIREMENTS-FILTER: CALLED!');
$filterInstance = new TestsPhpRequirementsFilter();
* @return void
* @todo 0% done
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Init counter
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('TESTS-PHP-REQUIREMENTS-FILTER: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
$passed = $failed = $skipped = $warning = 0;
* @param $resolverInstance An instance of an action resolver
* @return $actionInstance An instance of this action class
*/
- public static final function createHtmlLoginProfileAction (ActionResolver $resolverInstance) {
+ public static final function createHtmlLoginProfileAction (ActionResolver $resolverInstance): PerformableAction {
// Get a new instance
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('HTML-LOGIN-PROFILE-ACTION: resolverInstance=%s - CALLED!', $resolverInstance->__toString()));
$actionInstance = new HtmlLoginProfileAction();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Dummy method
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('HTML-LOGIN-PROFILE-ACTION: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
}
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Add user status filter here
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('HTML-LOGIN-PROFILE-ACTION: controllerInstance=%s,requestInstance=%s - CALLED!', $controllerInstance->__toString(), $requestInstance->__toString()));
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter_class'));
*
* @return $actionInstance An instance of this action class
*/
- public static final function createLoginAfterRegistrationAction () {
+ public static final function createLoginAfterRegistrationAction (): PerformableAction {
// Get a new instance
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('LOGIN-REGISTRATION-ACTION: CALLED!');
$actionInstance = new LoginAfterRegistrationAction();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get a login class from factory
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('LOGIN-REGISTRATION-ACTION: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
$loginInstance = LoginFactory::createLoginObjectByRequest($requestInstance);
* @return void
* @throws InvalidArgumentException If a parameter has an invalid value
*/
- public final function initTemplateEngine (string $templateType) {
+ public final function initTemplateEngine (string $templateType): void {
// Check paramter
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-COMMAND: templateType=%s - CALLED!', $templateType));
if (empty($templateType)) {
* @return void
* @throws BadMethodCallException If a POST request ended here
*/
- protected function sendGenericGetResponse (Requestable $requestInstance, Responseable $responseInstance, string $suffix = '') {
+ protected function sendGenericGetResponse (Requestable $requestInstance, Responseable $responseInstance, string $suffix = ''): void {
// Check conditions
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-COMMAND: requestInstance=%s,responseInstance=%s,suffix=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString(), $suffix));
if ($requestInstance->isPostRequestMethod()) {
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public final static function createConsoleFuseCommand (CommandResolver $resolverInstance) {
+ public final static function createConsoleFuseCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new ConsoleFuseCommand();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Is the feature available?
if (!FrameworkFeature::isFeatureAvailable('fuse')) {
// Feature not available, cannot continue
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Empty for now ...
}
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createHtmlConfirmCommand (CommandResolver $resolverInstance) {
+ public static final function createHtmlConfirmCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new HtmlConfirmCommand();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get the application instance
$applicationInstance = ApplicationHelper::getSelfInstance();
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Empty for now
}
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createHtmlDoFormCommand (CommandResolver $resolverInstance) {
+ public static final function createHtmlDoFormCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new HtmlDoFormCommand();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Should never be reached...
$this->debugBackTrace('This should never be reached.');
}
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Empty for now
}
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createHtmlHomeCommand (CommandResolver $resolverInstance) {
+ public static final function createHtmlHomeCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new HtmlHomeCommand();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get the application instance
$applicationInstance = ApplicationHelper::getSelfInstance();
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Empty for now
}
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createHtmlLoginAreaCommand (CommandResolver $resolverInstance) {
+ public static final function createHtmlLoginAreaCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new HtmlLoginAreaCommand();
* @return void
* @todo Add some stuff here: Some personal data, app/game related data
*/
- protected function prepareCommand () {
+ protected function prepareCommand (): void {
}
/**
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get the action instance from registry
$actionInstance = ObjectRegistry::getRegistry('generic')->getInstance('action');
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Get our application instance from the registry
$applicationInstance = ApplicationHelper::getSelfInstance();
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createHtmlLoginCommand (CommandResolver $resolverInstance) {
+ public static final function createHtmlLoginCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new HtmlLoginCommand();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Set request instance as extra instance
ObjectRegistry::getRegistry('generic')->addInstance('extra', $this);
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Empty for now
}
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createHtmlLoginFailedCommand (CommandResolver $resolverInstance) {
+ public static final function createHtmlLoginFailedCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new HtmlLoginFailedCommand();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get the application instance
$applicationInstance = ApplicationHelper::getSelfInstance();
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Empty for now
}
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createHtmlLogoutCommand (CommandResolver $resolverInstance) {
+ public static final function createHtmlLogoutCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new HtmlLogoutCommand();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get an auth instance for checking and updating the auth cookies
$authInstance = ObjectFactory::createObjectByConfiguredName('auth_method_class', array($responseInstance));
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Empty for now
}
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createHtmlLogoutDoneCommand (CommandResolver $resolverInstance) {
+ public static final function createHtmlLogoutDoneCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new HtmlLogoutDoneCommand();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get the application instance
$applicationInstance = ApplicationHelper::getSelfInstance();
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Empty for now
}
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createHtmlProblemCommand (CommandResolver $resolverInstance) {
+ public static final function createHtmlProblemCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new HtmlProblemCommand();
* @return void
* @todo 0% done
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
DebugMiddleware::getSelfInstance()->partialStub('Unfinished method.');
}
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Empty for now
}
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createHtmlRegisterCommand (CommandResolver $resolverInstance) {
+ public static final function createHtmlRegisterCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new HtmlRegisterCommand();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Set request instance as extra instance
ObjectRegistry::getRegistry('generic')->addInstance('extra', $this);
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Empty method
}
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createHtmlResendLinkCommand (CommandResolver $resolverInstance) {
+ public static final function createHtmlResendLinkCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new HtmlResendLinkCommand();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get user instance from registry
$userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user');
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Filter for checking if account is unconfirmed
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_unconfirmed_filter_class'));
}
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createHtmlStatusCommand (CommandResolver $resolverInstance) {
+ public static final function createHtmlStatusCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new HtmlStatusCommand();
* @return void
* @todo 0% done
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get the application instance
$applicationInstance = ApplicationHelper::getSelfInstance();
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Empty for now
}
* @param $resolverInstance An instance of a command resolver class
* @return $commandInstance An instance a prepared command class
*/
- public static final function createImageCodeCaptchaCommand (CommandResolver $resolverInstance) {
+ public static final function createImageCodeCaptchaCommand (CommandResolver $resolverInstance): Commandable {
// Get new instance
$commandInstance = new ImageCodeCaptchaCommand();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get the decrypted string from request (previously created by a filter!)
$decryptedCode = $requestInstance->getRequestElement('decrypted');
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
// Extra filters here...
}
* @param $responseInstance A Responseable class
* @return void
*/
- public function executeGenericPrePostCommand (Requestable $requestInstance, Responseable $responseInstance) {
+ public function executeGenericPrePostCommand (Requestable $requestInstance, Responseable $responseInstance): void {
// Get the command instance from the resolver by sending a request instance to the resolver
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-CONTROLLER: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
$commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
* @param $responseInstance An instance of a Responseable class
* @return void
*/
- public function genericHanleRequestLoginFailedRedirect (Requestable $requestInstance, Responseable $responseInstance) {
+ public function genericHanleRequestLoginFailedRedirect (Requestable $requestInstance, Responseable $responseInstance): void {
// Get the "form action"
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-CONTROLLER: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
$formAction = $requestInstance->getRequestElement('form');
* @param $responseInstance An instance of a Responseable class
* @return void
*/
- public function genericHanleRequestLoginAreaFailedRedirect (Requestable $requestInstance, Responseable $responseInstance) {
+ public function genericHanleRequestLoginAreaFailedRedirect (Requestable $requestInstance, Responseable $responseInstance): void {
// Get the command instance from the resolver by sending a request instance to the resolver
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-CONTROLLER: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
$commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
* @throws InvalidArgumentException If a parameter has an invalid value
* @throws BadMethodCallException If the given filter chain is already initialized
*/
- protected function initFilterChain (string $filterChain) {
+ protected function initFilterChain (string $filterChain): void {
// Check parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-CONTROLLER: filterChain=%s - CALLED!', $filterChain));
if (empty($filterChain)) {
* @throws InvalidArgumentException If a parameter has an invalid value
* @throws BadMethodCallException If the given filter chain is not yet initialized
*/
- protected function addFilter (string $filterChain, Filterable $filterInstance) {
+ protected function addFilter (string $filterChain, Filterable $filterInstance): void {
// Check parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-CONTROLLER: filterChain=%s,filterInstance=%s - CALLED!', $filterChain, $filterInstance->__toString()));
if (empty($filterChain)) {
* @param $filterInstance An instance of a filter
* @return void
*/
- public function addPreFilter (Filterable $filterInstance) {
+ public function addPreFilter (Filterable $filterInstance): void {
// Add the pre filter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-CONTROLLER: filterInstance=%s - CALLED!', $filterInstance->__toString()));
$this->addFilter(self::FILTER_CHAIN_PRE_COMMAND, $filterInstance);
* @param $filterInstance An instance of a filter
* @return void
*/
- public function addPostFilter (Filterable $filterInstance) {
+ public function addPostFilter (Filterable $filterInstance): void {
// Add post filter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-CONTROLLER: filterInstance=%s - CALLED!', $filterInstance->__toString()));
$this->addFilter(self::FILTER_CHAIN_POST_COMMAND, $filterInstance);
* @param $filterInstance A Filterable class
* @return void
*/
- public function addShutdownFilter (Filterable $filterInstance) {
+ public function addShutdownFilter (Filterable $filterInstance): void {
// Add shutdown filter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-CONTROLLER: filterInstance=%s - CALLED!', $filterInstance->__toString()));
$this->addFilter(self::FILTER_CHAIN_SHUTDOWN, $filterInstance);
* @return void
* @throws InvalidArgumentException If the filter chain is invalid
*/
- protected function executeFilters (string $filterChain, Requestable $requestInstance, Responseable $responseInstance) {
+ protected function executeFilters (string $filterChain, Requestable $requestInstance, Responseable $responseInstance): void {
// Check parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-CONTROLLER: filterChain=%s,requestInstance=%s,responseInstance=%s - CALLED!', $filterChain, $requestInstance->__toString(), $responseInstance->__toString()));
if (empty($filterChain)) {
* @param $responseInstance An instance of a Responseable class
* @return void
*/
- protected function executePreFilters (Requestable $requestInstance, Responseable $responseInstance) {
+ protected function executePreFilters (Requestable $requestInstance, Responseable $responseInstance): void {
// Execute all pre filters
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-CONTROLLER: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
$this->executeFilters(self::FILTER_CHAIN_PRE_COMMAND, $requestInstance, $responseInstance);
* @param $responseInstance An instance of a Responseable class
* @return void
*/
- protected function executePostFilters (Requestable $requestInstance, Responseable $responseInstance) {
+ protected function executePostFilters (Requestable $requestInstance, Responseable $responseInstance): void {
// Execute all post filters
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-CONTROLLER: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
$this->executeFilters(self::FILTER_CHAIN_POST_COMMAND, $requestInstance, $responseInstance);
* @param $responseInstance A Responseable class
* @return void
*/
- public function executeShutdownFilters (Requestable $requestInstance, Responseable $responseInstance) {
+ public function executeShutdownFilters (Requestable $requestInstance, Responseable $responseInstance): void {
// Execute all shutdown filter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-CONTROLLER: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
$this->executeFilters(self::FILTER_CHAIN_SHUTDOWN, $requestInstance, $responseInstance);
* @param $filterInstance An instance of a filter
* @return $discoveryInstance An instance of this discovery class
*/
- public static final function createLocalPaymentDiscovery (Filterable $filterInstance) {
+ public static final function createLocalPaymentDiscovery (Filterable $filterInstance): Discoverable {
// Get an instance of this class
$discoveryInstance = new LocalPaymentDiscovery();
* @param $requestInstance An instance of a Requestable class
* @return void
*/
- public function discover (Requestable $requestInstance) {
+ public function discover (Requestable $requestInstance): void {
// Now get a search criteria and set app name and payment action as search critera
$criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
$criteriaInstance->addCriteria('app_name', $requestInstance->getRequestElement('app'));
* @return void
* @todo 0% done
*/
- public function addResultsToHelper (HelpableTemplate $helperInstance) {
+ public function addResultsToHelper (HelpableTemplate $helperInstance): void {
// Undone part
}
*
* @return $featureInstance An instance of this Feature class
*/
- public final static function create???Feature () {
+ public final static function create???Feature (): Feature {
// Get a new instance
$featureInstance = new ???Feature();
* @return $isAvailable Whether this feature is available
* @todo 0% done
*/
- public function isFeatureAvailable () {
+ public function isFeatureAvailable (): bool {
// Default is not available
$isAvailable = false;
* @return $isEnabled Whether the given feature is enabled
* @throws InvalidArgumentException If a parameter is invalid
*/
- public static function isFeatureEnabled (string $featureName) {
+ public static function isFeatureEnabled (string $featureName): bool {
// Check parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('FRAMEWORK-FEATURE: featureName=%s - CALLED!', $featureName));
if (empty($featureName)) {
* @return $isAvailable Whether the given feature is available
* @throws InvalidArgumentException If a parameter is invalid
*/
- public static function isFeatureAvailable (string $featureName) {
+ public static function isFeatureAvailable (string $featureName): bool {
// Check parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('FRAMEWORK-FEATURE: featureName=%s - CALLED!', $featureName));
if (empty($featureName)) {
* @throws BadMethodCallException If this method has been invoked but the feature isn't available
* @throws FeatureMethodNotCallableException If the requested method cannot be called
*/
- public static function callFeature (string $featureName, string $featureMethod, array $args = NULL) {
+ public static function callFeature (string $featureName, string $featureMethod, array $args = NULL): mixed {
// Check parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('FRAMEWORK-FEATURE: featureName=%s,featureMethod=%s,args[]=%s - CALLED!', $featureName, $featureMethod, gettype($args)));
if (empty($featureName)) {
*
* @return $featureInstance An instance of this Feature class
*/
- public final static function createFuseFeature () {
+ public final static function createFuseFeature (): Feature {
// Get a new instance
$featureInstance = new FuseFeature();
* @return $isAvailable Whether this feature is available
* @todo 0% done
*/
- public function isFeatureAvailable () {
+ public function isFeatureAvailable (): bool {
// Default is not available
$isAvailable = false;
/**
* Creates an instance of this filter class
*
- * @return $filterInstance An instance of this filter class
+ * @return $filterInstance An instance of this filter class
*/
- public static final function createUserAuthFilter () {
+ public static final function createUserAuthFilter (): Filterable {
// Get a new instance
$filterInstance = new UserAuthFilter();
*
* @return void
*/
- protected function setDefaultAuthMethod () {
+ protected function setDefaultAuthMethod (): void {
$this->authMethod = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('auth_method_class');
}
* @throws UserPasswordMismatchException If the supplied password hash does not match
* @throws NoClassException If the user (guest/member) class was not found
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Then get an auth instance for checking and updating the auth cookies
- $authInstance = ObjectFactory::createObjectByName($this->authMethod, array($responseInstance));
+ $authInstance = ObjectFactory::createObjectByName($this->authMethod, [$responseInstance]);
// Now, get the auth data for comparison
$authLogin = $authInstance->getUserAuth();
/**
* Creates an instance of this filter class
*
- * @return $filterInstance An instance of this filter class
+ * @return $filterInstance An instance of this filter class
*/
- public static final function createEmailChangeFilter () {
+ public static final function createEmailChangeFilter (): Filterable {
// Get a new instance
$filterInstance = new EmailChangeFilter();
* @throws FilterChainException If this filter fails to operate
* @todo Implement email change of the user here. HINT: Use the User class!
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get both emails
$email1 = $requestInstance->getRequestElement('email1');
$email2 = $requestInstance->getRequestElement('email2');
// Are email and confirmation empty?
if ((empty($email1)) && (empty($email2))) {
// No email change required!
- return true;
+ return;
}
// Now, get a user instance for comparison
// Are they different?
if ($userEmail == $email1) {
// Nothing has been changed is fine...
- return true;
+ return;
}
// Update the "new_email" field
/**
* Creates an instance of this filter class
*
- * @param $controllerInstance An instance of a controller class
- * @return $filterInstance An instance of this filter class
+ * @return $filterInstance An instance of this filter class
*/
- public static final function createPasswordChangeFilter () {
+ public static final function createPasswordChangeFilter (): Filterable {
// Get a new instance
$filterInstance = new PasswordChangeFilter();
* @todo Finished updating user password hash here. HINT: Use the User class again.
* @throws FilterChainException If this filter fails to operate
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get both passwords
$pass1 = $requestInstance->getRequestElement('pass1');
$pass2 = $requestInstance->getRequestElement('pass2');
// Are password and confirmation empty?
if ((empty($pass1)) && (empty($pass2))) {
// Don't change password here
- return true;
+ return;
}
// Do both match?
/**
* Creates an instance of this filter class
*
- * @return $filterInstance An instance of this filter class
+ * @return $filterInstance An instance of this filter class
*/
- public static final function createRulesAcceptedFilter () {
+ public static final function createRulesAcceptedFilter (): Filterable {
// Get a new instance
$filterInstance = new RulesAcceptedFilter();
* @return void
* @throws FilterChainException If this filter fails to operate
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get the "rules" value from request
$rules = $requestInstance->getRequestElement('rules');
* @param $filterInstance An instance of a filter
* @return void
*/
- protected final function setFilterInstance (Filterable $filterInstance) {
+ protected final function setFilterInstance (Filterable $filterInstance): void {
$this->filterInstance = $filterInstance;
}
*
* @return $filterInstance An instance of a filter
*/
- protected final function getFilterInstance () {
+ protected final function getFilterInstance (): Filterable {
return $this->filterInstance;
}
* @param $responseInstance An instance of a Responseable class
* @return void
*/
- public final function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public final function execute (Requestable $requestInstance, Responseable $responseInstance): void {
$this->getFilterInstance()->execute($requestInstance, $responseInstance);
}
* @param $responseInstance An instance of a Responseable class
* @return void
*/
- abstract public function doExecute (Requestable $requestInstance, Responseable $responseInstance);
+ abstract public function doExecute (Requestable $requestInstance, Responseable $responseInstance): void;
}
/**
* Creates an instance of this filter class
*
- * @return $filterInstance An instance of this filter class
+ * @return $filterInstance An instance of this filter class
*/
- public static final function createCaptchaEncryptFilter () {
+ public static final function createCaptchaEncryptFilter (): Filterable {
// Get a new instance
$filterInstance = new CaptchaEncryptFilter();
* @return void
* @throws EncryptMissingException If the "encrypt" value is not set
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get "encrypt" string barely from the request
$encryptRequest = $requestInstance->getRequestElement('encrypt');
/**
* Creates an instance of this filter class
*
- * @return $filterInstance An instance of this filter class
+ * @return $filterInstance An instance of this filter class
*/
- public static final function createUserNameIsGuestFilter () {
+ public static final function createUserNameIsGuestFilter (): Filterable {
// Get a new instance
$filterInstance = new UserNameIsGuestFilter();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get username from request
$userName = $requestInstance->getRequestElement('username');
*
* @return $filterInstance An instance of this filter class
*/
- public static final function createNewsDownloadFilter () {
+ public static final function createNewsDownloadFilter (): Filterable {
// Get a new instance
$filterInstance = new NewsDownloadFilter();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get a news instance
$newsInstance = HtmlNewsFactory::createFactoryByRequest($requestInstance);
/**
* Creates an instance of this filter class
*
- * @return $filterInstance An instance of this filter class
+ * @return $filterInstance An instance of this filter class
*/
- public static final function createNewsProcessFilter () {
+ public static final function createNewsProcessFilter (): Filterable {
// Get a new instance
$filterInstance = new NewsProcessFilter();
* @return void
* @todo Unfinished stub, add functionality here
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
}
}
/**
* Creates an instance of this filter class
*
- * @return $filterInstance An instance of this filter class
+ * @return $filterInstance An instance of this filter class
*/
- public static final function createNullFilter () {
+ public static final function createNullFilter (): Filterable {
// Get a new instance
$filterInstance = new NullFilter();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Not implemented, just passing through
}
* @return $filterInstance An instance of this filter class
* @throws NullPointerException If the resolver is not set
*/
- public static final function createPaymentDiscoveryFilter (PerformableAction $actionInstance) {
+ public static final function createPaymentDiscoveryFilter (PerformableAction $actionInstance): Filterable {
// Get a new instance
$filterInstance = new PaymentDiscoveryFilter();
* @param $actionName Action name to set
* @return void
*/
- protected final function setActionName (string $actionName) {
+ protected final function setActionName (string $actionName): void {
$this->actionName = $actionName;
}
*
* @return $actionName Action name to set
*/
- public final function getActionName () {
+ public final function getActionName (): string {
return $this->actionName;
}
* @todo 0% done
* @throws FilterChainException If this filter fails to operate
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Try to get real discovery class
try {
// Get an instance from the object factory
/**
* Creates an instance of this filter class
*
- * @return $filterInstance An instance of this filter class
+ * @return $filterInstance An instance of this filter class
*/
- public static final function createUserStatusConfimedUpdateFilter () {
+ public static final function createUserStatusConfimedUpdateFilter (): Filterable {
// Get a new instance
$filterInstance = new UserStatusConfimedUpdateFilter();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get user instance from registry
$userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user');
/**
* Creates an instance of this filter class
*
- * @return $filterInstance An instance of this filter class
+ * @return $filterInstance An instance of this filter class
*/
- public static final function createUserUpdateFilter () {
+ public static final function createUserUpdateFilter (): Filterable {
// Get a new instance
$filterInstance = new UserUpdateFilter();
* @return void
* @todo Add more user updates here
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get user instance from registry
$userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user');
/**
* Creates an instance of this filter class
*
- * @return $filterInstance An instance of this filter class
+ * @return $filterInstance An instance of this filter class
*/
- public static final function createEmailValidatorFilter () {
+ public static final function createEmailValidatorFilter (): Filterable {
// Get a new instance
$filterInstance = new EmailValidatorFilter();
* @return void
* @throws FilterChainException If this filter fails to operate
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get Email from request
$email = $requestInstance->getRequestElement('email');
* @param $email Email to check for existence
* @return $alreadyTaken Whether the email has been taken
*/
- private function ifEmailIsTaken (string $email) {
+ private function ifEmailIsTaken (string $email): bool {
// Default is already taken
$alreadyTaken = true;
*
* @return $filterInstance An instance of this filter class
*/
- public static final function createPasswordValidatorFilter () {
+ public static final function createPasswordValidatorFilter (): Filterable {
// Get a new instance
$filterInstance = new PasswordValidatorFilter();
* @return void
* @throws FilterChainException If this filter fails to operate
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get passwords
$password1 = $requestInstance->getRequestElement('pass1');
$password2 = $requestInstance->getRequestElement('pass2');
/**
* Creates an instance of this filter class
*
- * @return $filterInstance An instance of this filter class
+ * @return $filterInstance An instance of this filter class
*/
- public static final function createUserNameValidatorFilter () {
+ public static final function createUserNameValidatorFilter (): Filterable {
// Get a new instance
$filterInstance = new UserNameValidatorFilter();
* @return void
* @throws FilterChainException If this filter fails to operate
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get username from request
$userName = $requestInstance->getRequestElement('username');
* @param $userName Username to check for existence
* @return $alreadyTaken Whether the username has been taken
*/
- private function ifUserNameIsTaken (string $userName) {
+ private function ifUserNameIsTaken (string $userName): bool {
// Default is already taken
$alreadyTaken = true;
*
* @return $filterInstance An instance of this filter class
*/
- public static final function createAccountPasswordVerifierFilter () {
+ public static final function createAccountPasswordVerifierFilter (): Filterable {
// Get a new instance
$filterInstance = new AccountPasswordVerifierFilter();
* @throws FilterChainException If this filter fails to operate
* @todo Rewrite handling of different password fields
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get password
$password = $requestInstance->getRequestElement('pass_old');
*
* @return $filterInstance An instance of this filter class
*/
- public static final function createBirthdayVerifierFilter () {
+ public static final function createBirthdayVerifierFilter (): Filterable {
// Get a new instance
$filterInstance = new BirthdayVerifierFilter();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Day of birth set?
if (!$requestInstance->isRequestElementSet('birth_day')) {
// Day of birth isn't set
*
* @return $filterInstance An instance of this filter class
*/
- public static final function createConfirmCodeVerifierFilter () {
+ public static final function createConfirmCodeVerifierFilter (): Filterable {
// Get a new instance
$filterInstance = new ConfirmCodeVerifierFilter();
* @return void
* @throws FilterChainException If this filter fails to operate
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get confirmation code from request
$confirmCode = $requestInstance->getRequestElement('confirm');
*
* @return $filterInstance An instance of this filter class
*/
- public final static function createEmailVerifierFilter () {
+ public final static function createEmailVerifierFilter (): Filterable {
// Get a new instance
$filterInstance = new EmailVerifierFilter();
* @throws FilterChainException If this filter fails to operate
* @todo 0% done
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Implement this!
DebugMiddleware::getSelfInstance()->partialStub('Please implement this method.');
}
*
* @return $filterInstance An instance of this filter class
*/
- public static final function createGraphicalCodeCaptchaVerifierFilter () {
+ public static final function createGraphicalCodeCaptchaVerifierFilter (): Filterable {
// Get a new instance
$filterInstance = new GraphicalCodeCaptchaVerifierFilter();
* @return void
* @throws FilterChainException If this filter fails to operate
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Is the form set?
if (($requestInstance->getRequestElement('command') !== 'do_form') || (!$requestInstance->isRequestElementSet('form'))) {
// Required field not set
*
* @return $filterInstance An instance of this filter class
*/
- public static final function createPasswordGuestVerifierFilter () {
+ public static final function createPasswordGuestVerifierFilter (): Filterable {
// Get a new instance
$filterInstance = new PasswordGuestVerifierFilter();
* @return void
* @throws FilterChainException If this filter fails to operate
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get password
$password = $requestInstance->getRequestElement('passwd');
*
* @return $filterInstance An instance of this filter class
*/
- public static final function createPasswordVerifierFilter () {
+ public static final function createPasswordVerifierFilter (): Filterable {
// Get a new instance
$filterInstance = new PasswordVerifierFilter();
* @return void
* @throws FilterChainException If this filter fails to operate
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get password
$password = $requestInstance->getRequestElement('pass');
*
* @return $filterInstance An instance of this filter class
*/
- public static final function createUserGuestVerifierFilter () {
+ public static final function createUserGuestVerifierFilter (): Filterable {
// Get a new instance
$filterInstance = new UserGuestVerifierFilter();
* @return void
* @throws FilterChainException If this filter fails to operate
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get username from request
$userName = $requestInstance->getRequestElement('user');
* @param $userName Username to check for existence
* @return $alreadyTaken Whether the username has been taken
*/
- private function ifUserGuestIsTaken (string $userName) {
+ private function ifUserGuestIsTaken (string $userName): bool {
// Default is already taken
$alreadyTaken = true;
*
* @return $filterInstance An instance of this filter class
*/
- public static final function createUserNameVerifierFilter () {
+ public static final function createUserNameVerifierFilter (): Filterable {
// Get a new instance
$filterInstance = new UserNameVerifierFilter();
* @return void
* @throws FilterChainException If this filter fails to operate
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get username from request
$userName = $requestInstance->getRequestElement('username');
* @param $userName Username to check for existence
* @return $alreadyTaken Whether the username has been taken
*/
- private function ifUserNameIsTaken (string $userName) {
+ private function ifUserNameIsTaken (string $userName): bool {
// Default is already taken
$alreadyTaken = true;
*
* @return $filterInstance An instance of this filter class
*/
- public static final function createUserStatusVerifierFilter () {
+ public static final function createUserStatusVerifierFilter (): Filterable {
// Get a new instance
$filterInstance = new UserStatusVerifierFilter();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get a user instance for comparison
$userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user');
*
* @return $filterInstance An instance of this filter class
*/
- public static final function createUserUnconfirmedVerifierFilter () {
+ public static final function createUserUnconfirmedVerifierFilter (): Filterable {
// Get a new instance
$filterInstance = new UserUnconfirmedVerifierFilter();
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
// Get a user instance for comparison
$userInstance = UserFactory::createUserByRequest($requestInstance);
*
* @return $handlerInstance An instance of a HandleableTask class
*/
- public static final function createTaskHandler () {
+ public static final function createTaskHandler (): HandleableTask {
// Get new instance
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('TASK-HANDLER: CALLED!');
$handlerInstance = new TaskHandler();
* @return void
* @throws InvalidTaskException If the current task is invalid
*/
- private function executeCurrentTask () {
+ private function executeCurrentTask (): void {
// Update no task by default
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('TASK-HANDLER: CALLED!');
$updateTask = false;
* @param $taskEntry An array with a task
* @return void
*/
- private function updateTask (array $taskEntry) {
+ private function updateTask (array $taskEntry): void {
// Get the key from current iteration
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('TASK-HANDLER: taskEntry()=%d - CALLED!', count($taskEntry)));
$key = $this->getListInstance()->getIterator()->key();
* @param $taskData Data of the task
* @return void
*/
- private function unregisterTask (array $taskData) {
+ private function unregisterTask (array $taskData): void {
// Remove the entry
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('TASK-HANDLER: Removing task %s from queue - CALLED!', $taskData['id']));
$this->getListInstance()->removeEntry('tasks', $taskData);
* @param $taskInstanc An instanceof a Taskable class
* @return $taskName Name of the task as used while registration
*/
- public function searchTask (Taskable $taskInstance) {
+ public function searchTask (Taskable $taskInstance): string {
// Default is an empty (not found) task name
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('TASK-HANDLER: taskInstance=%s - CALLED!', $taskInstance->__toString()));
$taskName = '';
* @throws InvalidArgumentException If a parameter is not valid
* @throws UnexpectedValueException If an unexpected value has been configured
*/
- public function registerTask (string $taskName, Taskable $taskInstance) {
+ public function registerTask (string $taskName, Taskable $taskInstance): void {
// Is the parameter valid
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('TASK-HANDLER: taskName=%s,taskInstance - CALLED!', $taskName, $taskInstance->__toString()));
if (empty($taskName)) {
*
* @return $tasksLeft Whether there are tasks left to handle
*/
- public function hasTasksLeft () {
+ public function hasTasksLeft (): bool {
// Do we have tasks there?
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('TASK-HANDLER: CALLED!');
$tasksLeft = ($this->getListInstance()->count() > 0);
*
* @return void
*/
- public function handleTasks () {
+ public function handleTasks (): void {
// Should we rewind?
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('TASK-HANDLER: CALLED!');
if (!$this->getListInstance()->getIterator()->valid()) {
*
* @return void
*/
- public function doShutdown () {
+ public function doShutdown (): void {
// Always rewind to the beginning for next loop
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('TASK-HANDLER: Invoking this->listInstance->iterator->rewind() - CALLED!');
$this->getListInstance()->getIterator()->rewind();
*
* @return void
*/
- protected function initFilterChains () {
+ protected function initFilterChains (): void {
// Pre/post-registration filters
$this->preRegistrationFilter = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
$this->postRegistrationFilter = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
* @param $filterInstance An instance of a filter
* @return void
*/
- public function addPreFilter (Filterable $filterInstance) {
+ public function addPreFilter (Filterable $filterInstance): void {
// Add the pre filter
$this->preRegistrationFilter->addFilter($filterInstance);
}
* @param $filterInstance An instance of a filter
* @return void
*/
- public function addPostFilter (Filterable $filterInstance) {
+ public function addPostFilter (Filterable $filterInstance): void {
// Add the post filter
$this->postRegistrationFilter->addFilter($filterInstance);
}
*
* @return void
*/
- protected function executePreFilters () {
+ protected function executePreFilters (): void {
// Execute all pre filters
$this->preRegistrationFilter->processFilters(FrameworkBootstrap::getRequestInstance(), FrameworkBootstrap::getResponseInstance());
}
*
* @return void
*/
- protected function executePostFilters () {
+ protected function executePostFilters (): void {
// Execute all post filters
$this->postRegistrationFilter->processFilters(FrameworkBootstrap::getRequestInstance(), FrameworkBootstrap::getResponseInstance());
}
*
* @return $stateName Name of this state in a printable maner
*/
- public final function getStateName () {
+ public final function getStateName (): string {
return $this->stateName;
}
* @param $stateName Name of this state in a printable maner
* @return void
*/
- protected final function setStateName (string $stateName) {
+ protected final function setStateName (string $stateName): void {
$this->stateName = $stateName;
}
* @return void
* @throws UnsupportedOperationException This method should be overwritten
*/
- public function executeState (Executor $executorInstance) {
+ public function executeState (Executor $executorInstance): void {
throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION);
}
*
* @return $taskInstance An instance of a Taskable/Visitable class
*/
- public static final function createIdleLoopTask () {
+ public static final function createIdleLoopTask (): Taskable {
// Get new instance
$taskInstance = new IdleLoopTask();
* @param $visitorInstance An instance of a Visitor class
* @return void
*/
- public function accept (Visitor $visitorInstance) {
+ public function accept (Visitor $visitorInstance): void {
// Visit this task
$visitorInstance->visitTask($this);
}
*
* @return void
*/
- public function executeTask () {
+ public function executeTask (): void {
// Idle here a little
$this->idle($this->idleTime);
}
*
* @return void
*/
- public function doShutdown () {
+ public function doShutdown (): void {
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
}
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- function execute (Requestable $requestInstance, Responseable $responseInstance);
+ function execute (Requestable $requestInstance, Responseable $responseInstance): void;
}
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
*/
- function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance);
+ function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void;
/**
* Initializes the template engine
* @param $templateType Type of template, e.g. 'html', 'image', 'console' ...
* @return void
*/
- function initTemplateEngine (string $templateType);
+ function initTemplateEngine (string $templateType): void;
}
* @param $requestInstance An instance of a Requestable class
* @return void
*/
- function discover (Requestable $requestInstance);
+ function discover (Requestable $requestInstance): void;
/**
* Adds the database result in a human-readable format to the helper class
* @param $helperInstance An instance of a helper class
* @return void
*/
- function addResultsToHelper (HelpableTemplate $helperInstance);
+ function addResultsToHelper (HelpableTemplate $helperInstance): void;
}
*
* @return $isAvailable Whether this feature is available
*/
- function isFeatureAvailable ();
+ function isFeatureAvailable (): bool;
}
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
- function execute (Requestable $requestInstance, Responseable $responseInstance);
+ function execute (Requestable $requestInstance, Responseable $responseInstance): void;
}
* @param $responseInstance An instance of a Responseable class
* @return void
*/
- function executeLogin (Responseable $responseInstance);
+ function executeLogin (Responseable $responseInstance): void;
}
* @param $visitorInstance An instance of a Visitor class
* @return void
*/
- function accept (Visitor $visitorInstance);
+ function accept (Visitor $visitorInstance): void;
/**
* Executes the task
*
* @return void
*/
- function executeTask ();
+ function executeTask (): void;
/**
* Shuts down the task
*
* @return void
*/
- function doShutdown ();
+ function doShutdown (): void;
}
* @param $args Arguments to send to the view helper
* @return mixed Unknown return arguments, or void
*/
- function execute (array $args = NULL);
+ function execute (array $args = NULL): mixed;
}