PHP Class Gdn, vanilla

Garden is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Garden is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Garden. If not, see . Contact Mark O'Sullivan at mark [at] lussumo [dot] com
Afficher le fichier Open project: vanilla/vanilla Class Usage Examples

Protected Properties

Свойство Type Description
$_Config object
$_Factory The factory used to create core objects in the application.
$_FactoryOverwrite Whether or not Gdn::FactoryInstall should overwrite existing objects.
$_Locale object
$_PluginManager object
$_Request object
$_Session object

Méthodes publiques

Méthode Description
addonManager ( ) : AddonManager Get the addon manager.
applicationManager ( ) : Gdn_ApplicationManager Get the application manager
authenticator ( ) : Gdn_Auth
cache ( ) : Gdn_Cache Get the cache object
config ( string $Name = false, mixed $Default = false ) : Gdn_Configuration | mixed Get a configuration setting for the application.
controller ( Gdn_Controller $Value = null ) : Gdn_Controller The current controller being targetted.
database ( ) : Gdn_Database Get a reference to the default database object.
dispatcher ( ) : Gdn_Dispatcher Gets the global dispatcher object.
factory ( string $Alias = false ) Get an object from the factory.
factoryExists ( string $Alias ) : boolean Checks whether or not a factory alias exists.
factoryInstall ( string $Alias, string $ClassName, string $Path = '', string $FactoryType = self::FactorySingleton, $Data = null ) Install a class to the factory.
factoryInstallDependency ( string $Alias, string $PropertyName, string $SourceAlias ) Installs a dependency to the factory.
factoryInstallDependencyFromConfig ( mixed $Config, string $Alias = null ) Installs a dependency to the factory with the settings from a configuration.
factoryInstallFromConfig ( mixed $Config, string $Alias = null ) Installs a class to the factory with the settings from a configuration.
factoryOverwrite ( null $Value = null ) : integer
factoryUninstall ( string $Alias ) Uninstall an class from the factory.
factoryUninstallDependency ( $Alias, $PropertyName = null ) Uninstall a dependency from the factory.
get ( $Key, $Default = null )
installationID ( string $SetInstallationID = null ) : string Gets/Sets the Garden InstallationID
installationSecret ( string $SetInstallationSecret = null ) : string Gets/Sets the Garden Installation Secret
locale ( ) : Gdn_Locale
permissionModel ( ) : PermissionModel Get the permission model for the application.
pluginManager ( ) : Gdn_PluginManager Get the plugin manager for the application.
regarding ( ) : Gdn_Regarding
request ( Gdn_Request $NewRequest = null ) : Gdn_Request Get or set the current request object.
router ( ) : Gdn_Router Get the router object
session ( ) : Gdn_Session Get the session object.
set ( $Key, $Value = null )
setFactory ( Gdn_Factory $Factory, boolean $Override = true ) Set the object used as the factory for the api.
slice ( string $Slice ) : Gdn_Slice Get a reference to the Gdn_Slice
sql ( ) : Gdn_SQLDriver Get a reference to the default SQL driver object.
statistics ( ) : Gdn_Statistics Get a reference to the Statistics object.
structure ( ) : Gdn_DatabaseStructure Get a reference to the default database structure object.
themeManager ( ) : Gdn_ThemeManager Get the plugin manager for the application.
translate ( string $Code, string $Default = false ) : string Translates a code into the selected locale's definition.
userMetaModel ( ) : UserMetaModel Get a reference to the user meta model.
userModel ( ) : UserModel Get a reference to the user model.

Method Details

addonManager() public static méthode

Get the addon manager.
public static addonManager ( ) : AddonManager
Résultat Vanilla\AddonManager

applicationManager() public static méthode

Get the application manager
public static applicationManager ( ) : Gdn_ApplicationManager
Résultat Gdn_ApplicationManager

authenticator() public static méthode

public static authenticator ( ) : Gdn_Auth
Résultat Gdn_Auth

cache() public static méthode

Get the cache object
public static cache ( ) : Gdn_Cache
Résultat Gdn_Cache

config() public static méthode

Get a configuration setting for the application.
public static config ( string $Name = false, mixed $Default = false ) : Gdn_Configuration | mixed
$Name string The name of the configuration setting. Settings in different sections are seperated by a dot ('.')
$Default mixed The result to return if the configuration setting is not found.
Résultat Gdn_Configuration | mixed The configuration setting.

controller() public static méthode

The current controller being targetted.
public static controller ( Gdn_Controller $Value = null ) : Gdn_Controller
$Value Gdn_Controller
Résultat Gdn_Controller

database() public static méthode

Get a reference to the default database object.
public static database ( ) : Gdn_Database
Résultat Gdn_Database

dispatcher() public static méthode

Gets the global dispatcher object.
public static dispatcher ( ) : Gdn_Dispatcher
Résultat Gdn_Dispatcher

factory() public static méthode

Get an object from the factory.
See also: Gdn_Factory::Factory()
public static factory ( string $Alias = false )
$Alias string The alias of the class.

factoryExists() public static méthode

Checks whether or not a factory alias exists.
See also: Gdn_Factory::Exists()
public static factoryExists ( string $Alias ) : boolean
$Alias string The alias of the factory to check for.
Résultat boolean Whether or not a factory definintion exists.

factoryInstall() public static méthode

Install a class to the factory.
See also: Gdn_Factory::Install()
public static factoryInstall ( string $Alias, string $ClassName, string $Path = '', string $FactoryType = self::FactorySingleton, $Data = null )
$Alias string An alias for the class that will be used to retreive instances of it.
$ClassName string The actual name of the class.
$Path string The path to the class' file. You can prefix the path with ~ to start at the application root.
$FactoryType string The way objects will be instantiated for the class. One of (Gdn::FactoryInstance, Gdn::FactoryPrototype, Gdn::FactorySingleton).

factoryInstallDependency() public static méthode

Installs a dependency to the factory.
See also: Gdn_Factory::InstalDependency()
public static factoryInstallDependency ( string $Alias, string $PropertyName, string $SourceAlias )
$Alias string The alias of the class that will have the dependency.
$PropertyName string The name of the property on the class that will have the dependency.
$SourceAlias string The alias of the class that will provide the value of the property when objects are instantiated.

factoryInstallDependencyFromConfig() public static méthode

Installs a dependency to the factory with the settings from a configuration.
public static factoryInstallDependencyFromConfig ( mixed $Config, string $Alias = null )
$Config mixed The configuration of the factory definition. This argument can be of the following types: - string: The configuration will be looked up by calling inline{@link Gdn::Config()} - array: The configuration will be set from the array.
$Alias string The class alias to install into the factory. If omitted then it must be in the configuration. The dependency will be installed from the configuration array depending on the following keys: - Alias: Optional if $Alias is passed as an argument. - PropertyName: Required. - SourceAlias: Required. - Override Optional. All of these values are passed to the corresponding argument in inline{@link Gdn::FactoryInstallDependency()}.

factoryInstallFromConfig() public static méthode

Installs a class to the factory with the settings from a configuration.
public static factoryInstallFromConfig ( mixed $Config, string $Alias = null )
$Config mixed The configuration of the factory definition. This argument can be of the following types: - string: The configuration will be looked up by calling inline{@link Gdn::Config()} - array: The configuration will be set from the array.
$Alias string The class alias to install into the factory. If omitted then it must be in the configuration. The factory will be installed from the configuration array depending on the following keys: - Alias: Optional if $Alias is passed as an argument. - FactoryType: Required. - Data: Optional. - Override Optional. - Dependencies Optional. Dependencies for the class can be defined as a subarray. Each item in the subarray will be passed to inline{@link Gdn::FactoryInstallDependencyFromConfig}. All of these values (except Dependencies) are passed to the corresponding argument in inline{@link Gdn::FactoryInstall()}.

factoryOverwrite() public static méthode

public static factoryOverwrite ( null $Value = null ) : integer
$Value null
Résultat integer

factoryUninstall() public static méthode

Uninstall an class from the factory.
See also: Gdn_Factory::Uninstall()
public static factoryUninstall ( string $Alias )
$Alias string The alias of the class to uninstall.

factoryUninstallDependency() public static méthode

Uninstall a dependency from the factory.
See also: Gdn_Factory::UninstallDependency()
public static factoryUninstallDependency ( $Alias, $PropertyName = null )

get() public static méthode

public static get ( $Key, $Default = null )

installationID() public static méthode

Gets/Sets the Garden InstallationID
public static installationID ( string $SetInstallationID = null ) : string
$SetInstallationID string
Résultat string Installation ID or NULL

installationSecret() public static méthode

Gets/Sets the Garden Installation Secret
public static installationSecret ( string $SetInstallationSecret = null ) : string
$SetInstallationSecret string
Résultat string Installation Secret or NULL

locale() public static méthode

public static locale ( ) : Gdn_Locale
Résultat Gdn_Locale

permissionModel() public static méthode

Get the permission model for the application.
public static permissionModel ( ) : PermissionModel
Résultat PermissionModel

pluginManager() public static méthode

Get the plugin manager for the application.
public static pluginManager ( ) : Gdn_PluginManager
Résultat Gdn_PluginManager

regarding() public static méthode

public static regarding ( ) : Gdn_Regarding
Résultat Gdn_Regarding

request() public static méthode

Get or set the current request object.
public static request ( Gdn_Request $NewRequest = null ) : Gdn_Request
$NewRequest Gdn_Request The new request or null to just get the request.
Résultat Gdn_Request

router() public static méthode

Get the router object
public static router ( ) : Gdn_Router
Résultat Gdn_Router

session() public static méthode

Get the session object.
public static session ( ) : Gdn_Session
Résultat Gdn_Session

set() public static méthode

public static set ( $Key, $Value = null )

setFactory() public static méthode

Set the object used as the factory for the api.
public static setFactory ( Gdn_Factory $Factory, boolean $Override = true )
$Factory Gdn_Factory The object used as the factory.
$Override boolean whether to override the property if it is already set.

slice() public static méthode

Get a reference to the Gdn_Slice
public static slice ( string $Slice ) : Gdn_Slice
$Slice string Slice to execute
Résultat Gdn_Slice

sql() public static méthode

Get a reference to the default SQL driver object.
See also: Gdn_Database::SQL()
public static sql ( ) : Gdn_SQLDriver
Résultat Gdn_SQLDriver

statistics() public static méthode

Get a reference to the Statistics object.
public static statistics ( ) : Gdn_Statistics
Résultat Gdn_Statistics

structure() public static méthode

Get a reference to the default database structure object.
public static structure ( ) : Gdn_DatabaseStructure
Résultat Gdn_DatabaseStructure

themeManager() public static méthode

Get the plugin manager for the application.
public static themeManager ( ) : Gdn_ThemeManager
Résultat Gdn_ThemeManager

translate() public static méthode

Translates a code into the selected locale's definition.
public static translate ( string $Code, string $Default = false ) : string
$Code string The code related to the language-specific definition.
$Default string The default value to be displayed if the translation code is not found.
Résultat string The translated string or $Code if there is no value in $Default.

userMetaModel() public static méthode

Get a reference to the user meta model.
public static userMetaModel ( ) : UserMetaModel
Résultat UserMetaModel

userModel() public static méthode

Get a reference to the user model.
public static userModel ( ) : UserModel
Résultat UserModel

Property Details

$_Config protected_oe static_oe property

protected static object $_Config
Résultat object

$_Factory protected_oe static_oe property

The factory used to create core objects in the application.
protected static $_Factory

$_FactoryOverwrite protected_oe static_oe property

Whether or not Gdn::FactoryInstall should overwrite existing objects.
protected static $_FactoryOverwrite

$_Locale protected_oe static_oe property

protected static object $_Locale
Résultat object

$_PluginManager protected_oe static_oe property

protected static object $_PluginManager
Résultat object

$_Request protected_oe static_oe property

protected static object $_Request
Résultat object

$_Session protected_oe static_oe property

protected static object $_Session
Résultat object