PHP Class Bolt\Configuration\ResourceManager

Intended to simplify the ability to override resource location
Author: Ross Riley, [email protected]
Afficher le fichier Open project: bolt/bolt Class Usage Examples

Méthodes publiques

Свойство Type Description
$app Silex\Application
$theApp Silex\Application
$urlPrefix string

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
__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 ( )

Method Details

__construct() public méthode

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() public méthode

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
Résultat string Path leading from $frompath to $topath

getApp() public static méthode

Get the Bolt\Application object.
public static getApp ( ) : Silex\Application
Résultat Silex\Application

getClassLoader() public méthode

Get the Composer autoload ClassLoader.
public getClassLoader ( ) : Composer\Autoload\ClassLoader
Résultat Composer\Autoload\ClassLoader

getPath() public méthode

Subdirectories are automatically parsed to correct filesystem. For example: $bar = getPath('root/foo/bar');
public getPath ( string $name ) : string
$name string Name of path
Résultat string

getPathObject() public méthode

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
Résultat Eloquent\Pathogen\AbsolutePathInterface

getPaths() public méthode

Just don't use this.
Deprecation: since 3.0, to be removed in 4.0.
public getPaths ( ) : PathsProxy
Résultat PathsProxy

getRequest() public méthode

Get a request parameter.
public getRequest ( string $name ) : string
$name string
Résultat string

getUrl() public méthode

Get a URL path definition.
public getUrl ( string $name, boolean $includeBasePath = true ) : string
$name string
$includeBasePath boolean
Résultat string

getVerifier() public méthode

Get the LowlevelChecks object.
public getVerifier ( ) : Bolt\Configuration\Validation\ValidatorInterface
Résultat Bolt\Configuration\Validation\ValidatorInterface

hasPath() public méthode

Checks if the given name has a path associated with it
public hasPath ( string $name ) : boolean
$name string of path
Résultat boolean

initialize() public méthode

public initialize ( )

initializeConfig() public méthode

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

initializeRequest() public méthode

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 méthode

public postInitialize ( )

setApp() public méthode

Don't use!
Deprecation: Deprecated since 3.0, to be removed in 4.0.
public setApp ( Silex\Application $app )
$app Silex\Application

setPath() public méthode

Set a resource path.
public setPath ( string $name, string $value ) : Eloquent\Pathogen\RelativePathInterface | Eloquent\Pathogen\AbsolutePathInterface
$name string
$value string
Résultat Eloquent\Pathogen\RelativePathInterface | Eloquent\Pathogen\AbsolutePathInterface

setRequest() public méthode

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

setThemePath() public méthode

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() public méthode

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

setVerifier() public méthode

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

useLoader() public méthode

public useLoader ( Composer\Autoload\ClassLoader $loader ) : Eloquent\Pathogen\RelativePathInterface | Eloquent\Pathogen\AbsolutePathInterface
$loader Composer\Autoload\ClassLoader
Résultat Eloquent\Pathogen\RelativePathInterface | Eloquent\Pathogen\AbsolutePathInterface

verify() public méthode

Deprecation: Deprecated since 3.1, to be removed in 4.0.
public verify ( )

verifyDb() public méthode

Deprecation: Deprecated since 3.1, to be removed in 4.0.
public verifyDb ( )

Property Details

$app public_oe property

public Application,Silex $app
Résultat Silex\Application

$classLoader protected_oe property

protected ClassLoader,Composer\Autoload|null $classLoader
Résultat Composer\Autoload\ClassLoader | null

$pathManager protected_oe property

protected FileSystemPathFactory,Eloquent\Pathogen\FileSystem\Factory $pathManager
Résultat Eloquent\Pathogen\FileSystem\Factory\FileSystemPathFactory

$paths protected_oe property

protected AbsolutePathInterface[],Eloquent\Pathogen $paths
Résultat Eloquent\Pathogen\AbsolutePathInterface[]

$request protected_oe property

protected string[] $request
Résultat string[]

$requestObject protected_oe property

protected Request,Symfony\Component\HttpFoundation $requestObject
Résultat Symfony\Component\HttpFoundation\Request

$root protected_oe property

protected AbsolutePathInterface,Eloquent\Pathogen $root
Résultat Eloquent\Pathogen\AbsolutePathInterface

$theApp public_oe static_oe property

Deprecation: Deprecated since 3.0, to be removed in 4.0.
public static Application,Silex $theApp
Résultat Silex\Application

$urlPrefix public_oe property

public string $urlPrefix
Résultat string

$urls protected_oe property

protected array $urls
Résultat array

$verifier protected_oe property

protected LowLevelChecks|null $verifier
Résultat LowLevelChecks | null