public function solveResultIndex (string $databaseColumn, DatabaseFrontend $frontendInstance, array $callback): void {
// Check parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('CACHED-DATABASE-RESULT: databaseColumn=%s,frontendInstance=%s,callback()=%d - CALLED!', $databaseColumn, $frontendInstance->__toString(), count($callback)));
- if (empty($key)) {
+ if (empty($databaseColumn)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
+ throw new InvalidArgumentException('Parameter "databaseColumn" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (count($callback) != 2) {
// Throw it again
throw new InvalidArgumentException(sprintf('callback()=%d must be exactly 2', count($callback)), FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
* @param $innerParserInstance A Parseable instance
* @return $parserInstance An instance of this parser
*/
- public static final function createXmlCompactorDecorator (Parseable $innerParserInstance) {
+ public static final function createXmlCompactorDecorator (Parseable $innerParserInstance): Parseable {
// Get a new instance
$parserInstance = new XmlCompactorDecorator();
* @param $parserInstance An instance of an Parseable
* @return void
*/
- protected final function setParserInstance (Parseable $parserInstance) {
+ protected final function setParserInstance (Parseable $parserInstance): void {
$this->parserInstance = $parserInstance;
}
*
* @return $parserInstance An instance of an Parseable
*/
- private function getParserInstance () {
+ private function getParserInstance (): Parseable {
return $this->parserInstance;
}
* @return void
*/
public function assignMultipleVariables (array $variables): void {
- // Call the inner class' method but trim the characters before
+ // Call the inner class' method
$this->getTemplateInstance()->assignMultipleVariables($variables);
}
+ /**
+ * Load a specified XML template into the engine
+ *
+ * @param $templateName Optional name of template
+ * @return void
+ */
+ public function loadXmlTemplate (string $templateName = ''): void {
+ // Call the inner class' method
+ $this->getTemplateInstance()->loadXmlTemplate($templateName);
+ }
+
+ /**
+ * Getter for current main node
+ *
+ * @return $currMainNode Current main node
+ */
+ public function getCurrMainNode (): string {
+ // Call the inner class' method
+ return $this->getTemplateInstance()->getCurrMainNode();
+ }
+
+ /**
+ * Getter for main node array
+ *
+ * @return $mainNodes Array with valid main node names
+ */
+ public function getMainNodes (): array {
+ // Call the inner class' method
+ return $this->getTemplateInstance()->getMainNodes();
+ }
+
}
/**
* Checks if a DirectoryIterator instance is set
*
- * @return<>$isset<>Whether a DirectoryIterator instance is set
+ * @return $isset Whether a DirectoryIterator instance is set
*/
public final function isDirectoryIteratorInstanceSet (): bool {
return ($this->iteratorInstance instanceof DirectoryIterator);
* @param $appInstance A manageable application
* @return $///Instance An instance of this Filesystem class
*/
- public final static function create???Filesystem (ManageableApplication $appInstance) {
+ public final static function create???Filesystem (ManageableApplication $appInstance): Filesystem {
// Get a new instance
$///Instance = new ???Filesystem();
* @param $extraInstance An extra instance, just for better hash data
* @return $captchaInstance An instance of this captcha class
*/
- public final static function create???Captcha (CompileableTemplate $templateInstance, FrameworkInterface $extraInstance = null) {
+ public final static function create???Captcha (CompileableTemplate $templateInstance, FrameworkInterface $extraInstance = null): SolveableCaptcha {
// Get a new instance
$captchaInstance = new ???Captcha();
* @return void
* @todo 0% done
*/
- public function initiateCaptcha () {
+ public function initiateCaptcha (): void {
DebugMiddleware::getSelfInstance()->partialStub("Please implement this method.");
}
* @return void
* @todo 0% done
*/
- public function renderCode () {
+ public function renderCode (): void {
DebugMiddleware::getSelfInstance()->partialStub("Please implement this method.");
}
* @param $extraInstance An extra instance, just for better hash data
* @return void
*/
- protected final function initializeRandomNumberGenerator (FrameworkInterface $extraInstance = NULL) {
+ protected final function initializeRandomNumberGenerator (FrameworkInterface $extraInstance = NULL): void {
// Get an RNG from factory
$this->setRngInstance(ObjectFactory::createObjectByConfiguredName('rng_class', array($extraInstance)));
}
* @param $imageType Type of the image
* @return $helperInstance A preparedf instance of this helper
*/
- public static final function createImageHelper (CompileableTemplate $templateInstance, string $imageType) {
+ public static final function createImageHelper (CompileableTemplate $templateInstance, string $imageType): HelpableTemplate {
// Get new instance
$helperInstance = new ImageHelper();
* @param $imageType Type of the image
* @return void
*/
- protected final function setImageType (string $imageType) {
+ protected final function setImageType (string $imageType): void {
$this->imageType = $imageType;
}
*
* @return $imageType Type of the image
*/
- public final function getImageType () {
+ public final function getImageType (): string {
return $this->imageType;
}
* @param $baseImage A base image template
* @return void
*/
- public final function setBaseImage (string $baseImage) {
+ public final function setBaseImage (string $baseImage): void {
$this->baseImage = $baseImage;
}
*
* @return $baseImage A base image template
*/
- public final function getBaseImage () {
+ public final function getBaseImage (): string {
return $this->baseImage;
}
* @param $imageName Name of the image
* @return void
*/
- public final function setImageName (string $imageName) {
+ public final function setImageName (string $imageName): void {
$this->imageName = $imageName;
}
*
* @return $imageName Name of the image
*/
- protected final function getImageName () {
+ protected final function getImageName (): string {
return $this->imageName;
}
* @param $width Width of the image
* @return void
*/
- public final function setWidth (int $width) {
+ public final function setWidth (int $width): void {
$this->width = $width;
}
*
* @return $width Width of the image
*/
- public final function getWidth () {
+ public final function getWidth (): int {
return $this->width;
}
* @param $height Height of the image
* @return void
*/
- public final function setHeight (int $height) {
+ public final function setHeight (int $height): void {
$this->height = $height;
}
*
* @return $height Height of the image
*/
- public final function getHeight () {
+ public final function getHeight (): int {
return $this->height;
}
* @param $blue Color value for blue
* @return void
*/
- public final function setBackgroundColorRedGreenBlue ($red, $green, $blue) {
+ public final function setBackgroundColorRedGreenBlue (mixed $red, mixed $green, mixed $blue): void {
// Random numbers?
if ($red === 'rand') {
$red = $this->getRngInstance()->randomNumber(0, 255);
* @param $blue Color value for blue
* @return void
*/
- public final function setForegroundColorRedGreenBlue ($red, $green, $blue) {
+ public final function setForegroundColorRedGreenBlue (mixed $red, mixed $green, mixed $blue): void {
// Random numbers?
if ($red === 'rand') {
$red = $this->getRngInstance()->randomNumber(0, 255);
* Adds an image string to the buffer by the given string name
*
* @param $stringName String name (identifier)
+ * @return void
*/
- public function addTextLine (string $stringName) {
+ public function addTextLine (string $stringName): void {
// Create the image string
$this->imageStrings[$stringName] = array(
'x' => '',
* @param $imageString A message to display in image
* @return void
*/
- public final function setImageString (string $imageString) {
+ public final function setImageString (string $imageString): void {
$this->imageStrings[$this->currString]['string'] = $imageString;
}
*
* @return $imageString A message to display in image
*/
- public final function getImageString () {
+ public final function getImageString (): string {
return $this->imageStrings[$this->currString]['string'];
}
* @param $y Y coordinate
* @return void
*/
- public final function setCoord (int $x, int $y) {
+ public final function setCoord (int $x, int $y): void {
$this->imageStrings[$this->currString]['x'] = $x;
$this->imageStrings[$this->currString]['y'] = $y;
}
*
* @return $x X coordinate
*/
- public final function getX () {
+ public final function getX (): int {
return $this->imageStrings[$this->currString]['x'];
}
*
* @return $y Y coordinate
*/
- public final function getY () {
+ public final function getY (): int {
return $this->imageStrings[$this->currString]['y'];
}
* @param $fontSize Font size for strings
* @return void
*/
- public final function setFontSize ($fontSize) {
+ public final function setFontSize (mixed $fontSize): void {
// Random font size?
if ($fontSize === 'rand') {
$fontSize = $this->getRngInstance()->randomNumber(4, 9);
*
* @return $fontSize Font size for strings
*/
- public final function getFontSize () {
+ public final function getFontSize (): mixed {
return $this->imageStrings[$this->currString]['size'];
}
*
* @return void
*/
- public function flushContent () {
+ public function flushContent (): void {
// Get a template instance
$templateInstance = $this->getTemplateInstance();
* @param $extraInstance An extra instance, just for better hash data
* @return $captchaInstance An instance of this captcha class
*/
- public static final function createGraphicalCodeCaptcha (HelpableTemplate $helperInstance, FrameworkInterface $extraInstance = NULL) {
+ public static final function createGraphicalCodeCaptcha (HelpableTemplate $helperInstance, FrameworkInterface $extraInstance = NULL): SolveableCaptcha {
// Get a new instance
$captchaInstance = new GraphicalCodeCaptcha();
*
* @return void
*/
- public function initiateCaptcha () {
+ public function initiateCaptcha (): void {
// Get total length
$captchaLength = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('captcha_string_length');
*
* @return void
*/
- public function renderCode () {
+ public function renderCode (): void {
// Get helper instance
$helperInstance = $this->getHelperInstance();
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class ???Helper extends BaseHelper {
+class ???Helper extends BaseHelper implements Helper {
/**
* Protected constructor
*
*
* @return $helperInstance A prepared instance of this helper
*/
- public final static function create???Helper () {
+ public final static function create???Helper (): Helper {
// Get new instance
$helperInstance = new ???Helper();
* @return void
* @throws InvalidArgumentException If a parameter has an invalid value
*/
- protected final function addContent (string $newContent) {
+ protected final function addContent (string $newContent): void {
// Check variable
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-HELPER: newContent=%s - CALLED!', $newContent));
if (empty(trim($newContent))) {
* @return void
* @throws InvalidArgumentException If a parameter has an invalid value
*/
- protected function addHeaderContent (string $content) {
+ protected function addHeaderContent (string $content): void {
// Check variable
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-HELPER: content=%s - CALLED!', $content));
if (empty(trim($content))) {
* @return void
* @throws InvalidArgumentException If a parameter has an invalid value
*/
- protected function addFooterContent (string $content) {
+ protected function addFooterContent (string $content): void {
// Check variable
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-HELPER: content=%s - CALLED!', $content));
if (empty(trim($content))) {
* @return void
* @throws InvalidArgumentException If a parameter has an invalid value
*/
- protected final function addContentToPreviousGroup (string $newContent) {
+ protected final function addContentToPreviousGroup (string $newContent): void {
// Check on parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: newContent=%s - CALLED!', $newContent));
if (empty($newContent)) {
*
* @return $content The rendered content by this helper
*/
- protected final function getContent () {
+ protected final function getContent (): string {
return $this->content;
}
* @param $extraInstance An extra instance of FrameworkInterface to set
* @return void
*/
- public final function setExtraInstance (FrameworkInterface $extraInstance) {
+ public final function setExtraInstance (FrameworkInterface $extraInstance): void {
$this->extraInstance = $extraInstance;
}
* @return void
* @throws InvalidArgumentException If a parameter has an invalid value
*/
- public function assignField (string $fieldName) {
+ public function assignField (string $fieldName): void {
// Check on parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: fieldName=%s - CALLED!', $fieldName));
if (empty($fieldName)) {
* @throws InvalidArgumentException If a parameter has an invalid value
* @todo Rewrite this method using a helper class for filtering data
*/
- public function assignFieldWithFilter (string $fieldName, string $filterMethod) {
+ public function assignFieldWithFilter (string $fieldName, string $filterMethod): void {
// Validate parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: fieldName=%s,filterMethod=%s - CALLED!', $fieldName, $filterMethod));
if (empty($fieldName)) {
* @return void
* @throws InvalidArgumentException If a parameter has an invalid value
*/
- public function prefetchValueInstance (string $registryKey, string $extraKey = NULL) {
+ public function prefetchValueInstance (string $registryKey, string $extraKey = NULL): void {
// Validate parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: registryKey=%s,extraKey[%s]=%s - CALLED!', $registryKey, gettype($extraKey), $extraKey));
if (empty($registryKey)) {
* @throws InvalidArgumentException If a parameter has an invalid value
* @throws BadMethodCallException If the group was already created before
*/
- protected function openGroupByIdContent (string $groupId, string $content, string $tag) {
+ protected function openGroupByIdContent (string $groupId, string $content, string $tag): void {
// Is the group already there?
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: groupdId=%s,content=%s,tag=%s - CALLED!', $groupdId, $content, $tag));
if (empty($groupId)) {
* @return void
* @throws HelperNoPreviousOpenedGroupException If no previously opened group was found
*/
- public function closePreviousGroupByContent (string $content = '') {
+ public function closePreviousGroupByContent (string $content = ''): void {
// Check if any sub group was opened before
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: content(%d)=%s - CALLED!', strlen($content), $content));
if ($this->ifSubGroupOpenedPreviously()) {
* @return void
* @throws HelperSubGroupAlreadyCreatedException If the sub group was already created before
*/
- protected function openSubGroupByIdContent (string $subGroupId, string $content, string $tag) {
+ protected function openSubGroupByIdContent (string $subGroupId, string $content, string $tag): void {
//* NOISY-DEBUG: */ echo "OPEN:subGroupId={$subGroupId},content=".htmlentities($content)."<br />\n";
// Is the group already there?
if (empty($subGroupId)) {
* @return void
* @throws HelperNoPreviousOpenedSubGroupException If no previously opened sub group was found
*/
- public function closePreviousSubGroupByContent (string $content = '') {
+ public function closePreviousSubGroupByContent (string $content = ''): void {
// Check if any sub group was opened before
if ($this->ifSubGroupOpenedPreviously() === false) {
// Then throw an exception
*
* @return $content Rendered HTML content
*/
- public function renderContent () {
+ public function renderContent (): string {
// Initialize content
$content = '';
* @return $isOpened Whether the specified group is open
* @throws InvalidArgumentException If a parameter has an invalid value
*/
- protected function ifGroupIsOpened (string $groupId) {
+ protected function ifGroupIsOpened (string $groupId): bool {
// Check on parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: groupId=%s - CALLED!', $groupId));
if (empty($groupId)) {
* @throws InvalidArgumentException If a parameter has an invalid value
* @throws NullPointerException Thrown if $valueInstance is null
*/
- public function getValueField (string $fieldName) {
+ public function getValueField (string $fieldName): mixed {
// Check parameter
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-HELPER: fieldName=%s - CALLED!', $fieldName));
if (empty($fieldName)) {
*
* @return $groupOpened Whether any group was opened before
*/
- protected final function ifGroupOpenedPreviously () {
+ protected final function ifGroupOpenedPreviously (): bool {
$groupOpened = (!empty($this->previousGroupId));
return $groupOpened;
}
*
* @return $subGroupOpened Whether any group was opened before
*/
- protected final function ifSubGroupOpenedPreviously () {
+ protected final function ifSubGroupOpenedPreviously (): bool {
$subGroupOpened = (!empty($this->previousSubGroupId));
return $subGroupOpened;
}
*
* @return $previousGroupId Id of previously opened group
*/
- protected final function getPreviousGroupId () {
+ protected final function getPreviousGroupId (): string {
return $this->previousGroupId;
}
* @param $previousGroupId Id of previously opened group
* @return void
*/
- protected final function setPreviousGroupId (string $previousGroupId) {
+ protected final function setPreviousGroupId (string $previousGroupId): void {
$this->previousGroupId = $previousGroupId;
}
*
* @return $previousSubGroupId Id of previously opened sub group
*/
- protected final function getPreviousSubGroupId () {
+ protected final function getPreviousSubGroupId (): string {
return $this->previousSubGroupId;
}
* @param $previousSubGroupId Id of previously opened sub group
* @return void
*/
- protected final function setPreviousSubGroupId (string $previousSubGroupId) {
+ protected final function setPreviousSubGroupId (string $previousSubGroupId): void {
$this->previousSubGroupId = $previousSubGroupId;
}
* @param $blockName Name of the block we shall generate
* @return $helperInstance A prepared instance of this helper
*/
- public static final function createHtmlBlockHelper (CompileableTemplate $templateInstance, string $blockName) {
+ public static final function createHtmlBlockHelper (CompileableTemplate $templateInstance, string $blockName): HelpableTemplate {
// Get new instance
$helperInstance = new HtmlBlockHelper();
* @param $blockName Name of the block we shall generate
* @return void
*/
- protected final function setBlockName (string $blockName) {
+ protected final function setBlockName (string $blockName): void {
$this->blockName = $blockName;
}
*
* @return $blockName Name of the block we shall generate
*/
- public final function getBlockName () {
+ public final function getBlockName (): string {
return $this->blockName;
}
*
* @return $withRegistration Whether with registration date
*/
- public function ifIncludeRegistrationStamp () {
+ public function ifIncludeRegistrationStamp (): bool {
$withRegistration = FrameworkBootstrap::getConfigurationInstance()->isEnabled('block_shows_registration');
return $withRegistration;
}
* @param $messageId Message id to load an assign
* @return void
*/
- public function assignMessageField (string $templateVariable, string $messageId) {
+ public function assignMessageField (string $templateVariable, string $messageId): void {
// Get message
$message = FrameworkBootstrap::getLanguageInstance()->getMessage($messageId);
* @param $actionValue Action value to assign
* @return void
*/
- public function assignLinkFieldWithAction (string $linkField, $actionValue) {
+ public function assignLinkFieldWithAction (string $linkField, $actionValue): void {
$this->getTemplateInstance()->assignVariable($linkField . '_action', $actionValue);
}
* @param $userStatus Raw user status from database layer
* @return $translated Translated user status
*/
- protected function doFilterUserStatusTranslator (string $userStatus) {
+ protected function doFilterUserStatusTranslator (string $userStatus): string {
// Generate message id
$messageId = sprintf('user_status_%s', strtolower($userStatus));
*
* @return void
*/
- public function flushContent () {
+ public function flushContent (): void {
// Get template instance
$templateInstance = $this->getTemplateInstance();
* @param $???Name Name of the ??? we shall generate
* @return $helperInstance A prepared instance of this helper
*/
- public final static function createHtml???Helper (CompileableTemplate $templateInstance, $???Name) {
+ public final static function createHtml???Helper (CompileableTemplate $templateInstance, $???Name): HelpableTemplate {
// Get new instance
$helperInstance = new Html???Helper();
* @return void
* @todo 0% done
*/
- public function flushContent () {
+ public function flushContent (): void {
DebugMiddleware::getSelfInstance()->partialStub("Please implement this method.");
}
* @param $withForm Whether include the form tag
* @return $helperInstance A preparedf instance of this helper
*/
- public static final function createHtmlFormHelper (CompileableTemplate $templateInstance, string $formName, string $formId = NULL, bool $withForm = true) {
+ public static final function createHtmlFormHelper (CompileableTemplate $templateInstance, string $formName, string $formId = NULL, bool $withForm = true): HelpableTemplate {
// Get new instance
$helperInstance = new HtmlFormHelper();
* @throws InvalidFormNameException If the form name is invalid ( = false)
* @todo Add some unique PIN here to bypass problems with some browser and/or extensions
*/
- public function addFormTag (string $formName = NULL, string $formId = NULL) {
+ public function addFormTag (string $formName = NULL, string $formId = NULL): void {
// When the form is not yet opened at least form name must be valid
if (($this->formOpened === false) && (is_null($formName))) {
// Thrown an exception
* @return void
* @throws FormClosedException If the form is not yet opened
*/
- public function addInputTextField (string $fieldName, string $fieldValue = '') {
+ public function addInputTextField (string $fieldName, string $fieldValue = ''): void {
// Is the form opened?
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
* @param $fieldName Input field name
* @return void
*/
- public function addInputTextFieldWithDefault (string $fieldName) {
+ public function addInputTextFieldWithDefault (string $fieldName): void {
// Get the value from instance
$fieldValue = $this->getValueField($fieldName);
//* DEBUG: */ print __METHOD__.':'.$fieldName.'='.$fieldValue."<br />\n";
* @return void
* @throws FormClosedException If the form is not yet opened
*/
- public function addInputPasswordField (string $fieldName, string $fieldValue = '') {
+ public function addInputPasswordField (string $fieldName, string $fieldValue = ''): void {
// Is the form opened?
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
* @return void
* @throws FormClosedException If the form is not yet opened
*/
- public function addInputHiddenField (string $fieldName, string $fieldValue = '') {
+ public function addInputHiddenField (string $fieldName, string $fieldValue = ''): void {
// Is the form opened?
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
* @param $fieldName Input field name
* @return void
*/
- public function addInputHiddenFieldWithDefault (string $fieldName) {
+ public function addInputHiddenFieldWithDefault (string $fieldName): void {
// Get the value from instance
$fieldValue = $this->getValueField($fieldName);
//* DEBUG: */ print __METHOD__.':'.$fieldName.'='.$fieldValue."<br />\n";
* @param $prefix Prefix for configuration without trailing _
* @return void
*/
- public function addInputHiddenConfiguredField (string $fieldName, string $prefix) {
+ public function addInputHiddenConfiguredField (string $fieldName, string $prefix): void {
// Get the value from instance
$fieldValue = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry("{$prefix}_{$fieldName}");
//* DEBUG: */ print __METHOD__.':'.$fieldName.'='.$fieldValue."<br />\n";
* @return void
* @throws FormClosedException If the form is not yet opened
*/
- public function addInputCheckboxField (string $fieldName, bool $fieldChecked = true) {
+ public function addInputCheckboxField (string $fieldName, bool $fieldChecked = true): void {
// Is the form opened?
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
* @return void
* @throws FormClosedException If the form is not yet opened
*/
- public function addInputResetButton (string $buttonText) {
+ public function addInputResetButton (string $buttonText): void {
// Is the form opened?
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
* @return void
* @throws FormClosedException If the form is not yet opened
*/
- public function addInputSubmitButton (string $buttonText) {
+ public function addInputSubmitButton (string $buttonText): void {
// Is the form opened?
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
* @throws FormClosedException If no form has been opened before
* @throws InvalidArgumentException If $groupId is not set
*/
- public function addFormGroup (string $groupId = '', string $groupText = '') {
+ public function addFormGroup (string $groupId = '', string $groupText = ''): void {
// Is a form opened?
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw exception here
// Same group to open?
if (($this->ifGroupOpenedPreviously() === false) && ($groupId === $this->getPreviousGroupId())) {
// Abort here silently
- return false;
+ return;
}
// Initialize content with closing div by default
* @throws FormFormClosedException If no group has been opened before
* @throws InvalidArgumentException If $subGroupId is not set
*/
- public function addFormSubGroup (string $subGroupId = '', string $subGroupText = '') {
+ public function addFormSubGroup (string $subGroupId = '', string $subGroupText = ''): void {
// Is a group opened?
if ($this->ifGroupOpenedPreviously() === false) {
// Throw exception here
// Same sub group to open?
if (($this->ifSubGroupOpenedPreviously() === false) && ($subGroupId == $this->getPreviousSubGroupId())) {
// Abort here silently
- return false;
+ return;
}
// Initialize content with closing div by default
* @return void
* @throws FormClosedException If the form is not yet opened
*/
- public function addFieldLabel (string $fieldName, string $fieldText, string $fieldTitle = '') {
+ public function addFieldLabel (string $fieldName, string $fieldText, string $fieldTitle = ''): void {
// Is the form opened?
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
* @return void
* @throws FormClosedException If the form is not yet opened
*/
- public function addFormNote (string $noteId, string $formNotes) {
+ public function addFormNote (string $noteId, string $formNotes): void {
// Is the form opened?
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
* @return void
* @throws FormClosedException If the form is not yet opened
*/
- public function addInputSelectField (string $selectId, string $firstEntry) {
+ public function addInputSelectField (string $selectId, string $firstEntry): void {
// Is the form group opened?
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
* @throws HelperNoPreviousOpenedSubGroupException If no previously opened sub group was found
* @todo Add checking if sub option is already added
*/
- public function addSelectSubOption (string $subName, string $subValue) {
+ public function addSelectSubOption (string $subName, string $subValue): void {
// Is there a sub group (shall be a selection box!)
if ($this->ifSubGroupOpenedPreviously() === false) {
// Then throw an exception here
* @throws HelperNoPreviousOpenedSubGroupException If no previously opened sub group was found
* @todo Add checking if sub option is already added
*/
- public function addSelectOption (string $optionName, string $optionValue) {
+ public function addSelectOption (string $optionName, string $optionValue): void {
// Is there a sub group (shall be a selection box!)
if ($this->ifSubGroupOpenedPreviously() === false) {
// Then throw an exception here
*
* @return void
*/
- public function addCaptcha () {
+ public function addCaptcha (): void {
// Init instance
$extraInstance = NULL;
* @param $formEnabled Whether form is enabled or disabled
* @return void
*/
- public final function enableForm (bool $formEnabled = true) {
+ public final function enableForm (bool $formEnabled = true): void {
$this->formEnabled = $formEnabled;
}
* @param $formName Name of this form
* @return void
*/
- public final function setFormName (string $formName) {
+ public final function setFormName (string $formName): void {
$this->formName = $formName;
}
*
* @return $formName Name of this form
*/
- public final function getFormName () {
+ public final function getFormName (): string {
return $this->formName;
}
* @param $formId Id of this form
* @return void
*/
- public final function setFormId (string $formId) {
+ public final function setFormId (string $formId): void {
$this->formId = $formId;
}
*
* @return $formId Id of this form
*/
- public final function getFormId () {
+ public final function getFormId (): string {
return $this->formId;
}
*
* @return $required Whether the email address is required
*/
- public function ifRegisterRequiresEmailVerification () {
+ public function ifRegisterRequiresEmailVerification (): bool {
$required = FrameworkBootstrap::getConfigurationInstance()->isEnabled('register_requires_email');
return $required;
}
*
* @return $required Whether profile data shall be asked
*/
- public function ifRegisterIncludesProfile () {
+ public function ifRegisterIncludesProfile (): bool {
$required = FrameworkBootstrap::getConfigurationInstance()->isEnabled('register_includes_profile');
return $required;
}
*
* @return $isSecured Whether this form is secured by a CAPTCHA
*/
- public function ifFormSecuredWithCaptcha () {
+ public function ifFormSecuredWithCaptcha (): bool {
$isSecured = FrameworkBootstrap::getConfigurationInstance()->isEnabled($this->getFormName() . '_captcha_secured');
return $isSecured;
}
*
* @return $required Whether personal data shall be asked
*/
- public function ifRegisterIncludesPersonaData () {
+ public function ifRegisterIncludesPersonaData (): bool {
$required = FrameworkBootstrap::getConfigurationInstance()->isEnabled('register_personal_data');
return $required;
}
*
* @return $required Whether birthday shall be asked
*/
- public function ifProfileIncludesBirthDay () {
+ public function ifProfileIncludesBirthDay (): bool {
$required = FrameworkBootstrap::getConfigurationInstance()->isEnabled('profile_includes_birthday');
return $required;
}
*
* @return $isUnique
*/
- public function ifEmailMustBeUnique () {
+ public function ifEmailMustBeUnique (): bool {
$isUnique = FrameworkBootstrap::getConfigurationInstance()->isEnabled('register_email_unique');
return $isUnique;
}
*
* @return $required Whether the specified chat protocol is enabled
*/
- public function ifChatEnabled (string $chatProtocol) {
+ public function ifChatEnabled (string $chatProtocol): bool {
$required = FrameworkBootstrap::getConfigurationInstance()->isEnabled('chat_protocol_' . $chatProtocol);
return $required;
}
*
* @return $isEnabled Whether the login is enabled or disabled
*/
- public function ifLoginIsEnabled () {
+ public function ifLoginIsEnabled (): bool {
$isEnabled = FrameworkBootstrap::getConfigurationInstance()->isEnabled('user_login');
return $isEnabled;
}
*
* @return $isEnabled Whether the login shall be done by username
*/
- public function ifLoginWithUsername () {
+ public function ifLoginWithUsername (): bool {
$isEnabled = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_type') == 'username');
return $isEnabled;
}
*
* @return $isEnabled Whether the login shall be done by email
*/
- public function ifLoginWithEmail () {
+ public function ifLoginWithEmail (): bool {
$isEnabled = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_type') == 'email');
return $isEnabled;
}
*
* @return $isAllowed Whether guest login is allowed
*/
- public function ifGuestLoginAllowed () {
+ public function ifGuestLoginAllowed (): bool {
$isAllowed = FrameworkBootstrap::getConfigurationInstance()->isEnabled('guest_login');
return $isAllowed;
}
*
* @return $requireConfirm Whether email change must be confirmed
*/
- public function ifEmailChangeRequireConfirmation () {
+ public function ifEmailChangeRequireConfirmation (): bool {
$requireConfirm = FrameworkBootstrap::getConfigurationInstance()->isEnabled('email_change_confirmation');
return $requireConfirm;
}
* @return $rulesUpdated Whether rules has been updated
* @todo Implement check if rules have been changed
*/
- public function ifRulesHaveChanged () {
+ public function ifRulesHaveChanged (): bool {
return false;
}
*
* @return $emailChange Whether changing email address is allowed
*/
- public function ifEmailChangeAllowed () {
+ public function ifEmailChangeAllowed (): bool {
$emailChange = FrameworkBootstrap::getConfigurationInstance()->isEnabled('email_change');
return $emailChange;
}
*
* @return $isUnconfirmed Whether the user account is unconfirmed
*/
- public function ifUserAccountUnconfirmed () {
+ public function ifUserAccountUnconfirmed (): bool {
$isUnconfirmed = ($this->getValueField(UserDatabaseFrontend::DB_COLUMN_USER_STATUS) === FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_unconfirmed'));
return $isUnconfirmed;
}
*
* @return $isUnconfirmed Whether the user account is locked
*/
- public function ifUserAccountLocked () {
+ public function ifUserAccountLocked (): bool {
$isUnconfirmed = ($this->getValueField(UserDatabaseFrontend::DB_COLUMN_USER_STATUS) === FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_locked'));
return $isUnconfirmed;
}
*
* @return $isUnconfirmed Whether the user account is a guest
*/
- public function ifUserAccountGuest () {
+ public function ifUserAccountGuest (): bool {
$isUnconfirmed = ($this->getValueField(UserDatabaseFrontend::DB_COLUMN_USER_STATUS) === FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_guest'));
return $isUnconfirmed;
}
*
* @return $refillActive Whether the refill page is active
*/
- public function ifRefillPageActive () {
+ public function ifRefillPageActive (): bool {
$refillActive = FrameworkBootstrap::getConfigurationInstance()->isEnabled('refill_page_active');
return $refillActive;
}
* @return void
* @throws FormOpenedException If the form is still open
*/
- public function flushContent () {
+ public function flushContent (): void {
// Is the form still open?
if (($this->formOpened === true) && ($this->formEnabled === true)) {
// Close the form automatically
* @return $helperInstance A prepared instance of this helper
* @throws NoConfigEntryException A deprecated exception at this point
*/
- public static final function createHtmlLinkHelper (CompileableTemplate $templateInstance, string $linkName, $linkBase = NULL) {
+ public static final function createHtmlLinkHelper (CompileableTemplate $templateInstance, string $linkName, $linkBase = NULL): HelpableTemplate {
// Get new instance
$helperInstance = new HtmlLinkHelper();
* @param $extraContent Optional extra HTML content
* @return $linkContent Rendered text link content
*/
- private function renderLinkContentWithTextExtraContent (string $linkText, string $linkTitle, string $extraContent = '') {
+ private function renderLinkContentWithTextExtraContent (string $linkText, string $linkTitle, string $extraContent = ''): string {
// Construct link content
$linkContent = sprintf('<a href="{?base_url?}/%s%s" title="%s">%s</a>',
$this->getLinkBase(),
* @param $linkName Name of the link we shall generate
* @return void
*/
- protected final function setLinkName (string $linkName) {
+ protected final function setLinkName (string $linkName): void {
$this->linkName = $linkName;
}
*
* @return $linkName Name of the link we shall generate
*/
- public final function getLinkName () {
+ public final function getLinkName (): string {
return $this->linkName;
}
* @param $linkBase Base of the link we shall generate
* @return void
*/
- protected final function setLinkBase (string $linkBase) {
+ protected final function setLinkBase (string $linkBase): void {
$this->linkBase = $linkBase;
}
*
* @return $linkBase Base of the link we shall generate
*/
- public final function getLinkBase () {
+ public final function getLinkBase (): string {
return $this->linkBase;
}
* @return void
* @todo Completely unimplemented
*/
- public function flushContent () {
+ public function flushContent (): void {
// Is a previous opened group still open?
if ($this->ifGroupOpenedPreviously()) {
// Then close it
* @param $groupCode Code to open and close groups
* @return void
*/
- public function addLinkGroup (string $groupId, string $groupText, string $groupCode = 'div') {
+ public function addLinkGroup (string $groupId, string $groupText, string $groupCode = 'div'): void {
// Is a group with that name open?
if ($this->ifGroupOpenedPreviously()) {
// Then close it here
* @return void
* @throws NoGroupOpenedException If no previous group was opened
*/
- public function addLinkNote (string $groupId, string $groupNote, string $groupCode = 'div') {
+ public function addLinkNote (string $groupId, string $groupNote, string $groupCode = 'div'): void {
// Check if a previous group was opened
if ($this->ifGroupOpenedPreviously() === false) {
// No group was opened before!
* @return void
* @throws NoGroupOpenedException If no previous group was opened
*/
- protected function addActionLink (string $linkAction, string $linkText, string $linkTitle) {
+ protected function addActionLink (string $linkAction, string $linkText, string $linkTitle): void {
// Check if a previous group was opened
if ($this->ifGroupOpenedPreviously() === false) {
// No group was opened before!
* @param $languageId Language id string to use
* @return void
*/
- public function addActionLinkById (string $linkAction, string $languageId) {
+ public function addActionLinkById (string $linkAction, string $languageId): void {
// Resolve the language string
$languageResolvedText = FrameworkBootstrap::getLanguageInstance()->getMessage('link_' . $languageId . '_text');
* @param $languageId Language id string to use
* @return void
*/
- public function addLinkWithTextById (string $languageId) {
+ public function addLinkWithTextById (string $languageId): void {
// Resolve the language string
$languageResolvedText = FrameworkBootstrap::getLanguageInstance()->getMessage('link_' . $languageId . '_text');
* @param $colorMode Whether background or foreground color
* @param $colorChannel Red, green or blue channel?
* @param $colorValue Value to set
+ * @return void
*/
- private function setColor (string $colorMode, string $colorChannel, $colorValue) {
+ private function setColor (string $colorMode, string $colorChannel, $colorValue): void {
// Construct the eval() command
$eval = sprintf("\$this->%s['%s'] = \"%s\";",
$colorMode,
* @param $width Width of the image
* @return void
*/
- public final function setWidth (int $width) {
+ public final function setWidth (int $width): void {
$this->width = $width;
}
*
* @return $width Width of the image
*/
- public final function getWidth () {
+ public final function getWidth (): int {
return $this->width;
}
* @param $height Height of the image
* @return void
*/
- public final function setHeight (int $height) {
+ public final function setHeight (int $height): void {
$this->height = $height;
}
*
* @return $height Height of the image
*/
- public final function getHeight () {
+ public final function getHeight (): int {
return $this->height;
}
* @return void
* @todo Find something usefull for this method.
*/
- public function finishType () {
+ public function finishType (): void {
// Empty at the momemt
}
* @return void
* @todo Find something usefull for this method.
*/
- public function initResolution () {
+ public function initResolution (): void {
// Empty at the momemt
}
* @return void
* @todo Find something usefull for this method.
*/
- public function finishResolution () {
+ public function finishResolution (): void {
// Empty at the momemt
}
* @return void
* @todo Find something usefull for this method.
*/
- public function initBase () {
+ public function initBase (): void {
// Empty at the momemt
}
* @return void
* @todo Find something usefull for this method.
*/
- public function finishBase () {
+ public function finishBase (): void {
// Empty at the momemt
}
*
* @return void
*/
- public function initBackgroundColor () {
+ public function initBackgroundColor (): void {
$this->colorMode = 'backgroundColor';
}
* @return void
* @todo Find something usefull for this method.
*/
- public function finishBackgroundColor () {
+ public function finishBackgroundColor (): void {
// Empty at the moment
}
*
* @return void
*/
- public function initForegroundColor () {
+ public function initForegroundColor (): void {
$this->colorMode = 'foregroundColor';
}
* @return void
* @todo Find something usefull for this method.
*/
- public function finishForegroundColor () {
+ public function finishForegroundColor (): void {
// Empty at the moment
}
* @return void
* @todo Find something usefull for this method.
*/
- public function initImageString (string $groupable = 'single') {
+ public function initImageString (string $groupable = 'single'): void {
$this->groupable = $groupable;
}
* @return void
* @todo Find something usefull for this method.
*/
- public function finishImageString () {
+ public function finishImageString (): void {
// Empty at the momemt
}
* @param $red Red color value
* @return void
*/
- public final function setRed ($red) {
+ public final function setRed ($red): void {
// Set image color
$this->setColor($this->colorMode, 'red', $red);
}
* @param $green Green color value
* @return void
*/
- public final function setGreen ($green) {
+ public final function setGreen ($green): void {
// Set image color
$this->setColor($this->colorMode, 'green', $green);
}
* @param $blue Blue color value
* @return void
*/
- public final function setBlue ($blue) {
+ public final function setBlue ($blue): void {
// Set image color
$this->setColor($this->colorMode, 'blue', $blue);
}
* @param $string String to set in image
* @return void
*/
- public final function setString (string $string) {
+ public final function setString (string $string): void {
$this->imageString = $string;
}
*
* @return $string String to set in image
*/
- public final function getString () {
+ public final function getString (): string {
return $this->imageString;
}
/**
* Setter for image type
*
- * @param $imageType Type to set in image
+ * @param $imageType Type to set in image
* @return void
*/
- protected final function setImageType (string $imageType) {
+ protected final function setImageType (string $imageType): void {
$this->imageType = $imageType;
}
/**
* Getter for image type
*
- * @return $imageType Type to set in image
+ * @return $imageType Type to get from image
*/
- public final function getImageType () {
+ public final function getImageType (): string {
return $this->imageType;
}
* @param $name Name of the image
* @return void
*/
- public final function setImageName (string $name) {
+ public final function setImageName (string $name): void {
$this->imageName = $name;
}
*
* @return $name Name of the image
*/
- public final function getImageName () {
+ public final function getImageName (): string {
return $this->imageName;
}
* @param $x X coordinate
* @return void
*/
- public final function setX (int $x) {
+ public final function setX (int $x): void {
$this->x = $x;
}
*
* @return $x X coordinate
*/
- public final function getX () {
+ public final function getX (): int {
return $this->x;
}
* @param $y Y coordinate
* @return void
*/
- public final function setY (int $y) {
+ public final function setY (int $y): void {
$this->y = $y;
}
*
* @return $y Y coordinate
*/
- public final function getY () {
+ public final function getY (): int {
return $this->y;
}
* @param $fontSize Font size for strings
* @return void
*/
- public final function setFontSize (int $fontSize) {
+ public final function setFontSize (int $fontSize): void {
$this->fontSize = $fontSize;
}
*
* @return $fontSize Font size for strings
*/
- public final function getFontSize () {
+ public final function getFontSize (): int {
return $this->fontSize;
}
* @param $stringName String name to set
* @return void
*/
- public final function setStringName(string $stringName) {
+ public final function setStringName(string $stringName): void {
$this->stringName = $stringName;
}
*
* @return void
*/
- public function finishImage () {
+ public function finishImage (): void {
// Compile width and height
$width = $this->getTemplateInstance()->compileRawCode($this->getWidth());
$height = $this->getTemplateInstance()->compileRawCode($this->getHeight());
*
* @return $imageContent The raw image content
*/
- public function getContent () {
+ public function getContent (): string {
// Get cache file name
$cacheFile = $this->getTemplateInstance()->getImageCacheFile();
*
* @return $iteratorInstance An instance of a Iterator class
*/
- public final static function create???Iterator () {
+ public final static function create???Iterator (): Iterator {
// Get new instance
$iteratorInstance = new ???Iterator();
* @param $listInstance A list of a Listable
* @return $iteratorInstance An instance a Iterator class
*/
- public static final function createDefaultIterator (Listable $listInstance): DefaultIterator {
+ public static final function createDefaultIterator (Listable $listInstance): Iterator {
// Get new instance
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('DEFAULT-ITERATOR: listInstance=%s - CALLED!', $listInstance));
$iteratorInstance = new DefaultIterator();
* @param $binaryFileInstance An instance of a BinaryFile class
* @return $iteratorInstance An instance of a Iterator class
*/
- public final static function createFileIterator (BinaryFile $binaryFileInstance): FileIterator {
+ public final static function createFileIterator (BinaryFile $binaryFileInstance): SeekableIterator {
// Get new instance
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-ITERATOR: binaryFileInstance=%s - CALLED!', $binaryFileInstance->__toString()));
$iteratorInstance = new FileIterator();
* @param $registryInstance An instance of a Register class
* @return $iteratorInstance An instance of a Iterator class
*/
- public final static function createRegistryIterator (Register $registryInstance): RegistryIterator {
+ public final static function createRegistryIterator (Register $registryInstance): IteratableRegistry {
// Get new instance
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('REGISTRY-ITERATOR: registryInstance=%s - CALLED!', $registryInstance->__toString()));
$iteratorInstance = new RegistryIterator();
* @param $templateInstance A CompileableTemplate instance
* @return $parserInstance An instance of this parser
*/
- public static final function createXmlParser (CompileableTemplate $templateInstance) {
+ public static final function createXmlParser (CompileableTemplate $templateInstance): Parseable {
// Get a new instance
$parserInstance = new XmlParser();
/**
* Main nodes in the XML tree ('image' is ignored)
*/
- private $mainNodes = array(
+ private $mainNodes = [
'base',
'type',
'resolution',
'background-color',
'foreground-color',
'image-string'
- );
+ ];
/**
* Sub nodes in the XML tree
*/
- private $subNodes = array(
+ private $subNodes = [
'name',
'string-name',
'x',
'green',
'blue',
'text'
- );
+ ];
/**
* Current main node
* @throws BasePathReadProtectedException If $templateBasePath is
* read-protected
*/
- public static final function createImageTemplateEngine () {
+ public static final function createImageTemplateEngine (): CompileableTemplate {
// Get a new instance
$templateInstance = new ImageTemplateEngine();
*
* @return $currMainNode Current main node
*/
- public final function getCurrMainNode () {
+ public final function getCurrMainNode (): string {
return $this->currMainNode;
}
*
* @return $mainNodes Array with valid main node names
*/
- public final function getMainNodes () {
+ public final function getMainNodes (): array {
return $this->mainNodes;
}
*
* @return $subNodes Array with valid sub node names
*/
- public final function getSubNodes () {
+ public final function getSubNodes (): array {
return $this->subNodes;
}
* @param $imageInstance An instance of an image
* @return void
*/
- public final function setImageInstance (BaseImage $imageInstance) {
+ public final function setImageInstance (BaseImage $imageInstance): void {
$this->imageInstance = $imageInstance;
}
*
* @return $imageInstance An instance of an image
*/
- public final function getImageInstance () {
+ public final function getImageInstance (): BaseImage {
return $this->imageInstance;
}
* @return void
* @todo Add cache creation here
*/
- private function initImage () {
+ private function initImage (): void {
// Unfinished work!
}
* @param $imageType Code fragment or direct value holding the image type
* @return void
*/
- private function setImageType (string $imageType) {
+ private function setImageType (string $imageType): void {
// Set group to general
$this->setVariableGroup('general');
*
* @return void
*/
- private function setImageResolution () {
+ private function setImageResolution (): void {
// Call the image class
$this->getImageInstance()->initResolution();
* @return void
* @see ImageTemplateEngine::setImageResolution
*/
- private function setImageBase () {
+ private function setImageBase (): void {
// Call the image class
$this->getImageInstance()->initBase();
* @return void
* @see ImageTemplateEngine::setImageResolution
*/
- private function setImageBackgroundColor () {
+ private function setImageBackgroundColor (): void {
// Call the image class
$this->getImageInstance()->initBackgroundColor();
* @return void
* @see ImageTemplateEngine::setImageResolution
*/
- private function setImageForegroundColor () {
+ private function setImageForegroundColor (): void {
// Call the image class
$this->getImageInstance()->initForegroundColor();
* @return void
* @see ImageTemplateEngine::setImageResolution
*/
- private function setImageImageString (string $groupable = 'single') {
+ private function setImageImageString (string $groupable = 'single'): void {
// Call the image class
$this->getImageInstance()->initImageString($groupable);
* @param $imageName Name of the image
* @return void
*/
- private function setImagePropertyName (string $imageName) {
+ private function setImagePropertyName (string $imageName): void {
// Call the image class
$this->getImageInstance()->setImageName($imageName);
}
* @param $width Width of the image or variable
* @return void
*/
- private function setImagePropertyWidth (int $width) {
+ private function setImagePropertyWidth (int $width): void {
// Call the image class
$this->getImageInstance()->setWidth($width);
}
* @param $height Height of the image or variable
* @return void
*/
- private function setImagePropertyHeight (int $height) {
+ private function setImagePropertyHeight (int $height): void {
// Call the image class
$this->getImageInstance()->setHeight($height);
}
* @param $red Red color value
* @return void
*/
- private function setImagePropertyRed ($red) {
+ private function setImagePropertyRed ($red): void {
// Call the image class
$this->getImageInstance()->setRed($red);
}
* @param $green Green color value
* @return void
*/
- private function setImagePropertyGreen ($green) {
+ private function setImagePropertyGreen ($green): void {
// Call the image class
$this->getImageInstance()->setGreen($green);
}
* @param $blue Blue color value
* @return void
*/
- private function setImagePropertyBlue ($blue) {
+ private function setImagePropertyBlue ($blue): void {
// Call the image class
$this->getImageInstance()->setBlue($blue);
}
* @param $stringName String name (identifier)
* @return void
*/
- private function setImagePropertyStringName (string $stringName) {
+ private function setImagePropertyStringName (string $stringName): void {
// Call the image class
$this->getImageInstance()->setStringName($stringName);
}
* @param $fontSize Size of the font
* @return void
*/
- private function setImagePropertyFontSize (int $fontSize) {
+ private function setImagePropertyFontSize (int $fontSize): void {
// Call the image class
$this->getImageInstance()->setFontSize($fontSize);
}
* @param $imageString Image string to set
* @return void
*/
- private function setImagePropertyText (string $imageString) {
+ private function setImagePropertyText (string $imageString): void {
// Call the image class
$this->getImageInstance()->setString($imageString);
}
* @param $x X coordinate
* @return void
*/
- private function setImagePropertyX (int $x) {
+ private function setImagePropertyX (int $x): void {
// Call the image class
$this->getImageInstance()->setX($x);
}
* @param $y Y coordinate
* @return void
*/
- private function setImagePropertyY (int $y) {
+ private function setImagePropertyY (int $y): void {
// Call the image class
$this->getImageInstance()->setY($y);
}
*
* @return $fileInstance An instance of a SplFileInfo class
*/
- public function getImageCacheFile () {
+ public function getImageCacheFile (): SplFileInfo {
// Get the instance ready
$fileInstance = new SplFileInfo(sprintf('%s%s%s/%s.%s',
FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('root_base_path'),
* @return void
* @todo Nothing to really "transfer" here?
*/
- public function transferToResponse (Responseable $responseInstance) {
+ public function transferToResponse (Responseable $responseInstance): void {
// Set the image instance
$responseInstance->setImageInstance($this->getImageInstance());
}
* located in 'image' by default
* @return void
*/
- public function loadImageTemplate (string $template) {
+ public function loadImageTemplate (string $template): void {
// Set template type
$this->setTemplateType(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('image_template_type'));
*
* @param $typePrefix Type prefix
* @param $xmlTemplateType Type of XML template
- * @return $templateInstance An instance of TemplateEngine
+ * @return void
* @throws InvalidArgumentException If a parameter has an invalid value
* @throws BasePathIsEmptyException If the provided $templateBasePath is empty
* @throws InvalidBasePathStringException If $templateBasePath is no string
* @throws BasePathReadProtectedException If $templateBasePath is
* read-protected
*/
- protected function initXmlTemplateEngine (string $typePrefix, string $xmlTemplateType) {
+ protected function initXmlTemplateEngine (string $typePrefix, string $xmlTemplateType): void {
// Check on parameter
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-XML-TEMPLATE-ENGINE: typePrefix=%s,xmlTemplateType=%s - CALLED!', $typePrefix, $xmlTemplateType));
if (empty($typePrefix)) {
* @param $templateName Optional name of template
* @return void
*/
- public function loadXmlTemplate (string $templateName = '') {
+ public function loadXmlTemplate (string $templateName = ''): void {
// Is the template name empty?
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-XML-TEMPLATE-ENGINE: templateName=%s - CALLED!', $templateName));
if (empty($templateName)) {
*
* @return $currMainNode Current main node
*/
- public final function getCurrMainNode () {
+ public final function getCurrMainNode (): string {
return $this->curr['main_node'];
}
* Setter for current main node
*
* @param $element Element name to set as current main node
- * @return $currMainNode Current main node
+ * @return void
*/
- private function setCurrMainNode (string $element) {
+ private function setCurrMainNode (string $element): void {
$this->curr['main_node'] = $element;
}
*
* @return $mainNodes Array with valid main node names
*/
- public final function getMainNodes () {
+ public final function getMainNodes (): array {
return $this->mainNodes;
}
*
* @return $stackerName Name of stacker of this class
*/
- protected final function getStackerName () {
+ protected final function getStackerName (): string {
return $this->stackerName;
}
* @param $subNodes Array with valid sub node names
* @return void
*/
- public final function setSubNodes (array $subNodes) {
+ public final function setSubNodes (array $subNodes): void {
$this->subNodes = $subNodes;
}
*
* @return $subNodes Array with valid sub node names
*/
- public final function getSubNodes () {
+ public final function getSubNodes (): array {
return $this->subNodes;
}
* @param $key Key to read from
* @return $value Value from variable
*/
- public function readXmlData (string $key) {
+ public function readXmlData (string $key): mixed {
// Is key parameter valid?
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-XML-TEMPLATE-ENGINE: key=%s - CALLED!', $key));
if (empty($key)) {
/**
* Getter for handler name
*
- * @return<>$handlerNameName of this handler
+ * @return $handlerName Name of this handler
*/
function getHandlerName (): string;
*/
interface CompileableXmlTemplate extends CompileableTemplate {
+ /**
+ * Load a specified XML template into the engine
+ *
+ * @param $templateName Optional name of template
+ * @return void
+ */
+ function loadXmlTemplate (string $templateName = ''): void;
+
/**
* Renders the given XML content
*
*/
function compactContent (string $uncompactedContent): string;
+ /**
+ * Getter for current main node
+ *
+ * @return $currMainNode Current main node
+ */
+ function getCurrMainNode (): string;
+
+ /**
+ * Getter for main node array
+ *
+ * @return $mainNodes Array with valid main node names
+ */
+ function getMainNodes (): array;
+
}