XOOPS  2.6.0
XoopsBaseConfig Class Reference

Public Member Functions

 getAll ()
 

Static Public Member Functions

static bootstrapTransition ()
 
static establishBCDefines ()
 
static get ($name)
 
static getInstance ($config= '')
 
static has ($name)
 

Private Member Functions

 __construct ($config)
 
 extractLibPath ($filecontents)
 

Static Private Member Functions

static defineDefault ($define, $default=null)
 

Static Private Attributes

static $configs = array()
 

Detailed Description

Definition at line 25 of file XoopsBaseConfig.php.

Constructor & Destructor Documentation

XoopsBaseConfig::__construct (   $config)
finalprivate

__construct

Parameters
string|string[]$config fully qualified name of configuration file or configuration array
Exceptions
Exception

Definition at line 38 of file XoopsBaseConfig.php.

References $config, $configs, extractLibPath(), and XoopsLoad\startAutoloader().

Here is the call graph for this function:

Member Function Documentation

static XoopsBaseConfig::bootstrapTransition ( )
staticfinal

Create a working environment from traditional mainfile environment

For the early phases in the installer, these may not be defined. Until it is converted we try and do the best we can without errors

Returns
void

Definition at line 224 of file XoopsBaseConfig.php.

References $_SERVER, $configs, $path, $url, and XOOPS_DB_PARAMETERS.

static XoopsBaseConfig::defineDefault (   $define,
  $default = null 
)
staticprivate

defineDefault - return a constant if it is defined, or a default value if not. If no default is specified, the define name will be used if needed.

Parameters
string$definea define constant name
string | null$defaultdefault value to return if $define is not defined
Returns
string value of define or default

Definition at line 285 of file XoopsBaseConfig.php.

static XoopsBaseConfig::establishBCDefines ( )
staticfinal

Establish backward compatibility defines

Returns
void

Definition at line 153 of file XoopsBaseConfig.php.

XoopsBaseConfig::extractLibPath (   $filecontents)
finalprivate

extractLibPath - solve a which comes first, chicken or egg type problem

The yaml file we can load has the path we need to set up the autoloader we need to reach our yaml library. We solve this by looking through the raw yaml file contents to locate our data. This works only because there is a unique key that should not be duplicated in a limited and known data set.

Not pretty, but this way we get full access to xoops from a single known path.

Parameters
string$filecontentscontents of the yaml configuration file
Returns
string the extracted lib-path value

Definition at line 102 of file XoopsBaseConfig.php.

Referenced by __construct().

Here is the caller graph for this function:

static XoopsBaseConfig::get (   $name)
staticfinal

Retrieve an attribute value.

Parameters
string$namename of an attribute
Returns
mixed value of the attribute, or null if not set.

Definition at line 117 of file XoopsBaseConfig.php.

References $configs, and $name.

Referenced by AvatarsAvatar_userForm\__construct(), AvatarsAvatarForm\__construct(), CommentsCommentForm\__construct(), SmiliesSmiliesForm\__construct(), UserrankRanksForm\__construct(), Xcaptcha\__construct(), AvatarsProvider\__construct(), SystemGroupForm\__construct(), XoopsBlock\__construct(), XoopsTpl\__construct(), Xoops\Core\Database\Schema\ImportSchema\__construct(), Xoops\Core\Database\Schema\PrefixStripper\__construct(), XoopsModule\__construct(), Xoops\Core\Cache\CacheManager\__construct(), XoopsDatabaseManager\__construct(), MyTextSanitizerExtension\__construct(), XoopsCaptcha\__construct(), XoopsCaptchaImageHandler\__construct(), XoopsFolderHandler\__construct(), Xoops\__construct(), XoopsEditorHandler\__construct(), MyTextSanitizer\__construct(), CommentsCommentRenderer\_getTitleIcon(), XoopsXmlRpcApi\_getXoopsApi(), Xmf\Module\Helper\GenericHelper\_initHandler(), Xoops\Auth\Provisioning\add(), XoopsTarDownloader\addBinaryFileData(), Xmf\Module\Admin\addConfigAccept(), Xmf\Module\Admin\addConfigError(), XoopsTarDownloader\addFileData(), b_comments_show(), b_system_info_edit(), b_system_info_show(), b_system_main_show(), b_system_newmembers_show(), b_system_online_show(), b_system_themes_show(), b_system_topposters_show(), b_system_user_show(), MenusBuilder\buildSelected(), Xoops\Auth\Provisioning\change(), XoopsTheme\checkCache(), Xoops\Core\Security\checkReferer(), System\cleanCache(), Xoops\Form\DhtmlTextArea\codeIcon(), Xoops\Core\ComposerUtility\composerExecute(), XoopsDatabaseManager\createDB(), Xoops\Core\Cache\CacheManager\createDefaultConfig(), XoopsThemeFactory\createInstance(), XoopsAdminThemeFactory\createInstance(), Smarty_Resource_Db\dbTplInfo(), MytsMp3\decode(), MenusDefaultDecorator\decorateMenu(), XoopsApi\deletePost(), Comments\displayDelete(), Comments\displayEdit(), Comments\displayNew(), Comments\displayPost(), Comments\displayReply(), Xmf\Debug\dump(), LegacyLogger\dump(), XoopsApi\editPost(), SmiliesCorePreload\eventCoreClassModuleTextsanitizerSmiley(), SmiliesCorePreload\eventCoreClassXoopsformFormdhtmltextareaCodeicon(), ImagesPreload\eventCoreClassXoopsformFormdhtmltextareaCodeicon(), XmfPreload\eventCoreIncludeCommonEnd(), SystemPreload\eventCoreIncludeFunctionsRedirectheader(), Xoops\Form\DhtmlTextArea\fontArray(), XoopsTheme\generateCacheId(), TinyMCE\get_xoopsPlugins(), xoopslists\getAllAvatarsList(), xoopslists\getAvatarsList(), MetaWeblogApi\getCategories(), XoopsApi\getCategories(), Xoops\Core\Database\Factory\getConnection(), XoopsBlock\getContent(), Xoops\getCss(), XoopsDatabaseFactory\getDatabaseConnection(), Xoops\Core\Cache\CacheManager\getDefaults(), MaintenanceMaintenanceForm\getDump(), xoopslists\getEditorList(), Notifications\getEvents(), SystemExtension\getExtensionList(), SystemPreferencesForm\getForm(), SystemBlockForm\getForm(), SystemExtension\getInstalledExtensions(), SystemModule\getInstalledModules(), Xmf\Module\Admin\getInstance(), xoopslists\getLangList(), xoopslists\getLocaleList(), MaintenanceMaintenanceForm\getMaintenance(), Xoops\getModuleForm(), Xoops\getModuleHandler(), SystemModule\getModuleList(), xoopslists\getModulesList(), MetaWeblogApi\getPost(), XoopsApi\getPost(), MetaWeblogApi\getRecentPosts(), XoopsApi\getRecentPosts(), xoopslists\getSubjectsList(), Xmf\Database\Tables\getTable(), XoopsMailer\getTemplatePath(), xoopslists\getThemesList(), XoopsUserUtility\getUnameFromId(), XoopsUserUtility\getUnameFromIds(), BloggerApi\getUsersBlogs(), XoopsGuiDefault\header(), Xoops\header(), Xmf\Module\Admin\iconUrl(), Xmf\Module\Permission\init(), TinyMCE\init(), Xmf\Template\Feed\init(), SystemModule\install(), XoopsFolderHandler\inXoopsPath(), XoopsFormTinymce4\isActive(), XoopsFormTinymce\isActive(), MytsImage\load(), Xmf\Language\load(), XoopsLoad\loadClass(), XoopsLoad\loadConfig(), XoopsLoad\loadCore(), XoopsLoad\loadCoreConfig(), TinyMCE\loadCss(), Xoops\Core\Kernel\XoopsObject\loadFilters(), XoopsLoad\loadFramework(), XoopsCaptchaImage\loadImage(), XoopsLoad\loadModule(), loadModuleAdminMenu(), TinyMCE\loadPlugins(), menus_block_edit(), menus_mainmenu_show(), mod_clearFile(), mod_createFile(), mod_generateCacheId_byGroup(), mod_loadConfig(), mod_loadFunctions(), XoopsApi\newPost(), Xoops\path(), Xoops\Core\Database\Connection\prefix(), Xoops\redirect(), Xoops\Form\ColorPicker\render(), XoopsCaptchaImage\render(), SystemBreadcrumb\render(), SystemMenuHandler\render(), Xoops\Form\DhtmlTextArea\render(), TinyMCE\render(), Xoops\Module\Admin\renderAbout(), Xoops\Module\Admin\renderIndex(), XoopsTheme\resourcePath(), Xoops\Core\Logger\sanitizePath(), LegacyLogger\sanitizePath(), MonologLogger\sanitizePath(), XoopsMailer\send(), Xoops\Core\Session\Manager\sessionStart(), XoopsTpl\setCompileId(), Xoops\Core\Events\setPreloads(), Xoops\simpleHeader(), Xmf\Debug\startTrace(), NotificationsNotificationHandler\triggerEvent(), SystemModule\update(), Xoops\Core\Session\RememberMe\writeUserCookie(), XoopsTheme\xoInit(), xoops_module_install_avatars(), and MyTextSanitizer\xoopsCodeDecode().

XoopsBaseConfig::getAll ( )
final

Get a copy of all base configurations

Returns
array of of all attributes

Definition at line 143 of file XoopsBaseConfig.php.

References $configs.

static XoopsBaseConfig::getInstance (   $config = '')
staticfinal

Allow one instance only!

Parameters
string|string[]$config fully qualified name of configuration file or configuration array
Returns
XoopsBaseConfig instance
Exceptions
Exception

Definition at line 74 of file XoopsBaseConfig.php.

References $config, and $configs.

static XoopsBaseConfig::has (   $name)
staticfinal

Verify an attribute is defined.

Parameters
string$namename of an attribute
Returns
boolean true if attribute is defined, otherwise false.

Definition at line 133 of file XoopsBaseConfig.php.

References $configs, and $name.

Member Data Documentation

XoopsBaseConfig::$configs = array()
staticprivate

Definition at line 30 of file XoopsBaseConfig.php.

Referenced by bootstrapTransition().


The documentation for this class was generated from the following file: