-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Command now implements an ICommand interface.
- Loading branch information
Cully Larson
committed
Sep 8, 2015
1 parent
ecd14d4
commit 1beef5b
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
namespace Cully; | ||
|
||
interface ICommand { | ||
/** | ||
* @return bool | ||
*/ | ||
public function hasRun(); | ||
/** | ||
* Whether the last command succeeded. Will return FALSE if no | ||
* command has been executed (we haven't succeeded because we | ||
* haven't tried). | ||
* | ||
* A successful command is one that has an exit code of 0. | ||
* | ||
* @return bool | ||
*/ | ||
public function success(); | ||
/** | ||
* Whether the last command failed. This will return FALSE if no | ||
* command has been executed (we haven't failed because we haven't | ||
* tried). | ||
* | ||
* @return bool | ||
*/ | ||
public function failure(); | ||
/** | ||
* The last command executed. | ||
* | ||
* @return string | ||
*/ | ||
public function getCommand(); | ||
/** | ||
* Will be null if a command hasn't been executed, or if the | ||
* last executed command didn't return an exit code. | ||
* | ||
* @return int|null | ||
*/ | ||
public function getExitStatus(); | ||
/** | ||
* Standard output from command. | ||
* | ||
* @return string | ||
*/ | ||
public function getOutput(); | ||
/** | ||
* Standard error from the command. | ||
* | ||
* @return string | ||
*/ | ||
public function getError(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters