class ConfigPublisher (View source)

Properties

protected Filesystem $files

The filesystem instance.

protected string $publishPath

The destination of the config files.

protected string $packagePath

The path to the application's packages.

Methods

void
__construct(Filesystem $files, string $publishPath)

Create a new configuration publisher instance.

bool
publish(string $package, string $source)

Publish configuration files from a given path.

bool
publishPackage(string $package, string $packagePath = null)

Publish the configuration files for a package.

string
getSource(string $package, string $packagePath)

Get the source configuration directory to publish.

void
makeDestination(string $destination)

Create the destination directory if it doesn't exist.

bool
alreadyPublished(string $package)

Determine if a given package has already been published.

string
getDestinationPath(string $package)

Get the target destination path for the configuration files.

void
setPackagePath(string $packagePath)

Set the default package path.

Details

void __construct(Filesystem $files, string $publishPath)

Create a new configuration publisher instance.

Parameters

Filesystem $files
string $publishPath

Return Value

void

bool publish(string $package, string $source)

Publish configuration files from a given path.

Parameters

string $package
string $source

Return Value

bool

bool publishPackage(string $package, string $packagePath = null)

Publish the configuration files for a package.

Parameters

string $package
string $packagePath

Return Value

bool

protected string getSource(string $package, string $packagePath)

Get the source configuration directory to publish.

Parameters

string $package
string $packagePath

Return Value

string

Exceptions

InvalidArgumentException

protected void makeDestination(string $destination)

Create the destination directory if it doesn't exist.

Parameters

string $destination

Return Value

void

bool alreadyPublished(string $package)

Determine if a given package has already been published.

Parameters

string $package

Return Value

bool

string getDestinationPath(string $package)

Get the target destination path for the configuration files.

Parameters

string $package

Return Value

string

void setPackagePath(string $packagePath)

Set the default package path.

Parameters

string $packagePath

Return Value

void