- throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
- }
-
- /**
- * Magic method to catch object deserialization
- *
- * @return $unsupported Unsupported method
- * @throws UnsupportedOperationException Objects of this framework cannot be serialized
- */
- public final function __wakeup () {
- throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
- }
-
- /**
- * Magic method to catch calls when an object instance is called
- *
- * @return $unsupported Unsupported method
- * @throws UnsupportedOperationException Objects of this framework cannot be serialized
- */
- public final function __invoke () {
- throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
- }
-
- /**
- * Setter for the real class name
- *
- * @param $realClass Class name (string)
- * @return void
- */
- public final function setRealClass ($realClass) {
- // Set real class
- $this->realClass = (string) $realClass;
- }
-
- /**
- * Setter for database result instance
- *
- * @param $resultInstance An instance of a database result class
- * @return void
- * @todo SearchableResult and UpdateableResult shall have a super interface to use here
- */
- protected final function setResultInstance (SearchableResult $resultInstance) {
- $this->resultInstance = $resultInstance;
- }
-
- /**
- * Getter for database result instance
- *
- * @return $resultInstance An instance of a database result class
- */
- public final function getResultInstance () {
- return $this->resultInstance;
- }
-
- /**
- * Setter for template engine instances
- *
- * @param $templateInstance An instance of a template engine class
- * @return void
- */
- protected final function setTemplateInstance (CompileableTemplate $templateInstance) {
- $this->templateInstance = $templateInstance;
- }
-
- /**
- * Getter for template engine instances
- *
- * @return $templateInstance An instance of a template engine class
- */
- protected final function getTemplateInstance () {
- return $this->templateInstance;
- }
-
- /**
- * Setter for search instance
- *
- * @param $searchInstance Searchable criteria instance
- * @return void
- */
- public final function setSearchInstance (LocalSearchCriteria $searchInstance) {
- $this->searchInstance = $searchInstance;
- }
-
- /**
- * Getter for search instance
- *
- * @return $searchInstance Searchable criteria instance
- */
- public final function getSearchInstance () {
- return $this->searchInstance;
- }
-
- /**
- * Setter for update instance
- *
- * @param $updateInstance An instance of a LocalUpdateCriteria clase
- * @return void
- */
- public final function setUpdateInstance (LocalUpdateCriteria $updateInstance) {
- $this->updateInstance = $updateInstance;
- }
-
- /**
- * Getter for update instance
- *
- * @return $updateInstance Updateable criteria instance
- */
- public final function getUpdateInstance () {
- return $this->updateInstance;
- }
-
- /**
- * Setter for resolver instance
- *
- * @param $resolverInstance Instance of a command resolver class
- * @return void
- */
- public final function setResolverInstance (Resolver $resolverInstance) {
- $this->resolverInstance = $resolverInstance;
- }
-
- /**
- * Getter for resolver instance
- *
- * @return $resolverInstance Instance of a command resolver class
- */
- public final function getResolverInstance () {
- return $this->resolverInstance;
- }
-
- /**
- * Setter for language instance
- *
- * @param $configInstance The configuration instance which shall
- * be FrameworkConfiguration
- * @return void
- */
- public final function setConfigInstance (FrameworkConfiguration $configInstance) {
- GenericRegistry::getRegistry()->addInstance('config', $configInstance);
- }
-
- /**
- * Getter for configuration instance
- *
- * @return $configInstance Configuration instance
- */
- public final function getConfigInstance () {
- $configInstance = GenericRegistry::getRegistry()->getInstance('config');
- return $configInstance;
- }
-
- /**
- * Setter for debug instance
- *
- * @param $debugInstance The instance for debug output class
- * @return void
- */
- public final function setDebugInstance (DebugMiddleware $debugInstance) {
- GenericRegistry::getRegistry()->addInstance('debug', $debugInstance);
- }
-
- /**
- * Getter for debug instance
- *
- * @return $debugInstance Instance to class DebugConsoleOutput or DebugWebOutput
- */
- public final function getDebugInstance () {
- // Get debug instance
- $debugInstance = GenericRegistry::getRegistry()->getInstance('debug');
-
- // Return it
- return $debugInstance;
- }
-
- /**
- * Setter for web output instance
- *
- * @param $webInstance The instance for web output class
- * @return void
- */
- public final function setWebOutputInstance (OutputStreamer $webInstance) {
- GenericRegistry::getRegistry()->addInstance('web_output', $webInstance);
- }
-
- /**
- * Getter for web output instance
- *
- * @return $webOutputInstance - Instance to class WebOutput
- */
- public final function getWebOutputInstance () {
- $webOutputInstance = GenericRegistry::getRegistry()->getInstance('web_output');
- return $webOutputInstance;
- }
-
- /**
- * Setter for database instance
- *
- * @param $databaseInstance The instance for the database connection (forced DatabaseConnection)
- * @return void
- */
- public final function setDatabaseInstance (DatabaseConnection $databaseInstance) {
- GenericRegistry::getRegistry()->addInstance('db_instance', $databaseInstance);
- }
-
- /**
- * Getter for database layer
- *
- * @return $databaseInstance The database layer instance
- */
- public final function getDatabaseInstance () {
- // Get instance
- $databaseInstance = GenericRegistry::getRegistry()->getInstance('db_instance');
-
- // Return instance
- return $databaseInstance;
- }
-
- /**
- * Setter for compressor channel
- *
- * @param $compressorInstance An instance of CompressorChannel
- * @return void
- */
- public final function setCompressorChannel (CompressorChannel $compressorInstance) {
- GenericRegistry::getRegistry()->addInstance('compressor', $compressorInstance);
- }
-
- /**
- * Getter for compressor channel
- *
- * @return $compressorInstance The compressor channel
- */
- public final function getCompressorChannel () {
- $compressorInstance = GenericRegistry::getRegistry()->getInstance('compressor');
- return $compressorInstance;
- }
-
- /**
- * Private getter for language instance
- *
- * @return $langInstance An instance to the language sub-system
- */
- protected final function getLanguageInstance () {
- $langInstance = GenericRegistry::getRegistry()->getInstance('language');
- return $langInstance;
- }
-
- /**
- * Setter for language instance
- *
- * @param $langInstance An instance to the language sub-system
- * @return void
- * @see LanguageSystem
- */
- public final function setLanguageInstance (ManageableLanguage $langInstance) {
- GenericRegistry::getRegistry()->addInstance('language', $langInstance);
- }
-
- /**
- * Private getter for file IO instance
- *
- * @return $fileIoInstance An instance to the file I/O sub-system
- */
- protected final function getFileIoInstance () {
- return $this->fileIoInstance;
- }
-
- /**
- * Setter for file I/O instance
- *
- * @param $fileIoInstance An instance to the file I/O sub-system
- * @return void
- */
- public final function setFileIoInstance (IoHandler $fileIoInstance) {
- $this->fileIoInstance = $fileIoInstance;
- }
-
- /**
- * Protected setter for user instance
- *
- * @param $userInstance An instance of a user class
- * @return void
- */
- protected final function setUserInstance (ManageableAccount $userInstance) {
- $this->userInstance = $userInstance;
- }
-
- /**
- * Getter for user instance
- *
- * @return $userInstance An instance of a user class
- */
- public final function getUserInstance () {
- return $this->userInstance;
- }
-
- /**
- * Setter for controller instance (this surely breaks a bit the MVC patterm)
- *
- * @param $controllerInstance An instance of the controller
- * @return void
- */
- public final function setControllerInstance (Controller $controllerInstance) {
- $this->controllerInstance = $controllerInstance;
- }
-
- /**
- * Getter for controller instance (this surely breaks a bit the MVC patterm)
- *
- * @return $controllerInstance An instance of the controller
- */
- public final function getControllerInstance () {
- return $this->controllerInstance;
- }
-
- /**
- * Setter for RNG instance
- *
- * @param $rngInstance An instance of a random number generator (RNG)
- * @return void
- */
- protected final function setRngInstance (RandomNumberGenerator $rngInstance) {
- $this->rngInstance = $rngInstance;
- }
-
- /**
- * Getter for RNG instance
- *
- * @return $rngInstance An instance of a random number generator (RNG)
- */
- public final function getRngInstance () {
- return $this->rngInstance;
- }
-
- /**
- * Setter for Cryptable instance
- *
- * @param $cryptoInstance An instance of a Cryptable class
- * @return void
- */
- protected final function setCryptoInstance (Cryptable $cryptoInstance) {
- $this->cryptoInstance = $cryptoInstance;
- }
-
- /**
- * Getter for Cryptable instance
- *
- * @return $cryptoInstance An instance of a Cryptable class
- */
- public final function getCryptoInstance () {
- return $this->cryptoInstance;
- }
-
- /**
- * Setter for the list instance
- *
- * @param $listInstance A list of Listable
- * @return void
- */
- protected final function setListInstance (Listable $listInstance) {
- $this->listInstance = $listInstance;
- }
-
- /**
- * 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 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 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;
- }
-
- /**
- * 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 Handleable 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 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;
- }
-
- /**
- * Unsets pointer instance which triggers a call of __destruct() if the
- * instance is still there. This is surely not fatal on already "closed"
- * file pointer instances.
- *
- * I don't want to mess around with above setter by giving it a default
- * value NULL as setter should always explicitly only set (existing) object
- * instances and NULL is NULL.
- *
- * @return void
- */
- protected final function unsetPointerInstance () {
- // Simply it to NULL
- $this->pointerInstance = NULL;
- }
-
- /**
- * 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 FrameworkDirectory instance
- * @return void
- */
- protected final function setDirectoryInstance (FrameworkDirectory $directoryInstance) {
- $this->directoryInstance = $directoryInstance;