ameliabooking
/
vendor
/
league
/
tactician
/
src
/
Handler
/
CommandNameExtractor
/
CommandNameExtractor.php
CommandNameExtractor.php
24 lines
| 1 | <?php |
| 2 | |
| 3 | namespace League\Tactician\Handler\CommandNameExtractor; |
| 4 | |
| 5 | use League\Tactician\Exception\CanNotDetermineCommandNameException; |
| 6 | |
| 7 | /** |
| 8 | * Extract the name from a command so that the name can be determined |
| 9 | * by the context better than simply the class name |
| 10 | */ |
| 11 | interface CommandNameExtractor |
| 12 | { |
| 13 | /** |
| 14 | * Extract the name from a command |
| 15 | * |
| 16 | * @param object $command |
| 17 | * |
| 18 | * @return string |
| 19 | * |
| 20 | * @throws CannotDetermineCommandNameException |
| 21 | */ |
| 22 | public function extract($command); |
| 23 | } |
| 24 |