PackageCreator
class PackageCreator (View source)
Properties
protected Filesystem | $files | The filesystem instance. |
|
protected | $basicBlocks | The basic building blocks of the package. |
|
protected | $blocks | The building blocks of the package. |
Methods
Get the blocks for a given package.
Write the support files to the package root.
Write the Composer.json stub file.
Get the Composer.json stub file contents.
Write the stub .gitignore file for the package.
Create the support directories for a package.
Write a specific support directory for the package.
Create the public directory for the package.
Write the stub ServiceProvider for the package.
Write the service provider stub for the package.
Load the raw service provider file.
Create the main source directory for the package.
Details
void
__construct(Filesystem $files)
Create a new package creator instance.
string
create(Package $package, string $path, bool $plain = true)
Create a new package stub.
void
createWithResources(Package $package, string $path)
Create a package with all resource directories.
protected array
getBlocks(bool $plain)
Get the blocks for a given package.
void
writeSupportFiles(Package $package, string $directory, bool $plain)
Write the support files to the package root.
protected void
writePhpUnitFile(Package $package, string $directory)
Write the PHPUnit stub file.
protected void
writeTravisFile(Package $package, string $directory)
Write the Travis stub file.
protected void
writeComposerFile(Package $package, string $directory, bool $plain)
Write the Composer.json stub file.
protected string
getComposerStub(bool $plain)
Get the Composer.json stub file contents.
void
writeIgnoreFile(Package $package, string $directory, bool $plain)
Write the stub .gitignore file for the package.
void
writeSupportDirectories(Package $package, string $directory)
Create the support directories for a package.
protected void
writeSupportDirectory(Package $package, string $support, string $directory)
Write a specific support directory for the package.
void
writePublicDirectory(Package $package, string $directory, bool $plain)
Create the public directory for the package.
void
writeTestDirectory(Package $package, string $directory)
Create the test directory for the package.
void
writeServiceProvider(Package $package, string $directory, bool $plain)
Write the stub ServiceProvider for the package.
protected void
writeProviderStub(Package $package, string $directory, string $stub)
Write the service provider stub for the package.
protected string
getProviderStub(Package $package, bool $plain)
Get the stub for a ServiceProvider.
protected string
getProviderFile(bool $plain)
Load the raw service provider file.
protected string
createClassDirectory(Package $package, string $directory)
Create the main source directory for the package.
protected string
formatPackageStub(Package $package, string $stub)
Format a generic package stub file.
protected string
createDirectory(Package $package, string $path)
Create a workbench directory for the package.