File tree Expand file tree Collapse file tree 4 files changed +81
-1
lines changed Expand file tree Collapse file tree 4 files changed +81
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+
4+ namespace Toolkit \Extlib \Contract ;
5+
6+ /**
7+ * Interface IOInterface
8+ * @package Toolkit\Extlib\Contract
9+ */
10+ interface IOInterface extends InputInterface, OutputInterface
11+ {
12+
13+ }
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+ namespace Toolkit \Extlib \Contract ;
4+
5+ /**
6+ * Interface InputInterface
7+ * @package Toolkit\Extlib\Contract
8+ */
9+ interface InputInterface
10+ {
11+ /**
12+ * @param int $length
13+ *
14+ * @return string
15+ */
16+ public function read (int $ length ): string ;
17+
18+ /**
19+ * @return string
20+ */
21+ public function readln (): string ;
22+
23+ /**
24+ * @return string
25+ */
26+ public function readAll (): string ;
27+
28+ /**
29+ * Whether the stream is an interactive terminal
30+ */
31+ public function isInteractive () : bool ;
32+ }
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+
4+ namespace Toolkit \Extlib \Contract ;
5+
6+ /**
7+ * Class OutputInterface
8+ *
9+ * @package Toolkit\Extlib\Contract
10+ */
11+ interface OutputInterface
12+ {
13+ /**
14+ * Write a message to output
15+ *
16+ * @param string $content
17+ *
18+ * @return int
19+ */
20+ public function write (string $ content ): int ;
21+
22+ /**
23+ * Write a message to output with newline
24+ *
25+ * @param string $content
26+ *
27+ * @return int
28+ */
29+ public function writeln (string $ content ): int ;
30+
31+ /**
32+ * Whether the stream is an interactive terminal
33+ */
34+ public function isInteractive () : bool ;
35+ }
Original file line number Diff line number Diff line change 1010class StreamIO
1111{
1212
13- }
13+ }
You can’t perform that action at this time.
0 commit comments