-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathOutputInterface.php
More file actions
53 lines (48 loc) · 1.12 KB
/
Copy pathOutputInterface.php
File metadata and controls
53 lines (48 loc) · 1.12 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
49
50
51
52
53
<?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 OutputInterface
*
* @package Inhere\Console\Contract
*/
interface OutputInterface
{
/**
* Write a message to output
*
* @param string $content
*
* @return int
*/
public function write(string $content): int;
/**
* Write a message to output with newline
*
* @param string|int|array|mixed $content
* @param bool $quit
* @param array $opts
*
* @return int
*/
public function writeln(mixed $content, bool $quit = false, array $opts = []): int;
/**
* Write a message to output with format.
*
* @param string $format
* @param mixed ...$args
*
* @return int
*/
public function writef(string $format, ...$args): int;
/**
* Whether the stream is an interactive terminal
*/
public function isInteractive(): bool;
}