24b22da0d4631ce9fcc739db82538c6ecaaf3f36
3 namespace pharext\Task
;
9 * Ask password on console
11 class Askpass
implements Task
19 * @param string $prompt
21 public function __construct($prompt = "Password:") {
22 $this->prompt
= $prompt;
26 * @param bool $verbose
29 public function run($verbose = false) {
31 printf("%s ", $this->prompt
);
32 $pass = fgets(STDIN
, 1024);
35 if (substr($pass, -1) == "\n") {
36 $pass = substr($pass, 0, -1);