PHP Класс Bolt\Configuration\ResourceManager

Intended to simplify the ability to override resource location
Автор: Ross Riley, [email protected]
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$app Silex\Application
$theApp Silex\Application
$urlPrefix string

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

Свойство Тип Описание
$classLoader Composer\Autoload\ClassLoader | null
$pathManager Eloquent\Pathogen\FileSystem\Factory\FileSystemPathFactory
$paths Eloquent\Pathogen\AbsolutePathInterface[]
$request string[]
$requestObject Symfony\Component\HttpFoundation\Request
$root Eloquent\Pathogen\AbsolutePathInterface
$urls array
$verifier LowLevelChecks | null

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

Метод Описание
__construct ( ArrayAccess $container ) Constructor initialises on the app root path.
findRelativePath ( string $frompath, string $topath ) : string Find the relative file system path between two file system paths.
getApp ( ) : Silex\Application Get the Bolt\Application object.
getClassLoader ( ) : Composer\Autoload\ClassLoader Get the Composer autoload ClassLoader.
getPath ( string $name ) : string Gets a path as a string.
getPathObject ( string $name ) : Eloquent\Pathogen\AbsolutePathInterface Gets a path as a PathInterface.
getPaths ( ) : PathsProxy Just don't use this.
getRequest ( string $name ) : string Get a request parameter.
getUrl ( string $name, boolean $includeBasePath = true ) : string Get a URL path definition.
getVerifier ( ) : Bolt\Configuration\Validation\ValidatorInterface Get the LowlevelChecks object.
hasPath ( string $name ) : boolean Checks if the given name has a path associated with it
initialize ( )
initializeConfig ( array $config ) Takes a loaded config array and uses it to initialize settings that depend on it.
initializeRequest ( Silex\Application $app, Request $request = null ) Takes a Request object and uses it to initialize settings that depend on the request.
postInitialize ( )
setApp ( Silex\Application $app ) Don't use!
setPath ( string $name, string $value ) : Eloquent\Pathogen\RelativePathInterface | Eloquent\Pathogen\AbsolutePathInterface Set a resource path.
setRequest ( string $name, string $value ) Set a parameter that describes the request.
setThemePath ( array $generalConfig ) This currently gets special treatment because of the processing order.
setUrl ( string $name, string $value ) Set a URL path definition.
setVerifier ( Bolt\Configuration\Validation\ValidatorInterface | null $verifier ) Set the LowlevelChecks object.
useLoader ( Composer\Autoload\ClassLoader $loader ) : Eloquent\Pathogen\RelativePathInterface | Eloquent\Pathogen\AbsolutePathInterface
verify ( )
verifyDb ( )

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

__construct() публичный Метод

Constructor initialises on the app root path.
public __construct ( ArrayAccess $container )
$container ArrayAccess ArrayAccess compatible DI container that must contain one of: 'classloader' of instance a ClassLoader will use introspection to find root path or 'rootpath' will be treated as an existing directory as string. Optional ones: 'request' - Symfony\Component\HttpFoundation\Request

findRelativePath() публичный Метод

Find the relative file system path between two file system paths.
public findRelativePath ( string $frompath, string $topath ) : string
$frompath string Path to start from
$topath string Path we want to end up in
Результат string Path leading from $frompath to $topath

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

Get the Bolt\Application object.
public static getApp ( ) : Silex\Application
Результат Silex\Application

getClassLoader() публичный Метод

Get the Composer autoload ClassLoader.
public getClassLoader ( ) : Composer\Autoload\ClassLoader
Результат Composer\Autoload\ClassLoader

getPath() публичный Метод

Subdirectories are automatically parsed to correct filesystem. For example: $bar = getPath('root/foo/bar');
public getPath ( string $name ) : string
$name string Name of path
Результат string

getPathObject() публичный Метод

Subdirectories are automatically parsed to correct filesystem. For example: $bar = getPath('root/foo/bar');
public getPathObject ( string $name ) : Eloquent\Pathogen\AbsolutePathInterface
$name string Name of path
Результат Eloquent\Pathogen\AbsolutePathInterface

getPaths() публичный Метод

Just don't use this.
Устаревший: since 3.0, to be removed in 4.0.
public getPaths ( ) : PathsProxy
Результат PathsProxy

getRequest() публичный Метод

Get a request parameter.
public getRequest ( string $name ) : string
$name string
Результат string

getUrl() публичный Метод

Get a URL path definition.
public getUrl ( string $name, boolean $includeBasePath = true ) : string
$name string
$includeBasePath boolean
Результат string

getVerifier() публичный Метод

Get the LowlevelChecks object.
public getVerifier ( ) : Bolt\Configuration\Validation\ValidatorInterface
Результат Bolt\Configuration\Validation\ValidatorInterface

hasPath() публичный Метод

Checks if the given name has a path associated with it
public hasPath ( string $name ) : boolean
$name string of path
Результат boolean

initialize() публичный Метод

public initialize ( )

initializeConfig() публичный Метод

Takes a loaded config array and uses it to initialize settings that depend on it.
public initializeConfig ( array $config )
$config array

initializeRequest() публичный Метод

Takes a Request object and uses it to initialize settings that depend on the request.
public initializeRequest ( Silex\Application $app, Request $request = null )
$app Silex\Application
$request Symfony\Component\HttpFoundation\Request

postInitialize() публичный Метод

public postInitialize ( )

setApp() публичный Метод

Don't use!
Устаревший: Deprecated since 3.0, to be removed in 4.0.
public setApp ( Silex\Application $app )
$app Silex\Application

setPath() публичный Метод

Set a resource path.
public setPath ( string $name, string $value ) : Eloquent\Pathogen\RelativePathInterface | Eloquent\Pathogen\AbsolutePathInterface
$name string
$value string
Результат Eloquent\Pathogen\RelativePathInterface | Eloquent\Pathogen\AbsolutePathInterface

setRequest() публичный Метод

e.g. 'hostname', 'protocol' or 'canonical'
public setRequest ( string $name, string $value )
$name string
$value string

setThemePath() публичный Метод

The theme path is needed before the app has constructed, so this is a shortcut to allow the Application constructor to pre-provide a theme path.
public setThemePath ( array $generalConfig )
$generalConfig array

setUrl() публичный Метод

Set a URL path definition.
public setUrl ( string $name, string $value )
$name string
$value string

setVerifier() публичный Метод

Set the LowlevelChecks object.
public setVerifier ( Bolt\Configuration\Validation\ValidatorInterface | null $verifier )
$verifier Bolt\Configuration\Validation\ValidatorInterface | null

useLoader() публичный Метод

public useLoader ( Composer\Autoload\ClassLoader $loader ) : Eloquent\Pathogen\RelativePathInterface | Eloquent\Pathogen\AbsolutePathInterface
$loader Composer\Autoload\ClassLoader
Результат Eloquent\Pathogen\RelativePathInterface | Eloquent\Pathogen\AbsolutePathInterface

verify() публичный Метод

Устаревший: Deprecated since 3.1, to be removed in 4.0.
public verify ( )

verifyDb() публичный Метод

Устаревший: Deprecated since 3.1, to be removed in 4.0.
public verifyDb ( )

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

$app публичное свойство

public Application,Silex $app
Результат Silex\Application

$classLoader защищенное свойство

protected ClassLoader,Composer\Autoload|null $classLoader
Результат Composer\Autoload\ClassLoader | null

$pathManager защищенное свойство

protected FileSystemPathFactory,Eloquent\Pathogen\FileSystem\Factory $pathManager
Результат Eloquent\Pathogen\FileSystem\Factory\FileSystemPathFactory

$paths защищенное свойство

protected AbsolutePathInterface[],Eloquent\Pathogen $paths
Результат Eloquent\Pathogen\AbsolutePathInterface[]

$request защищенное свойство

protected string[] $request
Результат string[]

$requestObject защищенное свойство

protected Request,Symfony\Component\HttpFoundation $requestObject
Результат Symfony\Component\HttpFoundation\Request

$root защищенное свойство

protected AbsolutePathInterface,Eloquent\Pathogen $root
Результат Eloquent\Pathogen\AbsolutePathInterface

$theApp публичное статическое свойство

Устаревший: Deprecated since 3.0, to be removed in 4.0.
public static Application,Silex $theApp
Результат Silex\Application

$urlPrefix публичное свойство

public string $urlPrefix
Результат string

$urls защищенное свойство

protected array $urls
Результат array

$verifier защищенное свойство

protected LowLevelChecks|null $verifier
Результат LowLevelChecks | null