NewsNewsFeaturesDownloadsDevelopmentSupportForumDocumentsAbout Us

Config


複合項目

class  Config
class  ConfigAbstractStorage
class  ConfigDbStorage
class  ConfigFileStorage
class  Properties

詳細描述

The Config package is the central place where all configuration settings are stored in pLog.

It works based on the Config::getConfig() method, which is a singleton method that will return a class that extends the "interface" (never mind that those things don't exist in PHP4) ConfigAbstractStorage. Classes implementing this interface take care of storing, retrieving and updating configuration parameters from a certain backend. At the moment, only a file-based backend and a database-based backend are supported, and there are no plans to implement any more backends since these have proven enough for the needs of pLog.

The default backend is the database, implemented by the class ConfigDbStorage, while the file-storage backend is implemented by the ConfigFileStorageBackend. If needed, it is possible to directly create an instance of any of the storage backends but it is advisable to use Config::getConfig()

There is more information about which methods are available from classes implementing a storage backend in the documentation of the ConfigAbstractStorage class, and examples of use of this module in the documentation of the Config class.

Please also see this wiki page: http://wiki.plogworld.net/index.php/PLog_1.0/Global_Configuration_API