PHP 클래스 sfContext

저자: Fabien Potencier ([email protected])
저자: Sean Kerr ([email protected])
상속: implements ArrayAccess
파일 보기 프로젝트 열기: lexpress/symfony1 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$configuration
$current
$dispatcher
$factories
$hasShutdownUserAndStorage
$instances
$mailerConfiguration
$serviceContainerConfiguration

공개 메소드들

메소드 설명
__call ( string $method, array $arguments ) : mixed Calls methods defined via sfEventDispatcher.
createInstance ( sfApplicationConfiguration $configuration, string $name = null, string $class = __CLASS__ ) : sfContext Creates a new context instance.
dispatch ( ) Dispatches the current request.
filterTemplateParameters ( sfEvent $event, array $parameters ) : array Listens to the template.filter_parameters event.
get ( string $name ) : object Gets an object from the current context.
getActionName ( ) : string Retrieve the action name for this context.
getActionStack ( ) : sfActionStack Retrieve the ActionStack.
getConfigCache ( ) : sfConfigCache Returns the configuration cache.
getConfiguration ( ) : sfApplicationConfiguration Returns the configuration instance.
getController ( ) : sfController Retrieve the controller.
getDatabaseConnection ( name $name = 'default' ) : mixed Retrieve a database connection from the database manager.
getDatabaseManager ( ) : sfDatabaseManager Retrieve the database manager.
getEventDispatcher ( ) : sfEventDispatcher Retrieves the current event dispatcher.
getI18N ( ) : sfI18N Retrieve the i18n instance
getInstance ( string $name = null, string $class = __CLASS__ ) : sfContext Retrieves the singleton instance of this class.
getLogger ( ) : sfLogger Retrieve the logger.
getMailer ( ) : sfMailer Retrieves the mailer.
getModuleDirectory ( ) : string Retrieve the module directory for this context.
getModuleName ( ) : string Retrieve the module name for this context.
getRequest ( ) : sfRequest Retrieve the request.
getResponse ( ) : sfResponse Retrieve the response.
getRouting ( ) : sfRouting Retrieve the routing instance.
getService ( string $id ) : object Retrieves a service from the service container.
getServiceContainer ( ) : sfServiceContainer Retrieves the service container.
getStorage ( ) : sfStorage Retrieve the storage.
getUser ( ) : sfUser Retrieve the user.
getViewCacheManager ( ) : sfViewCacheManager Retrieve the view cache manager
has ( string $name ) : boolean Returns true if an object is currently stored in the current context with the given name, false otherwise.
hasInstance ( string $name = null ) : boolean Checks to see if there has been a context created
initialize ( sfApplicationConfiguration $configuration ) Initializes the current sfContext instance.
loadFactories ( ) Loads the symfony factories.
offsetExists ( string $name ) : boolean Returns true if the context object exists (implements the ArrayAccess interface).
offsetGet ( string $name ) : mixed Returns the context object associated with the name (implements the ArrayAccess interface).
offsetSet ( string $offset, string $value ) Sets the context object associated with the offset (implements the ArrayAccess interface).
offsetUnset ( string $offset ) Unsets the context object associated with the offset (implements the ArrayAccess interface).
set ( string $name, object $object ) Puts an object in the current context.
setMailerConfiguration ( array $configuration ) Set mailer configuration.
setResponse ( sfResponse $response ) : void Set the response object.
setServiceContainerConfiguration ( array $config ) Set service ontainer configuration
shutdown ( ) : void Execute the shutdown procedure.
shutdownUserAndStorage ( ) Shuts the user/storage down.
switchTo ( string $name ) Sets the current context to something else

메소드 상세

__call() 공개 메소드

If a method cannot be found via sfEventDispatcher, the method name will be parsed to magically handle getMyFactory() and setMyFactory() methods.
public __call ( string $method, array $arguments ) : mixed
$method string The method name
$arguments array The method arguments
리턴 mixed The returned value of the called method

createInstance() 공개 정적인 메소드

Creates a new context instance.
public static createInstance ( sfApplicationConfiguration $configuration, string $name = null, string $class = __CLASS__ ) : sfContext
$configuration sfApplicationConfiguration An sfApplicationConfiguration instance
$name string A name for this context (application name by default)
$class string The context class to use (sfContext by default)
리턴 sfContext An sfContext instance

dispatch() 공개 메소드

Dispatches the current request.
public dispatch ( )

filterTemplateParameters() 공개 메소드

Listens to the template.filter_parameters event.
public filterTemplateParameters ( sfEvent $event, array $parameters ) : array
$event sfEvent An sfEvent instance
$parameters array An array of template parameters to filter
리턴 array The filtered parameters array

get() 공개 메소드

Gets an object from the current context.
public get ( string $name ) : object
$name string The name of the object to retrieve
리턴 object The object associated with the given name

getActionName() 공개 메소드

Retrieve the action name for this context.
public getActionName ( ) : string
리턴 string The currently executing action name, if one is set, otherwise null.

getActionStack() 공개 메소드

Retrieve the ActionStack.
public getActionStack ( ) : sfActionStack
리턴 sfActionStack the sfActionStack instance

getConfigCache() 공개 메소드

Returns the configuration cache.
public getConfigCache ( ) : sfConfigCache
리턴 sfConfigCache A sfConfigCache instance

getConfiguration() 공개 메소드

Returns the configuration instance.
public getConfiguration ( ) : sfApplicationConfiguration
리턴 sfApplicationConfiguration The current application configuration instance

getController() 공개 메소드

Retrieve the controller.
public getController ( ) : sfController
리턴 sfController The current sfController implementation instance.

getDatabaseConnection() 공개 메소드

This is a shortcut to manually getting a connection from an existing database implementation instance. If the [sf_use_database] setting is off, this will return null.
public getDatabaseConnection ( name $name = 'default' ) : mixed
$name name A database name.
리턴 mixed A database instance.

getDatabaseManager() 공개 메소드

Retrieve the database manager.
public getDatabaseManager ( ) : sfDatabaseManager
리턴 sfDatabaseManager The current sfDatabaseManager instance.

getEventDispatcher() 공개 메소드

Retrieves the current event dispatcher.
public getEventDispatcher ( ) : sfEventDispatcher
리턴 sfEventDispatcher An sfEventDispatcher instance

getI18N() 공개 메소드

Retrieve the i18n instance
public getI18N ( ) : sfI18N
리턴 sfI18N The current sfI18N implementation instance.

getInstance() 공개 정적인 메소드

Retrieves the singleton instance of this class.
public static getInstance ( string $name = null, string $class = __CLASS__ ) : sfContext
$name string The name of the sfContext to retrieve.
$class string The context class to use (sfContext by default)
리턴 sfContext An sfContext implementation instance.

getLogger() 공개 메소드

Retrieve the logger.
public getLogger ( ) : sfLogger
리턴 sfLogger The current sfLogger implementation instance.

getMailer() 공개 메소드

Retrieves the mailer.
public getMailer ( ) : sfMailer
리턴 sfMailer The current sfMailer implementation instance.

getModuleDirectory() 공개 메소드

Retrieve the module directory for this context.
public getModuleDirectory ( ) : string
리턴 string An absolute filesystem path to the directory of the currently executing module, if one is set, otherwise null.

getModuleName() 공개 메소드

Retrieve the module name for this context.
public getModuleName ( ) : string
리턴 string The currently executing module name, if one is set, otherwise null.

getRequest() 공개 메소드

Retrieve the request.
public getRequest ( ) : sfRequest
리턴 sfRequest The current sfRequest implementation instance.

getResponse() 공개 메소드

Retrieve the response.
public getResponse ( ) : sfResponse
리턴 sfResponse The current sfResponse implementation instance.

getRouting() 공개 메소드

Retrieve the routing instance.
public getRouting ( ) : sfRouting
리턴 sfRouting The current sfRouting implementation instance.

getService() 공개 메소드

Retrieves a service from the service container.
public getService ( string $id ) : object
$id string The service identifier
리턴 object The service instance

getServiceContainer() 공개 메소드

Retrieves the service container.
public getServiceContainer ( ) : sfServiceContainer
리턴 sfServiceContainer The current sfServiceContainer implementation instance.

getStorage() 공개 메소드

Retrieve the storage.
public getStorage ( ) : sfStorage
리턴 sfStorage The current sfStorage implementation instance.

getUser() 공개 메소드

Retrieve the user.
public getUser ( ) : sfUser
리턴 sfUser The current sfUser implementation instance.

getViewCacheManager() 공개 메소드

Retrieve the view cache manager
public getViewCacheManager ( ) : sfViewCacheManager
리턴 sfViewCacheManager The current sfViewCacheManager implementation instance.

has() 공개 메소드

Returns true if an object is currently stored in the current context with the given name, false otherwise.
public has ( string $name ) : boolean
$name string The object name
리턴 boolean true if the object is not null, false otherwise

hasInstance() 공개 정적인 메소드

Checks to see if there has been a context created
public static hasInstance ( string $name = null ) : boolean
$name string The name of the sfContext to check for
리턴 boolean true is instanced, otherwise false

initialize() 공개 메소드

Initializes the current sfContext instance.
public initialize ( sfApplicationConfiguration $configuration )
$configuration sfApplicationConfiguration An sfApplicationConfiguration instance

loadFactories() 공개 메소드

Loads the symfony factories.
public loadFactories ( )

offsetExists() 공개 메소드

Returns true if the context object exists (implements the ArrayAccess interface).
public offsetExists ( string $name ) : boolean
$name string The name of the context object
리턴 boolean true if the context object exists, false otherwise

offsetGet() 공개 메소드

Returns the context object associated with the name (implements the ArrayAccess interface).
public offsetGet ( string $name ) : mixed
$name string The offset of the value to get
리턴 mixed The context object if exists, null otherwise

offsetSet() 공개 메소드

Sets the context object associated with the offset (implements the ArrayAccess interface).
public offsetSet ( string $offset, string $value )
$offset string The parameter name
$value string The parameter value

offsetUnset() 공개 메소드

Unsets the context object associated with the offset (implements the ArrayAccess interface).
public offsetUnset ( string $offset )
$offset string The parameter name

set() 공개 메소드

Puts an object in the current context.
public set ( string $name, object $object )
$name string The name of the object to store
$object object The object to store

setMailerConfiguration() 공개 메소드

Set mailer configuration.
public setMailerConfiguration ( array $configuration )
$configuration array

setResponse() 공개 메소드

Set the response object.
public setResponse ( sfResponse $response ) : void
$response sfResponse An sfResponse instance.
리턴 void

setServiceContainerConfiguration() 공개 메소드

Set service ontainer configuration
public setServiceContainerConfiguration ( array $config )
$config array

shutdown() 공개 메소드

Execute the shutdown procedure.
public shutdown ( ) : void
리턴 void

shutdownUserAndStorage() 공개 메소드

Shuts the user/storage down.

switchTo() 공개 정적인 메소드

Sets the current context to something else
public static switchTo ( string $name )
$name string The name of the context to switch to

프로퍼티 상세

$configuration 보호되어 있는 프로퍼티

protected $configuration

$current 보호되어 있는 정적으로 프로퍼티

protected static $current

$dispatcher 보호되어 있는 프로퍼티

protected $dispatcher

$factories 보호되어 있는 프로퍼티

protected $factories

$hasShutdownUserAndStorage 보호되어 있는 프로퍼티

protected $hasShutdownUserAndStorage

$instances 보호되어 있는 정적으로 프로퍼티

protected static $instances

$mailerConfiguration 보호되어 있는 프로퍼티

protected $mailerConfiguration

$serviceContainerConfiguration 보호되어 있는 프로퍼티

protected $serviceContainerConfiguration