yii1-module/yii1-information

A module that processes informations


Keywords
module, yii, information, pluggable, Yii1, plug
License
MIT

Documentation

yii1-information

A module that processes informations, stores them, and allows for them to be processed by another module.

This library requires the yiipluggable base because it inherits its interfaces, and the crisu83/yiistrap library because it uses its easiness to write bootstrap3+ components to html.

Installation

The installation of this library is made via composer. Download composer.phar from their website. Then add to your composer.json :

	"require": {
		"oomphinc/composer-installers-extender" : "^1",
		"yii1-module/yii1-information": "^3"
	},
	"extra" : {
		"installer-types" : [
			"yii1-module",
		],
		"installer-paths" : {
			"modules/{$name}" : [
				"type:yii1-module"
			]
		}
	}

Then run php composer.phar update to install this library. The autoloading of all classes of this library is made through composer's autoloader.

The oomphinc custom installer lets composer install into the app/modules directory the modules that otherwise would go into the app/vendor directory. This is made to allow the YiiPlug application to correctly autoload the modules when it sees it.

API

This module does not follow any specific API within the pluggable module. The php API, available in the InformationModule component, is defined as follow :


use PhpExtended\Information\InformationVisitorInterface;
use PhpExtended\Information\LoggerInformationVisitor;
use Psr\Log\LoggerInterface;

InformationVisitorInterface getStorageHandler(IPluggableModule $module, LoggerInterface $logger, boolean $checkBeforeInsert = false);

This method gets an information handler to handle all the informations that could be thrown at it. If the $checkBeforeInsert parameter is set to true, then this method will decorate the handler with another handler which checks in the current database if the information exists, and if it exists, it will skip storing it. That handler will not check for accuracy of the information, only its existence. This handler is more useful in a multi threaded environment due to the fact it maximizes parallelization of resolving records.


use PhpExtended\Information\InformationVisitorInterface;
use PhpExtended\Information\LoggerInformationVisitor;
use Psr\Log\LoggerInterface;

InformationVisitorInterface getResolverHandler(IPluggableModule $module, LoggerInterface $logger);

This method gets an information handler to handle all the informations that could be thrown at it. It will try to resolve it like all the other process methods below, and if it cannot, it will store the record like the storage handler up there. This handler is more useful in a single threaded environment due to the fact it minimizes the number of queries to the database.

void processForModuleWithPath(IPluggableModule $module, LoggerInterface $logger = null);

This method processes all kinds of information for given module. In this context, processing means resolving individual information context to be able to store all of those informations within a relational database which is tailored to handle them. All informations that couldn't be stored accordingly stay in the informations database.

void deleteForModule(IPluggableModule $module);

This method deletes all informations related to the given module in the informations tables.

void processInformationDataWithPath(IPluggableModule $module, LoggerInterface $logger = null);

This method processes all the informations of type data for given module. Such informations are assuming the receiving database holds a path field in order to store the information's primary key or identifier.

void processInformationDataTimedWithPath(IPluggableModule $module, LoggerInterface $logger = null);

This method processes all the informations of type data timed for given module. Such informations are assuming the receiving database holds a path field in order to store the information's primary key or identifier.

void processInformationRelationWithPath(IPluggableModule $module, LoggerInterface $logger = null)

This method processes all the informations of type relation for given module. Such informations are assuming the receiving database holds a path field in order to store the information's primary key or identifier.

void processInformationRelationTimedWithPath(IPluggableModule $module, LoggerInterface $logger = null)

This method processes all the informations of type relation timed for given module. Such informations are assuming the receiving database holds a path field in order to store the information's primary key or identifier.

void processInformationRelationDataWithPath(IPluggableModule $module, LoggerInterface $logger = null)

This method processes all the informations of type relation data for given module. Such informations are assuming the receiving database holds a path field in order to store the information's primary key or identifier.

void processInformationRelationDataTimedWithPath(IPluggableModule $module, LoggerInterface $logger = null)

This method processes all the informations of type relation data timed for given module. Such informations are assuming the receiving database holds a path field in order to store the information's primary key or identifier.

void processInformationCompositeTimedWithPath(IPluggableModule $module, LoggerInterface $logger = null)

This method processes all the informations of type composite timed for given module. Such informations are assuming the receiving database holds a path field in order to store the information's primary key or identifier.

void processInformationCompositeDataWithPath(IPluggableModule $module, LoggerInterface $logger = null)

This method processes all the informations of type composite data for given module. Such informations are assuming the receiving database holds a path field in order to store the information's primary key or identifier.

void processInformationCompositeDataTimedWithPath(IPluggableModule $module, LoggerInterface $logger = null)

This method processes all the informations of type composite data timed for given module. Such informations are assuming the receiving database holds a path field in order to store the information's primary key or identifier.

void processInformationCompositeRelationWithPath(IPluggableModule $module, LoggerInterface $logger = null)

This method processes all the informations of type composite relation for given module. Such informations are assuming the receiving database holds a path field in order to store the information's primary key or identifier.

void processInformationCompositeRelationTimedWithPath(IPluggableModule $module, LoggerInterface $logger = null)

This method processes all the informations of type composite relation timed for given module. Such informations are assuming the receiving database holds a path field in order to store the information's primary key or identifier.

License

MIT. See license file.