PHP Class Ptondereau\PackMe\Commands\CreateCommand

Inheritance: extends AbstractBaseCommand
显示文件 Open project: ptondereau/laravel-packme

Protected Properties

Property Type Description
$crafter Ptondereau\PackMe\Crafters\CrafterInterface Crafter.

Public Methods

Method Description
__construct ( Ptondereau\PackMe\Crafters\CrafterInterface $crafter, Symfony\Component\Console\Helper\HelperSet $helperSet ) CreateCommand constructor.
__invoke ( $dir, Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )

Protected Methods

Method Description
askForAuthor ( string $author = 'Author Name <[email protected]>' ) : string
askForDescription ( boolean | string $description = false ) : string
askForPackageName ( string $package = 'vendor/package' ) : string

Private Methods

Method Description
isValidEmail ( $email ) : boolean Check if a given email is a good email.
parseAuthorString ( string $author ) : array Parse the author string.

Method Details

__construct() public method

CreateCommand constructor.
public __construct ( Ptondereau\PackMe\Crafters\CrafterInterface $crafter, Symfony\Component\Console\Helper\HelperSet $helperSet )
$crafter Ptondereau\PackMe\Crafters\CrafterInterface
$helperSet Symfony\Component\Console\Helper\HelperSet

__invoke() public method

public __invoke ( $dir, Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

askForAuthor() protected method

protected askForAuthor ( string $author = 'Author Name <[email protected]>' ) : string
$author string
return string

askForDescription() protected method

protected askForDescription ( boolean | string $description = false ) : string
$description boolean | string
return string

askForPackageName() protected method

protected askForPackageName ( string $package = 'vendor/package' ) : string
$package string
return string

Property Details

$crafter protected_oe property

Crafter.
protected CrafterInterface,Ptondereau\PackMe\Crafters $crafter
return Ptondereau\PackMe\Crafters\CrafterInterface