PHP 클래스 Core, generatedata

Version history (please keep backward compatible): 1.0, 2008-10-09: Cornelius Hansjakob
저자: Cornelius Hansjakob ([email protected])
파일 보기 프로젝트 열기: benkeen/generatedata 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$countryPlugins CountryPlugin
$dataTypePlugins
$db Database
$exportTypePlugins
$geoData GeoData
$language Language
$smarty Smarty
$translations Translations
$user Account

공개 메소드들

메소드 설명
checkAllowMultiUserAnonymousUse ( )
checkDemoMode ( ) TODO Yuck! Why does this return a boolean as a frickin' string?! Was I drunk?
checkIsInstalled ( ) Full installation of the program is determined by (a) the settings.php file existing and (b) the "installationComplete" setting value existing in the database. Note: this function assumes the database connection in Core::$db has already been created.
checkIsLoggedIn ( )
checkSettingsFileExists ( )
getContinents ( )
getDataTypeGroups ( )
getDbName ( )
getDbPassword ( )
getDbTablePrefix ( )
getDbUsername ( )
getDefaultCountryPlugins ( )
getDefaultExportType ( ) Returns the out-the-box default Export Type.
getDefaultLanguageFile ( )
getDefaultNumRows ( )
getDefaultTheme ( ) Used during the installation process only: it returns the default theme for new installations.
getEncryptionSalt ( )
getHostname ( )
getMaxDataSetHistorySize ( )
getMaxDemoModeRows ( )
getMaxGeneratedRows ( )
getMinimumMySQLVersion ( ) Returns the minimum MySQL version required to run this script. Used during installation to ensure the server environment is adequate.
getMinimumPHPVersion ( ) Returns the minimum PHP version required to run this script. Used during installation to ensure the server environment is adequate.
getPluginSettings ( $pluginType, $pluginFolder ) : mixed Added in 3.1.4. This allows any plugins to have custom settings defined in $pluginSettings. This function returns null if no settings exist for the plugin, or whatever settings have been provided.
getVersion ( )
init ( string $runtimeContext = "ui" ) Core::init()
initSessions ( )
initUser ( boolean $bypass = false ) Initializes the current logged in user and stores their Account object in Core::$user.
isApiEnabled ( ) : boolean Determines whether the REST API functionality is available or not.
isInstalling ( )
isSmartySecurityEnabled ( )
isUsingMinifiedResources ( ) : boolean Returns a boolean signifying whether we should use the minified + bundled resources generated via Grunt.

비공개 메소드들

메소드 설명
initCountries ( ) Called by Core::init(), this initializes Core::$countryPlugins.
initDataTypes ( $runtimeContext ) Called by Core::init(), this initializes Core::$dataTypePlugins. Note that this will contain ALL installed plugins, not those that are selected by a particular user. In 3.2.2 that feature was added, so use Account::getDataTypePlugins() instead.
initDatabase ( ) Initializes the Database object and stores it in Core::$db.
initExportTypes ( $runtimeContext ) Called by Core::init(), this initializes Core::$exportTypePlugins.
initGeoData ( ) This function returns the actual data populated in the database by the Country plugins. It returns an array of country data, contains regions and cities.
initSmarty ( ) Initializes the Smarty object used for things like rendering the Smarty templates found in resources/templates/ - and for other misc uses.
loadSettingsFile ( ) Core::loadSettingsFile()

메소드 상세

checkAllowMultiUserAnonymousUse() 공개 정적인 메소드

checkDemoMode() 공개 정적인 메소드

TODO Yuck! Why does this return a boolean as a frickin' string?! Was I drunk?
public static checkDemoMode ( )

checkIsInstalled() 공개 정적인 메소드

Full installation of the program is determined by (a) the settings.php file existing and (b) the "installationComplete" setting value existing in the database. Note: this function assumes the database connection in Core::$db has already been created.
public static checkIsInstalled ( )

checkIsLoggedIn() 공개 정적인 메소드

public static checkIsLoggedIn ( )

checkSettingsFileExists() 공개 정적인 메소드

public static checkSettingsFileExists ( )

getContinents() 공개 정적인 메소드

public static getContinents ( )

getDataTypeGroups() 공개 정적인 메소드

public static getDataTypeGroups ( )

getDbName() 공개 정적인 메소드

public static getDbName ( )

getDbPassword() 공개 정적인 메소드

public static getDbPassword ( )

getDbTablePrefix() 공개 정적인 메소드

public static getDbTablePrefix ( )

getDbUsername() 공개 정적인 메소드

public static getDbUsername ( )

getDefaultCountryPlugins() 공개 정적인 메소드

public static getDefaultCountryPlugins ( )

getDefaultExportType() 공개 정적인 메소드

Returns the out-the-box default Export Type.
public static getDefaultExportType ( )

getDefaultLanguageFile() 공개 정적인 메소드

public static getDefaultLanguageFile ( )

getDefaultNumRows() 공개 정적인 메소드

public static getDefaultNumRows ( )

getDefaultTheme() 공개 정적인 메소드

Used during the installation process only: it returns the default theme for new installations.
public static getDefaultTheme ( )

getEncryptionSalt() 공개 정적인 메소드

public static getEncryptionSalt ( )

getHostname() 공개 정적인 메소드

public static getHostname ( )

getMaxDataSetHistorySize() 공개 정적인 메소드

public static getMaxDataSetHistorySize ( )

getMaxDemoModeRows() 공개 정적인 메소드

public static getMaxDemoModeRows ( )

getMaxGeneratedRows() 공개 정적인 메소드

public static getMaxGeneratedRows ( )

getMinimumMySQLVersion() 공개 정적인 메소드

Returns the minimum MySQL version required to run this script. Used during installation to ensure the server environment is adequate.
public static getMinimumMySQLVersion ( )

getMinimumPHPVersion() 공개 정적인 메소드

Returns the minimum PHP version required to run this script. Used during installation to ensure the server environment is adequate.
public static getMinimumPHPVersion ( )

getPluginSettings() 공개 정적인 메소드

Added in 3.1.4. This allows any plugins to have custom settings defined in $pluginSettings. This function returns null if no settings exist for the plugin, or whatever settings have been provided.
public static getPluginSettings ( $pluginType, $pluginFolder ) : mixed
$pluginType
$pluginFolder
리턴 mixed

getVersion() 공개 정적인 메소드

public static getVersion ( )

init() 공개 정적인 메소드

Our initialization function. This is called on all page requests to initialize the Core object. Since it's also used during installation (when the database and/or plugins haven't been installed), the optional parameter controls whether or not the database object, plugins, sessions and user should be initialized. Different call contexts require different initialization.
public static init ( string $runtimeContext = "ui" )
$runtimeContext string This determines the context in which the Core is being initialized. This info is used to let plugins instantiate themselves differently, as well as prevent the loading of incomplete parts of the script.
installation: a fresh installation, DB not installed yet
installationDatabaseReady: during installation after the DB has been installed
ui: (default) for the main generator page
generation: when we're in the process of creating actual data resetPlugins: initialized everything except the plugins, which may be safely reset

initSessions() 공개 정적인 메소드

public static initSessions ( )

initUser() 공개 정적인 메소드

Initializes the current logged in user and stores their Account object in Core::$user.
public static initUser ( boolean $bypass = false )
$bypass boolean

isApiEnabled() 공개 정적인 메소드

Determines whether the REST API functionality is available or not.
public static isApiEnabled ( ) : boolean
리턴 boolean

isInstalling() 공개 정적인 메소드

public static isInstalling ( )

isSmartySecurityEnabled() 공개 정적인 메소드

public static isSmartySecurityEnabled ( )

isUsingMinifiedResources() 공개 정적인 메소드

Returns a boolean signifying whether we should use the minified + bundled resources generated via Grunt.
public static isUsingMinifiedResources ( ) : boolean
리턴 boolean

프로퍼티 상세

$countryPlugins 공개적으로 정적으로 프로퍼티

public static CountryPlugin $countryPlugins
리턴 CountryPlugin

$dataTypePlugins 공개적으로 정적으로 프로퍼티

public static $dataTypePlugins

$db 공개적으로 정적으로 프로퍼티

public static Database $db
리턴 Database

$exportTypePlugins 공개적으로 정적으로 프로퍼티

public static $exportTypePlugins

$geoData 공개적으로 정적으로 프로퍼티

public static GeoData $geoData
리턴 GeoData

$language 공개적으로 정적으로 프로퍼티

public static Language $language
리턴 Language

$smarty 공개적으로 정적으로 프로퍼티

public static Smarty $smarty
리턴 Smarty

$translations 공개적으로 정적으로 프로퍼티

public static Translations $translations
리턴 Translations

$user 공개적으로 정적으로 프로퍼티

public static Account $user
리턴 Account