PHP Class Bolt\Configuration\Environment

Author: Gawain Lynch ([email protected])
Show file Open project: bolt/bolt

Protected Properties

Property Type Description
$actions Pimpl\Pimple
$appPath string
$boltVersion string
$cache Bolt\Cache
$filesystem Symfony\Component\Filesystem\Filesystem
$rootPath string
$viewPath string

Public Methods

Method Description
__construct ( string $appPath, string $viewPath, Cache $cache, Pimpl\Pimple $actions, string $boltVersion ) Constructor.
checkVersion ( ) Check Bolt's version against a cached key. If there is a change we flush the cache data and if required synchronise asset directories.
hasVersionChange ( ) : boolean Has a Bolt version change been detected.
syncView ( ) : array | null Perform a synchronisation of files in specific app/view/ subdirectories.

Protected Methods

Method Description
checkCacheVersion ( ) : boolean Check if the cache version matches Bolt's current version
syncViewDirectory ( string $dir ) Synchronise the files in an app/view/ subdirectory.
updateAutoloader ( ) Update the extension autoloader.
updateCacheVersion ( ) Write our version string out to given cache directory

Private Methods

Method Description
getVersionFileName ( )

Method Details

__construct() public method

Constructor.
public __construct ( string $appPath, string $viewPath, Cache $cache, Pimpl\Pimple $actions, string $boltVersion )
$appPath string
$viewPath string
$cache Bolt\Cache
$actions Pimpl\Pimple
$boltVersion string

checkCacheVersion() protected method

Check if the cache version matches Bolt's current version
protected checkCacheVersion ( ) : boolean
return boolean TRUE - versions match FALSE - versions don't match

checkVersion() public method

Check Bolt's version against a cached key. If there is a change we flush the cache data and if required synchronise asset directories.
public checkVersion ( )

hasVersionChange() public method

Has a Bolt version change been detected.
public hasVersionChange ( ) : boolean
return boolean

syncView() public method

Perform a synchronisation of files in specific app/view/ subdirectories.
public syncView ( ) : array | null
return array | null

syncViewDirectory() protected method

Synchronise the files in an app/view/ subdirectory.
protected syncViewDirectory ( string $dir )
$dir string

updateAutoloader() protected method

Update the extension autoloader.
protected updateAutoloader ( )

updateCacheVersion() protected method

Write our version string out to given cache directory
protected updateCacheVersion ( )

Property Details

$actions protected property

protected Pimple,Pimpl $actions
return Pimpl\Pimple

$appPath protected property

protected string $appPath
return string

$boltVersion protected property

protected string $boltVersion
return string

$cache protected property

protected Cache,Bolt $cache
return Bolt\Cache

$filesystem protected property

protected Filesystem,Symfony\Component\Filesystem $filesystem
return Symfony\Component\Filesystem\Filesystem

$rootPath protected property

protected string $rootPath
return string

$viewPath protected property

protected string $viewPath
return string