+ /**
+ * Getter for the list instance
+ *
+ * @return $listInstance A list of Listable
+ */
+ protected final function getListInstance () {
+ return $this->listInstance;
+ }
+
+ /**
+ * Setter for the menu instance
+ *
+ * @param $menuInstance A RenderableMenu instance
+ * @return void
+ */
+ protected final function setMenuInstance (RenderableMenu $menuInstance) {
+ $this->menuInstance = $menuInstance;
+ }
+
+ /**
+ * Getter for the menu instance
+ *
+ * @return $menuInstance A RenderableMenu instance
+ */
+ protected final function getMenuInstance () {
+ return $this->menuInstance;
+ }
+
+ /**
+ * Setter for image instance
+ *
+ * @param $imageInstance An instance of an image
+ * @return void
+ */
+ public final function setImageInstance (BaseImage $imageInstance) {
+ $this->imageInstance = $imageInstance;
+ }
+
+ /**
+ * Getter for image instance
+ *
+ * @return $imageInstance An instance of an image
+ */
+ public final function getImageInstance () {
+ return $this->imageInstance;
+ }
+
+ /**
+ * Setter for stacker instance
+ *
+ * @param $stackInstance An instance of an stacker
+ * @return void
+ */
+ public final function setStackInstance (Stackable $stackInstance) {
+ $this->stackInstance = $stackInstance;
+ }
+
+ /**
+ * Getter for stacker instance
+ *
+ * @return $stackInstance An instance of an stacker
+ */
+ public final function getStackInstance () {
+ return $this->stackInstance;
+ }
+
+ /**
+ * Setter for compressor instance
+ *
+ * @param $compressorInstance An instance of an compressor
+ * @return void
+ */
+ public final function setCompressorInstance (Compressor $compressorInstance) {
+ $this->compressorInstance = $compressorInstance;
+ }
+
+ /**
+ * Getter for compressor instance
+ *
+ * @return $compressorInstance An instance of an compressor
+ */
+ public final function getCompressorInstance () {
+ return $this->compressorInstance;
+ }
+
+ /**
+ * Setter for Parseable instance
+ *
+ * @param $parserInstance An instance of an Parseable
+ * @return void
+ */
+ public final function setParserInstance (Parseable $parserInstance) {
+ $this->parserInstance = $parserInstance;
+ }
+
+ /**
+ * Getter for Parseable instance
+ *
+ * @return $parserInstance An instance of an Parseable
+ */
+ public final function getParserInstance () {
+ return $this->parserInstance;
+ }
+
+ /**
+ * Setter for HandleableProtocol instance
+ *
+ * @param $protocolInstance An instance of an HandleableProtocol
+ * @return void
+ */
+ public final function setProtocolInstance (HandleableProtocol $protocolInstance = NULL) {
+ $this->protocolInstance = $protocolInstance;
+ }
+
+ /**
+ * Getter for HandleableProtocol instance
+ *
+ * @return $protocolInstance An instance of an HandleableProtocol
+ */
+ public final function getProtocolInstance () {
+ return $this->protocolInstance;
+ }
+
+ /**
+ * Setter for DatabaseWrapper instance
+ *
+ * @param $wrapperInstance An instance of an DatabaseWrapper
+ * @return void
+ */
+ public final function setWrapperInstance (DatabaseWrapper $wrapperInstance) {
+ $this->wrapperInstance = $wrapperInstance;
+ }
+
+ /**
+ * Getter for DatabaseWrapper instance
+ *
+ * @return $wrapperInstance An instance of an DatabaseWrapper
+ */
+ public final function getWrapperInstance () {
+ return $this->wrapperInstance;
+ }
+
+ /**
+ * Setter for socket resource
+ *
+ * @param $socketResource A valid socket resource
+ * @return void
+ */
+ public final function setSocketResource ($socketResource) {
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($this->__toString() . '::' . __FUNCTION__ . ': socketResource=' . $socketResource . ',previous[' . gettype($this->socketResource) . ']=' . $this->socketResource);
+ $this->socketResource = $socketResource;
+ }
+
+ /**
+ * Getter for socket resource
+ *
+ * @return $socketResource A valid socket resource
+ */
+ public final function getSocketResource () {
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($this->__toString() . '::' . __FUNCTION__ . ': socketResource[' . gettype($this->socketResource) . ']=' . $this->socketResource);
+ return $this->socketResource;
+ }
+
+ /**
+ * Setter for regular expression
+ *
+ * @param $regularExpression A valid regular expression
+ * @return void
+ */
+ public final function setRegularExpression ($regularExpression) {
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($this->__toString() . '::' . __FUNCTION__ . ': regularExpression=' . $regularExpression . ',previous[' . gettype($this->regularExpression) . ']=' . $this->regularExpression);
+ $this->regularExpression = $regularExpression;
+ }
+
+ /**
+ * Getter for regular expression
+ *
+ * @return $regularExpression A valid regular expression
+ */
+ public final function getRegularExpression () {
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($this->__toString() . '::' . __FUNCTION__ . ': regularExpression[' . gettype($this->regularExpression) . ']=' . $this->regularExpression);
+ return $this->regularExpression;
+ }
+
+ /**
+ * Setter for helper instance
+ *
+ * @param $helperInstance An instance of a helper class
+ * @return void
+ */
+ protected final function setHelperInstance (Helper $helperInstance) {
+ $this->helperInstance = $helperInstance;
+ }
+
+ /**
+ * Getter for helper instance
+ *
+ * @return $helperInstance An instance of a helper class
+ */
+ public final function getHelperInstance () {
+ return $this->helperInstance;
+ }
+
+ /**
+ * Setter for a Sourceable instance
+ *
+ * @param $sourceInstance The Sourceable instance
+ * @return void
+ */
+ protected final function setSourceInstance (Sourceable $sourceInstance) {
+ $this->sourceInstance = $sourceInstance;
+ }
+
+ /**
+ * Getter for a Sourceable instance
+ *
+ * @return $sourceInstance The Sourceable instance
+ */
+ protected final function getSourceInstance () {
+ return $this->sourceInstance;
+ }
+
+ /**
+ * Getter for a InputStream instance
+ *
+ * @param $inputStreamInstance The InputStream instance
+ */
+ protected final function getInputStreamInstance () {
+ return $this->inputStreamInstance;
+ }
+
+ /**
+ * Setter for a InputStream instance
+ *
+ * @param $inputStreamInstance The InputStream instance
+ * @return void
+ */
+ protected final function setInputStreamInstance (InputStream $inputStreamInstance) {
+ $this->inputStreamInstance = $inputStreamInstance;
+ }
+
+ /**
+ * Getter for a OutputStream instance
+ *
+ * @param $outputStreamInstance The OutputStream instance
+ */
+ protected final function getOutputStreamInstance () {
+ return $this->outputStreamInstance;
+ }
+
+ /**
+ * Setter for a OutputStream instance
+ *
+ * @param $outputStreamInstance The OutputStream instance
+ * @return void
+ */
+ protected final function setOutputStreamInstance (OutputStream $outputStreamInstance) {
+ $this->outputStreamInstance = $outputStreamInstance;
+ }
+
+ /**
+ * Setter for handler instance
+ *
+ * @param $handlerInstance An instance of a Handleable class
+ * @return void
+ */
+ protected final function setHandlerInstance (Handleable $handlerInstance) {
+ $this->handlerInstance = $handlerInstance;
+ }
+
+ /**
+ * Getter for handler instance
+ *
+ * @return $handlerInstance A Networkable instance
+ */
+ protected final function getHandlerInstance () {
+ return $this->handlerInstance;
+ }
+
+ /**
+ * Setter for visitor instance
+ *
+ * @param $visitorInstance A Visitor instance
+ * @return void
+ */
+ protected final function setVisitorInstance (Visitor $visitorInstance) {
+ $this->visitorInstance = $visitorInstance;
+ }
+
+ /**
+ * Getter for visitor instance
+ *
+ * @return $visitorInstance A Visitor instance
+ */
+ protected final function getVisitorInstance () {
+ return $this->visitorInstance;
+ }
+
+ /**
+ * Setter for DHT instance
+ *
+ * @param $dhtInstance A Distributable instance
+ * @return void
+ */
+ protected final function setDhtInstance (Distributable $dhtInstance) {
+ $this->dhtInstance = $dhtInstance;
+ }
+
+ /**
+ * Getter for DHT instance
+ *
+ * @return $dhtInstance A Distributable instance
+ */
+ protected final function getDhtInstance () {
+ return $this->dhtInstance;
+ }
+
+ /**
+ * Setter for raw package Data
+ *
+ * @param $packageData Raw package Data
+ * @return void
+ */
+ public final function setPackageData (array $packageData) {
+ $this->packageData = $packageData;
+ }
+
+ /**
+ * Getter for raw package Data
+ *
+ * @return $packageData Raw package Data
+ */
+ public function getPackageData () {
+ return $this->packageData;
+ }
+
+
+ /**
+ * Setter for Iterator instance
+ *
+ * @param $iteratorInstance An instance of an Iterator
+ * @return void
+ */
+ protected final function setIteratorInstance (Iterator $iteratorInstance) {
+ $this->iteratorInstance = $iteratorInstance;
+ }
+
+ /**
+ * Getter for Iterator instance
+ *
+ * @return $iteratorInstance An instance of an Iterator
+ */
+ public final function getIteratorInstance () {
+ return $this->iteratorInstance;
+ }
+
+ /**
+ * Setter for FilePointer instance
+ *
+ * @param $pointerInstance An instance of an FilePointer class
+ * @return void
+ */
+ protected final function setPointerInstance (FilePointer $pointerInstance) {
+ $this->pointerInstance = $pointerInstance;
+ }
+
+ /**
+ * Getter for FilePointer instance
+ *
+ * @return $pointerInstance An instance of an FilePointer class
+ */
+ public final function getPointerInstance () {
+ return $this->pointerInstance;
+ }
+
+ /**
+ * Setter for Indexable instance
+ *
+ * @param $indexInstance An instance of an Indexable class
+ * @return void
+ */
+ protected final function setIndexInstance (Indexable $indexInstance) {
+ $this->indexInstance = $indexInstance;
+ }
+
+ /**
+ * Getter for Indexable instance
+ *
+ * @return $indexInstance An instance of an Indexable class
+ */
+ public final function getIndexInstance () {
+ return $this->indexInstance;
+ }
+
+ /**
+ * Setter for Block instance
+ *
+ * @param $blockInstance An instance of an Block class
+ * @return void
+ */
+ protected final function setBlockInstance (Block $blockInstance) {
+ $this->blockInstance = $blockInstance;
+ }
+
+ /**
+ * Getter for Block instance
+ *
+ * @return $blockInstance An instance of an Block class
+ */
+ public final function getBlockInstance () {
+ return $this->blockInstance;
+ }
+
+ /**
+ * Setter for Minable instance
+ *
+ * @param $minableInstance A Minable instance
+ * @return void
+ */
+ protected final function setMinableInstance (Minable $minableInstance) {
+ $this->minableInstance = $minableInstance;
+ }
+
+ /**
+ * Getter for minable instance
+ *
+ * @return $minableInstance A Minable instance
+ */
+ protected final function getMinableInstance () {
+ return $this->minableInstance;
+ }
+
+ /**
+ * Setter for FrameworkDirectory instance
+ *
+ * @param $directoryInstance A FrameworkDirectoryPointer instance
+ * @return void
+ */
+ protected final function setDirectoryInstance (FrameworkDirectory $directoryInstance) {
+ $this->directoryInstance = $directoryInstance;
+ }
+
+ /**
+ * Getter for FrameworkDirectory instance
+ *
+ * @return $directoryInstance A FrameworkDirectory instance
+ */
+ protected final function getDirectoryInstance () {
+ return $this->directoryInstance;
+ }
+
+ /**
+ * Setter for listener instance
+ *
+ * @param $listenerInstance A Listenable instance
+ * @return void
+ */
+ protected final function setListenerInstance (Listenable $listenerInstance) {
+ $this->listenerInstance = $listenerInstance;
+ }
+
+ /**
+ * Getter for listener instance
+ *
+ * @return $listenerInstance A Listenable instance
+ */
+ protected final function getListenerInstance () {
+ return $this->listenerInstance;
+ }
+
+ /**
+ * Checks whether an object equals this object. You should overwrite this
+ * method to implement own equality checks
+ *
+ * @param $objectInstance An instance of a FrameworkInterface object
+ * @return $equals Whether both objects equals
+ */
+ public function equals (FrameworkInterface $objectInstance) {
+ // Now test it
+ $equals = ((
+ $this->__toString() == $objectInstance->__toString()
+ ) && (
+ $this->hashCode() == $objectInstance->hashCode()
+ ));
+
+ // Return the result
+ return $equals;
+ }
+
+ /**
+ * Generates a generic hash code of this class. You should really overwrite
+ * this method with your own hash code generator code. But keep KISS in mind.
+ *
+ * @return $hashCode A generic hash code respresenting this whole class
+ */
+ public function hashCode () {
+ // Simple hash code
+ return crc32($this->__toString());
+ }
+
+ /**
+ * Formats computer generated price values into human-understandable formats
+ * with thousand and decimal separators.
+ *
+ * @param $value The in computer format value for a price
+ * @param $currency The currency symbol (use HTML-valid characters!)
+ * @param $decNum Number of decimals after commata
+ * @return $price The for the current language formated price string
+ * @throws MissingDecimalsThousandsSeparatorException If decimals or
+ * thousands separator
+ * is missing
+ */
+ public function formatCurrency ($value, $currency = '€', $decNum = 2) {
+ // Are all required attriutes set?
+ if ((!isset($this->decimals)) || (!isset($this->thousands))) {
+ // Throw an exception
+ throw new MissingDecimalsThousandsSeparatorException($this, self::EXCEPTION_ATTRIBUTES_ARE_MISSING);
+ } // END - if
+
+ // Cast the number
+ $value = (float) $value;
+
+ // Reformat the US number
+ $price = number_format($value, $decNum, $this->decimals, $this->thousands) . $currency;
+
+ // Return as string...
+ return $price;
+ }
+
+ /**
+ * Appends a trailing slash to a string
+ *
+ * @param $str A string (maybe) without trailing slash
+ * @return $str A string with an auto-appended trailing slash
+ */
+ public final function addMissingTrailingSlash ($str) {
+ // Is there a trailing slash?
+ if (substr($str, -1, 1) != '/') {
+ $str .= '/';
+ } // END - if
+
+ // Return string with trailing slash
+ return $str;
+ }
+
+ /**
+ * Prepare the template engine (WebTemplateEngine by default) for a given
+ * application helper instance (ApplicationHelper by default).
+ *
+ * @param $applicationInstance An application helper instance or
+ * null if we shall use the default
+ * @return $templateInstance The template engine instance
+ * @throws NullPointerException If the discovered application
+ * instance is still null
+ */
+ protected function prepareTemplateInstance (ManageableApplication $applicationInstance = NULL) {
+ // Is the application instance set?
+ if (is_null($applicationInstance)) {
+ // Get the current instance
+ $applicationInstance = $this->getApplicationInstance();
+
+ // Still null?
+ if (is_null($applicationInstance)) {
+ // Thrown an exception
+ throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
+ } // END - if
+ } // END - if
+
+ // Initialize the template engine
+ $templateInstance = ObjectFactory::createObjectByConfiguredName('web_template_class');
+
+ // Return the prepared instance
+ return $templateInstance;
+ }
+
+ /**
+ * Debugs this instance by putting out it's full content
+ *
+ * @param $message Optional message to show in debug output
+ * @return void
+ */
+ public final function debugInstance ($message = '') {
+ // Restore the error handler to avoid trouble with missing array elements or undeclared variables
+ restore_error_handler();
+
+ // Init content
+ $content = '';
+
+ // Is a message set?