-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathInputInterface.php
More file actions
48 lines (42 loc) · 1.02 KB
/
Copy pathInputInterface.php
File metadata and controls
48 lines (42 loc) · 1.02 KB
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
<?php declare(strict_types=1);
/**
* The file is part of inhere/console
*
* @author https://github.com/inhere
* @homepage https://github.com/inhere/php-console
* @license https://github.com/inhere/php-console/blob/master/LICENSE
*/
namespace Inhere\Console\Contract;
/**
* Class Input
*
* @package Inhere\Console\Contract
*/
interface InputInterface
{
/**
* 读取输入信息
*
* @param string $question 若不为空,则先输出文本消息
* @param bool $nl true 会添加换行符 false 原样输出,不添加换行符
*
* @return string
*/
public function readln(string $question = '', bool $nl = false): string;
/**
* @return string
*/
public function getScriptFile(): string;
/**
* @return string
*/
public function getCommand(): string;
/**
* Whether the stream is an interactive terminal
*/
public function isInteractive(): bool;
/**
* @return string
*/
public function toString(): string;
}