Skip to content

CopyResourceCommand

github-actions edited this page Apr 22, 2026 · 1 revision

Copies packaged or local resources into the consumer repository.


Methods

__construct

Creates a new CopyResourceCommand instance.

public __construct(\FastForward\DevTools\Filesystem\FilesystemInterface $filesystem, \Symfony\Component\Config\FileLocatorInterface $fileLocator, \FastForward\DevTools\Filesystem\FinderFactoryInterface $finderFactory, \FastForward\DevTools\Resource\FileDiffer $fileDiffer, \Psr\Log\LoggerInterface $logger): mixed

Parameters:

Parameter Type Description
$filesystem \FastForward\DevTools\Filesystem\FilesystemInterface the filesystem used for copy operations
$fileLocator \Symfony\Component\Config\FileLocatorInterface the locator used to resolve source resources
$finderFactory \FastForward\DevTools\Filesystem\FinderFactoryInterface the factory used to create finders for directory resources
$fileDiffer \FastForward\DevTools\Resource\FileDiffer the service used to summarize overwrite changes
$logger \Psr\Log\LoggerInterface the output-aware logger

configure

Configures source, target, and overwrite controls.

protected configure(): void

execute

Copies the requested resource.

protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): int

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface the input containing source and target paths
$output \Symfony\Component\Console\Output\OutputInterface the output used to report copy results

Return Value:

the command status code


Inherited methods

addJsonOption

Adds the standard JSON output options to the current command.

protected addJsonOption(): static

isJsonOutput

Determines whether JSON output was requested.

protected isJsonOutput(\Symfony\Component\Console\Input\InputInterface $input): bool

The pretty-json flag SHALL imply JSON output.

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface

isPrettyJsonOutput

Determines whether pretty JSON output was requested.

protected isPrettyJsonOutput(\Symfony\Component\Console\Input\InputInterface $input): bool

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface

Clone this wiki locally