PHP Class Valet\Configuration

Show file Open project: laravel/valet

Public Properties

Property Type Description
$files

Public Methods

Method Description
__construct ( Filesystem $files ) Create a new Valet configuration class instance.
addPath ( string $path, boolean $prepend = false ) : void Add the given path to the configuration.
createConfigurationDirectory ( ) : void Create the Valet configuration directory.
createDriversDirectory ( ) : void Create the Valet drivers directory.
createExtensionsDirectory ( ) : void Create the directory for the Valet extensions.
createLogDirectory ( ) : void Create the directory for Caddy log.
createSitesDirectory ( ) : void Create the Valet sites directory.
install ( ) : void Install the Valet configuration file.
path ( ) : string Get the configuration file path.
prependPath ( string $path ) : void Prepend the given path to the configuration.
prune ( ) : void Prune all non-existent paths from the configuration.
read ( ) : array Read the configuration file as JSON.
removePath ( string $path ) : void Remove the given path from the configuration.
updateKey ( string $key, mixed $value ) : array Update a specific key in the configuration file.
write ( array $config ) : void Write the given configuration to disk.
writeBaseConfiguration ( ) Write the base, initial configuration for Valet.

Method Details

__construct() public method

Create a new Valet configuration class instance.
public __construct ( Filesystem $files )
$files Filesystem

addPath() public method

Add the given path to the configuration.
public addPath ( string $path, boolean $prepend = false ) : void
$path string
$prepend boolean
return void

createConfigurationDirectory() public method

Create the Valet configuration directory.
public createConfigurationDirectory ( ) : void
return void

createDriversDirectory() public method

Create the Valet drivers directory.
public createDriversDirectory ( ) : void
return void

createExtensionsDirectory() public method

Create the directory for the Valet extensions.
public createExtensionsDirectory ( ) : void
return void

createLogDirectory() public method

Create the directory for Caddy log.
public createLogDirectory ( ) : void
return void

createSitesDirectory() public method

Create the Valet sites directory.
public createSitesDirectory ( ) : void
return void

install() public method

Install the Valet configuration file.
public install ( ) : void
return void

path() public method

Get the configuration file path.
public path ( ) : string
return string

prependPath() public method

Prepend the given path to the configuration.
public prependPath ( string $path ) : void
$path string
return void

prune() public method

Prune all non-existent paths from the configuration.
public prune ( ) : void
return void

read() public method

Read the configuration file as JSON.
public read ( ) : array
return array

removePath() public method

Remove the given path from the configuration.
public removePath ( string $path ) : void
$path string
return void

updateKey() public method

Update a specific key in the configuration file.
public updateKey ( string $key, mixed $value ) : array
$key string
$value mixed
return array

write() public method

Write the given configuration to disk.
public write ( array $config ) : void
$config array
return void

writeBaseConfiguration() public method

Write the base, initial configuration for Valet.

Property Details

$files public property

public $files