forked from symfony/maker-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakerInterface.php
53 lines (45 loc) · 1.56 KB
/
MakerInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/*
* This file is part of the Symfony MakerBundle package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\MakerBundle;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
/**
* Interface that all maker commands must implement.
*
* @method static string getCommandDescription()
*
* @author Ryan Weaver <[email protected]>
*/
interface MakerInterface
{
/**
* Return the command name for your maker (e.g. make:report).
*/
public static function getCommandName(): string;
/**
* Configure the command: set description, input arguments, options, etc.
*
* By default, all arguments will be asked interactively. If you want
* to avoid that, use the $inputConfig->setArgumentAsNonInteractive() method.
*/
public function configureCommand(Command $command, InputConfiguration $inputConfig);
/**
* Configure any library dependencies that your maker requires.
*/
public function configureDependencies(DependencyBuilder $dependencies);
/**
* If necessary, you can use this method to interactively ask the user for input.
*/
public function interact(InputInterface $input, ConsoleStyle $io, Command $command);
/**
* Called after normal code generation: allows you to do anything.
*/
public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator);
}