// Import framework stuff
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
+// Import SPL stuff
+use \Iterator;
+
/**
* A ??? list
*
*
* @return $listInstance An instance a Listable class
*/
- public final static function create???List () {
+ public final static function create???List (): Listable {
// Get new instance
$listInstance = new ???List();
* @return $iteratorInstance An instance of a Iterator class
* @todo 0% done
*/
- public function getListIterator () {
+ public function getListIterator (): Iterator {
DebugMiddleware::getSelfInstance()->partialStub('Please implement this method.');
}
* @return void
* @todo 0% done
*/
- public function clearList () {
+ public function clearList (): void {
DebugMiddleware::getSelfInstance()->partialStub('Please implement this method.');
}
use Org\Mxchange\CoreFramework\Lists\Listable;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
+// Import SPL stuff
+use \Iterator;
+
/**
* A ListGroup list
*
*
* @return $iteratorInstance An instance of a Iterator class
*/
- public function getListIterator () {
+ public function getListIterator (): Iterator{
$this->debugInstance($this->__toString() . ' uses the default iterator. Please call getIterator() instead!');
}
use Org\Mxchange\CoreFramework\Lists\BaseList;
use Org\Mxchange\CoreFramework\Lists\Listable;
+// Import SPL stuff
+use \Iterator;
+
/**
* A Task list
*
*
* @return $iteratorInstance An instance of a Iterator class
*/
- public function getListIterator () {
+ public function getListIterator (): Iterator {
$this->debugInstance($this->__toString() . ' uses the default iterator. Please call getIterator() instead!');
}
*
* @return $mailerInstance An instance of this mailer class
*/
- public final static function create???Mailer () {
+ public final static function create???Mailer (): DeliverableMail {
// Get a new instance
$mailerInstance = new ???Mailer();
* @return void
* @todo 0% done
*/
- public function deliverEmail() {
+ public function deliverEmail(): void {
DebugMiddleware::getSelfInstance()->partialStub("You have to implement this method.");
}
* @return void
* @todo 0% done
*/
- public function sendAdminNotification() {
+ public function sendAdminNotification(): void {
DebugMiddleware::getSelfInstance()->partialStub("You have to implement this method.");
}
* @param $templateName Name of the template we shall load
* @return void
*/
- protected final function loadTemplate (string $templateName) {
+ protected final function loadTemplate (string $templateName): void {
// Set template name
$this->setTemplateName($templateName);
* @param $userInstance An instance of a user class
* @return void
*/
- public function addRecipientByUserInstance (ManageableMember $userInstance) {
+ public function addRecipientByUserInstance (ManageableMember $userInstance): void {
// Get template name
$templateName = $this->getTemplateName();
* @param $variableName Template variable name to add
* @return void
*/
- private function addTemplateVariable ($section, $variableName) {
+ private function addTemplateVariable ($section, $variableName): void {
// Get template name
$templateName = $this->getTemplateName();
* @param $variableName Template variable name to add
* @return void
*/
- public final function addConfigTemplateVariable ($variableName) {
+ public final function addConfigTemplateVariable (string $variableName): void {
$this->addTemplateVariable('config', $variableName);
}
* @param $variableName Template variable name to add
* @return void
*/
- public final function addValueTemplateVariable ($variableName) {
+ public final function addValueTemplateVariable (string $variableName): void {
$this->addTemplateVariable('value', $variableName);
}
* @param $valueInstance An object instance which can provide "field values"
* @return void
*/
- public final function addValueInstance (string $variableName, FrameworkInterface $valueInstance) {
+ public final function addValueInstance (string $variableName, FrameworkInterface $valueInstance): void {
$this->setGenericArrayElement('recipients', $this->getTemplateName(), 'values', $variableName, $valueInstance);
}
* @param $templateName Name of email template
* @return void
*/
- public final function setTemplateName (string $templateName) {
+ public final function setTemplateName (string $templateName): void {
$this->templateName = $templateName;
}
*
* @return $templateName Name of email template
*/
- protected final function getTemplateName () {
+ protected final function getTemplateName (): string {
return $this->templateName;
}
* @param $subjectLine Subject line to set
* @return void
*/
- public final function setSubjectLine (string $subjectLine) {
+ public final function setSubjectLine (string $subjectLine): void {
$this->setGenericArrayElement('recipients', $this->getTemplateName(), 'generic', 'subject', $subjectLine);
}
*
* @return $subjectLine Subject line to set
*/
- public final function getSubjectLine () {
+ public final function getSubjectLine (): string {
// Default subject is null
$subjectLine = NULL;
*
* @return void
*/
- public function useSubjectFromTemplate () {
+ public function useSubjectFromTemplate (): void {
// Set the subject line
$this->setSubjectLine('{?subject?}');
}
*
* @return $recipientList Array with reciepients
*/
- public final function getRecipientList () {
+ public final function getRecipientList (): array {
return $this->getGenericArray('recipients');
}
* @param $templateName Name of email template to set
* @return $mailerInstance An instance of this mailer class
*/
- public static final function createDebugMailer (CompileableTemplate $templateInstance, string $templateName) {
+ public static final function createDebugMailer (CompileableTemplate $templateInstance, string $templateName): DeliverableMail {
// Get a new instance
$mailerInstance = new DebugMailer();
* @return void
* @throws UnexpectedValueException If the recipient instance does not implement ManageableMember
*/
- public function deliverEmail () {
+ public function deliverEmail (): void {
// Get template instance
$templateInstance = $this->getTemplateInstance();
* @return void
* @todo 0% done
*/
- public function sendAdminNotification () {
+ public function sendAdminNotification (): void {
// Unfinished work
}
*
* @return void
*/
- public function invokeMailDelivery () {
+ public function invokeMailDelivery (): void {
// Get template instance
$templateInstance = $this->getTemplateInstance();
*
* @return void
*/
- public function renderMenu () {
+ public function renderMenu (): void {
// Initialize the menu system by preparing it's template instance
$templateInstance = ObjectFactory::createObjectByConfiguredName('menu_template_class', [$this]);
* @param $templateInstance An instance of a CompileableTemplate class
* @return void
*/
- public function transferContentToTemplateEngine (CompileableTemplate $templateInstance) {
+ public function transferContentToTemplateEngine (CompileableTemplate $templateInstance): void {
// Assign menu content to variable
$templateInstance->assignVariable('menu', $this->getTemplateInstance()->getMenuContent());
//* DEBUG */ $templateInstance->debugInstance();
use Org\Mxchange\CoreFramework\Visitor\Visitable;
// Import SPL stuff
+use \Iterator;
use \IteratorAggregate;
/**
* @param $groupName Group to check if found in list
* @return $isset Whether the group is valid
*/
- function isGroupSet (string $groupName);
+ function isGroupSet (string $groupName): bool;
/**
* Adds the given group or if already added issues a BadMethodCallException
* @return void
* @throws BadMethodCallException If the given group is already added
*/
- function addGroup (string $groupName);
+ function addGroup (string $groupName): void;
/**
* Adds the given instance to list group and sub group
* @return void
* @throws BadMethodCallException If the given group is not found
*/
- function addInstance (string $groupName, string $subGroup, Visitable $visitableInstance);
+ function addInstance (string $groupName, string $subGroup, Visitable $visitableInstance): void;
/**
* Adds the given entry to list group
* @return void
* @throws BadMethodCallException If the given group is not found
*/
- function addEntry (string $groupName, $entry);
+ function addEntry (string $groupName, mixed $entry): void;
/**
* Updates the given entry by hash with given array
* @return void
* @throws InvalidListHashException If the solved hash index is invalid
*/
- function updateCurrentEntryByHash (string $hash, array $entryArray);
+ function updateCurrentEntryByHash (string $hash, array $entryArray): void;
/**
* "Getter" for an iterator instance of this list
*
* @return $iteratorInstance An instance of a Iterator class
*/
- function getListIterator ();
+ function getListIterator (): Iterator;
/**
* Clears this list (mostly by clearing all groups together)
*
* @return void
*/
- function clearList ();
+ function clearList (): void;
/**
* Setter for call-back instance
* @param $callbackInstance An instance of a FrameworkInterface class
* @return void
*/
- function setCallbackInstance (FrameworkInterface $callbackInstance);
+ function setCallbackInstance (FrameworkInterface $callbackInstance): void;
}
* @throws NullPointerException If this->outputInstance is NULL
* @todo Remove $doPrint parameter
*/
- public function traceMessage (string $message, bool $doPrint = true, bool $stripTags = false);
+ public function traceMessage (string $message, bool $doPrint = true, bool $stripTags = false): void;
/**
* Outputs a debug message whether to debug instance (should be set!) or
* @throws NullPointerException If this->outputInstance is NULL
* @todo Remove $doPrint parameter
*/
- public function debugMessage (string $message, bool $doPrint = true, bool $stripTags = false);
+ public function debugMessage (string $message, bool $doPrint = true, bool $stripTags = false): void;
/**
* Outputs an informational message whether to debug instance (should be set!) or
* @throws NullPointerException If this->outputInstance is NULL
* @todo Remove $doPrint parameter
*/
- public function infoMessage (string $message, bool $doPrint = true, bool $stripTags = false);
+ public function infoMessage (string $message, bool $doPrint = true, bool $stripTags = false): void;
/**
* Outputs a warning message whether to debug instance (should be set!) or
* @throws NullPointerException If this->outputInstance is NULL
* @todo Remove $doPrint parameter
*/
- public function warningMessage (string $message, bool $doPrint = true, bool $stripTags = false);
+ public function warningMessage (string $message, bool $doPrint = true, bool $stripTags = false): void;
/**
* Output a partial stub message for the caller method
* @param $message An optional message to display
* @return void
*/
- public function partialStub (string $message = '');
+ public function partialStub (string $message = ''): void;
/**
* Outputs a deprecated message whether to debug instance (should be set!) or
* @todo Remove $doPrint parameter
* @todo When all old method invocations are fixed, renamed this do deprecatedMessage
*/
- public function debugOutput (string $message, bool $doPrint = true, bool $stripTags = false);
+ public function debugOutput (string $message, bool $doPrint = true, bool $stripTags = false): void;
}
* @param $responseInstance An instance of a Responseable class
* @return void
*/
- function doLogin (Requestable $requestInstance, Responseable $responseInstance);
+ function doLogin (Requestable $requestInstance, Responseable $responseInstance): void;
/**
* Check if the implementation is correct. Only the request instance is
* needed as no redirect is done here.
*
* @param $requestInstance An instance of a Requestable class
- * @return
+ * @return void
*/
- function testLogin (Requestable $requestInstance);
+ function testLogin (Requestable $requestInstance): void;
}
* @param $userInstance An instance of a user class
* @return void
*/
- function addRecipientByUserInstance (ManageableMember $userInstance);
+ function addRecipientByUserInstance (ManageableMember $userInstance): void;
/**
* Use subject line provided by the (XML) template otherwise a subject line must be set
*
* @return void
*/
- function useSubjectFromTemplate ();
+ function useSubjectFromTemplate (): void;
/**
* Deliver email to the recipient(s)
*
* @return void
*/
- function deliverEmail ();
+ function deliverEmail (): void;
/**
* Send notification to the admin
*
* @return void
*/
- function sendAdminNotification ();
+ function sendAdminNotification (): void;
}
*
* @return void
*/
- function renderMenu ();
+ function renderMenu (): void;
/**
* Transfers the rendered menu to a given template engine by assigning
* @2param $templateInstance An instance of a CompileableTemplate class
* @return void
*/
- function transferContentToTemplateEngine (CompileableTemplate $templateInstance);
+ function transferContentToTemplateEngine (CompileableTemplate $templateInstance): void;
}