PHP 클래스 Symfony\Component\HttpKernel\Kernel

It manages an environment made of bundles.
저자: Fabien Potencier ([email protected])
상속: implements Symfony\Component\HttpKernel\KernelInterface, implements Symfony\Component\HttpKernel\TerminableInterface
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$booted
$bundleDirs
$bundleMap
$bundles
$classes
$container
$debug
$environment
$name
$rootDir
$startTime

공개 메소드들

메소드 설명
__clone ( )
__construct ( string $environment, boolean $debug ) Constructor.
addClassesToCache ( array $classes )
boot ( ) Boots the current kernel.
getBundle ( string $name, boolean $first = true ) : Symfony\Component\HttpKernel\Bundle\BundleInterface | Array Returns a bundle and optionally its descendants by its name.
getBundleDirs ( ) : array Gets the directories where bundles can be stored.
getBundleForClass ( string $class ) : string Returns the Bundle name for a given class.
getBundles ( ) : array Gets the registered bundle names.
getCacheDir ( )
getCacheDir ( ) : string Gets the cache directory.
getContainer ( )
getContainer ( ) : Symfony\Component\DependencyInjection\ContainerInterface Gets the current container.
getEnvironment ( )
getEnvironment ( ) : string Gets the environment.
getKernelParameters ( )
getLogDir ( )
getLogDir ( ) : string Gets the log directory.
getName ( )
getName ( ) : string Gets the name of the kernel
getRootDir ( )
getRootDir ( ) : string Gets the application root dir.
getSafeName ( )
getStartTime ( )
getStartTime ( ) : integer Gets the request start time (not available if debug is disabled).
handle ( Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true )
init ( )
isBooted ( ) : boolean Checks whether the current kernel has been booted or not.
isClassInActiveBundle ( string $class ) : boolean Checks if a given class name belongs to an active bundle.
isDebug ( )
isDebug ( ) : boolean Checks if debug mode is enabled.
loadClassCache ( string $name = 'classes', string $extension = '.php' ) Loads the PHP class cache.
locateResource ( string $name, string $dir = null, boolean $first = true ) : string | array Returns the file path for a given resource.
reboot ( ) Reboots the kernel.
registerBundleDirs ( )
registerBundles ( )
registerContainerConfiguration ( Symfony\Component\DependencyInjection\Loader\LoaderInterface $loader )
registerRootDir ( )
serialize ( )
setClassCache ( array $classes ) Used internally.
shutdown ( ) Shutdowns the kernel.
stripComments ( string $source ) : string Removes comments from a PHP source string.
unserialize ( $data )

보호된 메소드들

메소드 설명
buildContainer ( $class, $file )
buildContainer ( ) : ContainerBuilder Builds the service container.
dumpContainer ( Symfony\Component\Config\ConfigCache $cache, ContainerBuilder $container, string $class, string $baseClass ) Dumps the service container to PHP code in the cache.
getContainerBaseClass ( ) : string Gets the container's base class.
getContainerClass ( ) : string Gets the container class.
getContainerLoader ( Symfony\Component\DependencyInjection\ContainerInterface $container )
getContainerLoader ( Symfony\Component\DependencyInjection\ContainerInterface $container ) : Symfony\Component\Config\Loader\DelegatingLoader Returns a loader for the container.
getEnvParameters ( )
getEnvParameters ( ) : array Gets the environment parameters.
getHttpKernel ( ) : HttpKernel Gets a http kernel from the container
getKernelParameters ( ) : array Returns the kernel parameters.
initializeBundles ( ) Initializes the data structures related to the bundle management.
initializeContainer ( )
needsReload ( $class, $location )
writeCacheFile ( $file, $content )

메소드 상세

__clone() 공개 메소드

public __clone ( )

__construct() 공개 메소드

Constructor.
public __construct ( string $environment, boolean $debug )
$environment string The environment
$debug boolean Whether to enable debugging or not

addClassesToCache() 공개 메소드

public addClassesToCache ( array $classes )
$classes array

boot() 공개 메소드

This method boots the bundles, which MUST set the DI container.
public boot ( )

buildContainer() 보호된 메소드

protected buildContainer ( $class, $file )

buildContainer() 보호된 메소드

Builds the service container.
protected buildContainer ( ) : ContainerBuilder
리턴 Symfony\Component\DependencyInjection\ContainerBuilder The compiled service container

dumpContainer() 보호된 메소드

Dumps the service container to PHP code in the cache.
protected dumpContainer ( Symfony\Component\Config\ConfigCache $cache, ContainerBuilder $container, string $class, string $baseClass )
$cache Symfony\Component\Config\ConfigCache The config cache
$container Symfony\Component\DependencyInjection\ContainerBuilder The service container
$class string The name of the class to generate
$baseClass string The name of the container's base class

getBundle() 공개 메소드

Returns a bundle and optionally its descendants by its name.
public getBundle ( string $name, boolean $first = true ) : Symfony\Component\HttpKernel\Bundle\BundleInterface | Array
$name string Bundle name
$first boolean Whether to return the first bundle only or together with its descendants
리턴 Symfony\Component\HttpKernel\Bundle\BundleInterface | Array A BundleInterface instance or an array of BundleInterface instances if $first is false

getBundleDirs() 공개 메소드

Gets the directories where bundles can be stored.
public getBundleDirs ( ) : array
리턴 array An array of directories where bundles can be stored

getBundleForClass() 공개 메소드

Returns the Bundle name for a given class.
public getBundleForClass ( string $class ) : string
$class string A class name
리턴 string The Bundle name or null if the class does not belongs to a bundle

getBundles() 공개 메소드

Gets the registered bundle names.
public getBundles ( ) : array
리턴 array An array of registered bundle names

getCacheDir() 공개 메소드

public getCacheDir ( )

getCacheDir() 공개 메소드

Gets the cache directory.
public getCacheDir ( ) : string
리턴 string The cache directory

getContainer() 공개 메소드

public getContainer ( )

getContainer() 공개 메소드

Gets the current container.
public getContainer ( ) : Symfony\Component\DependencyInjection\ContainerInterface
리턴 Symfony\Component\DependencyInjection\ContainerInterface A ContainerInterface instance

getContainerBaseClass() 보호된 메소드

All names except Container must be fully qualified.
protected getContainerBaseClass ( ) : string
리턴 string

getContainerClass() 보호된 메소드

Gets the container class.
protected getContainerClass ( ) : string
리턴 string The container class

getContainerLoader() 보호된 메소드

protected getContainerLoader ( Symfony\Component\DependencyInjection\ContainerInterface $container )
$container Symfony\Component\DependencyInjection\ContainerInterface

getContainerLoader() 보호된 메소드

Returns a loader for the container.
protected getContainerLoader ( Symfony\Component\DependencyInjection\ContainerInterface $container ) : Symfony\Component\Config\Loader\DelegatingLoader
$container Symfony\Component\DependencyInjection\ContainerInterface The service container
리턴 Symfony\Component\Config\Loader\DelegatingLoader The loader

getEnvParameters() 보호된 메소드

protected getEnvParameters ( )

getEnvParameters() 보호된 메소드

Only the parameters starting with "SYMFONY__" are considered.
protected getEnvParameters ( ) : array
리턴 array An array of parameters

getEnvironment() 공개 메소드

public getEnvironment ( )

getEnvironment() 공개 메소드

Gets the environment.
public getEnvironment ( ) : string
리턴 string The current environment

getHttpKernel() 보호된 메소드

Gets a http kernel from the container
protected getHttpKernel ( ) : HttpKernel
리턴 HttpKernel

getKernelParameters() 공개 메소드

public getKernelParameters ( )

getKernelParameters() 보호된 메소드

Returns the kernel parameters.
protected getKernelParameters ( ) : array
리턴 array An array of kernel parameters

getLogDir() 공개 메소드

public getLogDir ( )

getLogDir() 공개 메소드

Gets the log directory.
public getLogDir ( ) : string
리턴 string The log directory

getName() 공개 메소드

public getName ( )

getName() 공개 메소드

Gets the name of the kernel
public getName ( ) : string
리턴 string The kernel name

getRootDir() 공개 메소드

public getRootDir ( )

getRootDir() 공개 메소드

Gets the application root dir.
public getRootDir ( ) : string
리턴 string The application root dir

getSafeName() 공개 메소드

public getSafeName ( )

getStartTime() 공개 메소드

public getStartTime ( )

getStartTime() 공개 메소드

Gets the request start time (not available if debug is disabled).
public getStartTime ( ) : integer
리턴 integer The request start timestamp

handle() 공개 메소드

public handle ( Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true )
$request Symfony\Component\HttpFoundation\Request

init() 공개 메소드

public init ( )

initializeBundles() 보호된 메소드

- the bundles property maps a bundle name to the bundle instance, - the bundleMap property maps a bundle name to the bundle inheritance hierarchy (most derived bundle first).
protected initializeBundles ( )

initializeContainer() 보호된 메소드

protected initializeContainer ( )

isBooted() 공개 메소드

Checks whether the current kernel has been booted or not.
public isBooted ( ) : boolean
리턴 boolean $booted

isClassInActiveBundle() 공개 메소드

Checks if a given class name belongs to an active bundle.
public isClassInActiveBundle ( string $class ) : boolean
$class string A class name
리턴 boolean true if the class belongs to an active bundle, false otherwise

isDebug() 공개 메소드

public isDebug ( )

isDebug() 공개 메소드

Checks if debug mode is enabled.
public isDebug ( ) : boolean
리턴 boolean true if debug mode is enabled, false otherwise

loadClassCache() 공개 메소드

Loads the PHP class cache.
public loadClassCache ( string $name = 'classes', string $extension = '.php' )
$name string The cache name prefix
$extension string File extension of the resulting file

locateResource() 공개 메소드

A Resource can be a file or a directory. The resource name must follow the following pattern: @/path/to/a/file.something where BundleName is the name of the bundle and the remaining part is the relative path in the bundle. If $dir is passed, and the first segment of the path is "Resources", this method will look for a file named: $dir//path/without/Resources before looking in the bundle resource folder.
public locateResource ( string $name, string $dir = null, boolean $first = true ) : string | array
$name string A resource name to locate
$dir string A directory where to look for the resource first
$first boolean Whether to return the first path or paths for all matching bundles
리턴 string | array The absolute path of the resource or an array if $first is false

needsReload() 보호된 메소드

protected needsReload ( $class, $location )

reboot() 공개 메소드

This method is mainly useful when doing functional testing. It is a shortcut for the call to shutdown() and boot().
public reboot ( )

registerBundleDirs() 추상적인 공개 메소드

abstract public registerBundleDirs ( )

registerBundles() 추상적인 공개 메소드

abstract public registerBundles ( )

registerContainerConfiguration() 추상적인 공개 메소드

abstract public registerContainerConfiguration ( Symfony\Component\DependencyInjection\Loader\LoaderInterface $loader )
$loader Symfony\Component\DependencyInjection\Loader\LoaderInterface

registerRootDir() 추상적인 공개 메소드

abstract public registerRootDir ( )

serialize() 공개 메소드

public serialize ( )

setClassCache() 공개 메소드

Used internally.
public setClassCache ( array $classes )
$classes array

shutdown() 공개 메소드

This method is mainly useful when doing functional testing.
public shutdown ( )

stripComments() 공개 정적인 메소드

We don't use the PHP php_strip_whitespace() function as we want the content to be readable and well-formatted.
public static stripComments ( string $source ) : string
$source string A PHP string
리턴 string The PHP string with the comments removed

unserialize() 공개 메소드

public unserialize ( $data )

writeCacheFile() 보호된 메소드

protected writeCacheFile ( $file, $content )

프로퍼티 상세

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

protected $booted

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

protected $bundleDirs

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

protected $bundleMap

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

protected $bundles

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

protected $classes

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

protected $container

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

protected $debug

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

protected $environment

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

protected $name

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

protected $rootDir

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

protected $startTime