PHP Класс 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
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_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

Открытые методы

Метод Описание
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.

Описание методов

addonManager() публичный статический Метод

Get the addon manager.
public static addonManager ( ) : AddonManager
Результат Vanilla\AddonManager

applicationManager() публичный статический Метод

Get the application manager
public static applicationManager ( ) : Gdn_ApplicationManager
Результат Gdn_ApplicationManager

authenticator() публичный статический Метод

public static authenticator ( ) : Gdn_Auth
Результат Gdn_Auth

cache() публичный статический Метод

Get the cache object
public static cache ( ) : Gdn_Cache
Результат Gdn_Cache

config() публичный статический Метод

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.
Результат Gdn_Configuration | mixed The configuration setting.

controller() публичный статический Метод

The current controller being targetted.
public static controller ( Gdn_Controller $Value = null ) : Gdn_Controller
$Value Gdn_Controller
Результат Gdn_Controller

database() публичный статический Метод

Get a reference to the default database object.
public static database ( ) : Gdn_Database
Результат Gdn_Database

dispatcher() публичный статический Метод

Gets the global dispatcher object.
public static dispatcher ( ) : Gdn_Dispatcher
Результат Gdn_Dispatcher

factory() публичный статический Метод

Get an object from the factory.
См. также: Gdn_Factory::Factory()
public static factory ( string $Alias = false )
$Alias string The alias of the class.

factoryExists() публичный статический Метод

Checks whether or not a factory alias exists.
См. также: Gdn_Factory::Exists()
public static factoryExists ( string $Alias ) : boolean
$Alias string The alias of the factory to check for.
Результат boolean Whether or not a factory definintion exists.

factoryInstall() публичный статический Метод

Install a class to the factory.
См. также: 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() публичный статический Метод

Installs a dependency to the factory.
См. также: 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() публичный статический Метод

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() публичный статический Метод

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 factoryOverwrite ( null $Value = null ) : integer
$Value null
Результат integer

factoryUninstall() публичный статический Метод

Uninstall an class from the factory.
См. также: Gdn_Factory::Uninstall()
public static factoryUninstall ( string $Alias )
$Alias string The alias of the class to uninstall.

factoryUninstallDependency() публичный статический Метод

Uninstall a dependency from the factory.
См. также: Gdn_Factory::UninstallDependency()
public static factoryUninstallDependency ( $Alias, $PropertyName = null )

get() публичный статический Метод

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

installationID() публичный статический Метод

Gets/Sets the Garden InstallationID
public static installationID ( string $SetInstallationID = null ) : string
$SetInstallationID string
Результат string Installation ID or NULL

installationSecret() публичный статический Метод

Gets/Sets the Garden Installation Secret
public static installationSecret ( string $SetInstallationSecret = null ) : string
$SetInstallationSecret string
Результат string Installation Secret or NULL

locale() публичный статический Метод

public static locale ( ) : Gdn_Locale
Результат Gdn_Locale

permissionModel() публичный статический Метод

Get the permission model for the application.
public static permissionModel ( ) : PermissionModel
Результат PermissionModel

pluginManager() публичный статический Метод

Get the plugin manager for the application.
public static pluginManager ( ) : Gdn_PluginManager
Результат Gdn_PluginManager

regarding() публичный статический Метод

public static regarding ( ) : Gdn_Regarding
Результат Gdn_Regarding

request() публичный статический Метод

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.
Результат Gdn_Request

router() публичный статический Метод

Get the router object
public static router ( ) : Gdn_Router
Результат Gdn_Router

session() публичный статический Метод

Get the session object.
public static session ( ) : Gdn_Session
Результат Gdn_Session

set() публичный статический Метод

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

setFactory() публичный статический Метод

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() публичный статический Метод

Get a reference to the Gdn_Slice
public static slice ( string $Slice ) : Gdn_Slice
$Slice string Slice to execute
Результат Gdn_Slice

sql() публичный статический Метод

Get a reference to the default SQL driver object.
См. также: Gdn_Database::SQL()
public static sql ( ) : Gdn_SQLDriver
Результат Gdn_SQLDriver

statistics() публичный статический Метод

Get a reference to the Statistics object.
public static statistics ( ) : Gdn_Statistics
Результат Gdn_Statistics

structure() публичный статический Метод

Get a reference to the default database structure object.
public static structure ( ) : Gdn_DatabaseStructure
Результат Gdn_DatabaseStructure

themeManager() публичный статический Метод

Get the plugin manager for the application.
public static themeManager ( ) : Gdn_ThemeManager
Результат Gdn_ThemeManager

translate() публичный статический Метод

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.
Результат string The translated string or $Code if there is no value in $Default.

userMetaModel() публичный статический Метод

Get a reference to the user meta model.
public static userMetaModel ( ) : UserMetaModel
Результат UserMetaModel

userModel() публичный статический Метод

Get a reference to the user model.
public static userModel ( ) : UserModel
Результат UserModel

Описание свойств

$_Config защищенное статическое свойство

protected static object $_Config
Результат object

$_Factory защищенное статическое свойство

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

$_FactoryOverwrite защищенное статическое свойство

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

$_Locale защищенное статическое свойство

protected static object $_Locale
Результат object

$_PluginManager защищенное статическое свойство

protected static object $_PluginManager
Результат object

$_Request защищенное статическое свойство

protected static object $_Request
Результат object

$_Session защищенное статическое свойство

protected static object $_Session
Результат object