PHP Class App\Console\Commands\PluginMake

Inheritance: extends Illuminate\Console\Command
Show file Open project: xpressengine/xpressengine

Protected Properties

Property Type Description
$description string The console command description.
$files Illuminate\Filesystem\Filesystem The filesystem instance.
$name string The console command name.

Public Methods

Method Description
__construct ( Illuminate\Filesystem\Filesystem $files ) : void Create a new controller creator command instance.
fire ( ) : boolean | null Execute the console command.

Protected Methods

Method Description
activatePlugin ( $name )
buildComposerCode ( $pluginName, $namespace, $title ) : string buildComposerCode
buildPluginCode ( $pluginName, $namespace, $title ) : string Build the class with the given name.
checkEnv ( $path, $name, $namespace, $title )
findComposer ( ) : string findComposer
getArguments ( ) : array Get the console command arguments.
getNamespace ( ) : string Get the full namespace name for a given class.
getNamespaceInput ( ) : string Get the desired class namespace from the input.
getPluginName ( ) : string getPluginName
getStub ( $filename ) : string Get the stub file for the generator.
getTitleInput ( ) : string Get the desired class title from the input.
makeComposerJson ( $path, $pluginName, $namespace, $title ) : void makeComposerJson
makeDirectory ( $path ) : void makeDirectory
makeDirectoryStructure ( $path )
makePluginClass ( $path, $name, $namespace, $title ) : void makePluginClass
replaceClass ( string &$stub, string $name ) : static Replace the class name for the given stub.
replaceNamespace ( string &$stub, $namespace ) replaceNamespace
replacePackageName ( string &$stub, $packageName ) replacePackageName
replacePluginName ( string &$stub, string $pluginName ) : static Replace the class name for the given stub.
replacePluginTitle ( string &$stub, $title ) replacePluginTitle
runComposerDump ( $path )

Method Details

__construct() public method

Create a new controller creator command instance.
public __construct ( Illuminate\Filesystem\Filesystem $files ) : void
$files Illuminate\Filesystem\Filesystem
return void

activatePlugin() protected method

protected activatePlugin ( $name )

buildComposerCode() protected method

buildComposerCode
protected buildComposerCode ( $pluginName, $namespace, $title ) : string
$pluginName
$namespace
return string

buildPluginCode() protected method

Build the class with the given name.
protected buildPluginCode ( $pluginName, $namespace, $title ) : string
return string

checkEnv() protected method

protected checkEnv ( $path, $name, $namespace, $title )

findComposer() protected method

findComposer
protected findComposer ( ) : string
return string

fire() public method

Execute the console command.
public fire ( ) : boolean | null
return boolean | null

getArguments() protected method

name, namespace, title
protected getArguments ( ) : array
return array

getNamespace() protected method

Get the full namespace name for a given class.
protected getNamespace ( ) : string
return string

getNamespaceInput() protected method

Get the desired class namespace from the input.
protected getNamespaceInput ( ) : string
return string

getPluginName() protected method

getPluginName
protected getPluginName ( ) : string
return string

getStub() protected method

Get the stub file for the generator.
protected getStub ( $filename ) : string
return string

getTitleInput() protected method

Get the desired class title from the input.
protected getTitleInput ( ) : string
return string

makeComposerJson() protected method

makeComposerJson
protected makeComposerJson ( $path, $pluginName, $namespace, $title ) : void
$path
$pluginName
$namespace
return void

makeDirectory() protected method

makeDirectory
protected makeDirectory ( $path ) : void
$path
return void

makeDirectoryStructure() protected method

protected makeDirectoryStructure ( $path )

makePluginClass() protected method

makePluginClass
protected makePluginClass ( $path, $name, $namespace, $title ) : void
$path
$name
$namespace
return void

replaceClass() protected method

Replace the class name for the given stub.
protected replaceClass ( string &$stub, string $name ) : static
$stub string
$name string
return static

replaceNamespace() protected method

replaceNamespace
protected replaceNamespace ( string &$stub, $namespace )
$stub string

replacePackageName() protected method

replacePackageName
protected replacePackageName ( string &$stub, $packageName )
$stub string

replacePluginName() protected method

Replace the class name for the given stub.
protected replacePluginName ( string &$stub, string $pluginName ) : static
$stub string
$pluginName string
return static

replacePluginTitle() protected method

replacePluginTitle
protected replacePluginTitle ( string &$stub, $title )
$stub string

runComposerDump() protected method

protected runComposerDump ( $path )

Property Details

$description protected property

The console command description.
protected string $description
return string

$files protected property

The filesystem instance.
protected Filesystem,Illuminate\Filesystem $files
return Illuminate\Filesystem\Filesystem

$name protected property

The console command name.
protected string $name
return string