forked from HvyIndustries/crane-php-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readline.php
142 lines (127 loc) · 4.62 KB
/
readline.php
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
// Start of readline v.7.0.4-7ubuntu2
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Reads a line
* @link http://php.net/manual/en/function.readline.php
* @param string $prompt [optional] <p>
* You may specify a string with which to prompt the user.
* </p>
* @return string a single string from the user. The line returned has the ending
* newline removed.
*/
function readline(string $prompt = null): string {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Gets/sets various internal readline variables
* @link http://php.net/manual/en/function.readline-info.php
* @param string $varname [optional] <p>
* A variable name.
* </p>
* @param string $newvalue [optional] <p>
* If provided, this will be the new value of the setting.
* </p>
* @return mixed If called with no parameters, this function returns an array of
* values for all the setting readline uses. The elements will
* be indexed by the following values: done, end, erase_empty_line,
* library_version, line_buffer, mark, pending_input, point, prompt,
* readline_name, and terminal_name.
* </p>
* <p>
* If called with one or two parameters, the old value is returned.
*/
function readline_info(string $varname = null, string $newvalue = null) {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Adds a line to the history
* @link http://php.net/manual/en/function.readline-add-history.php
* @param string $line <p>
* The line to be added in the history.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function readline_add_history(string $line): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Clears the history
* @link http://php.net/manual/en/function.readline-clear-history.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function readline_clear_history(): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Reads the history
* @link http://php.net/manual/en/function.readline-read-history.php
* @param string $filename [optional] <p>
* Path to the filename containing the command history.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function readline_read_history(string $filename = null): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Writes the history
* @link http://php.net/manual/en/function.readline-write-history.php
* @param string $filename [optional] <p>
* Path to the saved file.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function readline_write_history(string $filename = null): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Registers a completion function
* @link http://php.net/manual/en/function.readline-completion-function.php
* @param callable $function <p>
* You must supply the name of an existing function which accepts a
* partial command line and returns an array of possible matches.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function readline_completion_function(callable $function): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Initializes the readline callback interface and terminal, prints the prompt and returns immediately
* @link http://php.net/manual/en/function.readline-callback-handler-install.php
* @param string $prompt <p>
* The prompt message.
* </p>
* @param callable $callback <p>
* The <i>callback</i> function takes one parameter; the
* user input returned.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function readline_callback_handler_install(string $prompt, callable $callback): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Reads a character and informs the readline callback interface when a line is received
* @link http://php.net/manual/en/function.readline-callback-read-char.php
* @return void No value is returned.
*/
function readline_callback_read_char() {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Removes a previously installed callback handler and restores terminal settings
* @link http://php.net/manual/en/function.readline-callback-handler-remove.php
* @return bool <b>TRUE</b> if a previously installed callback handler was removed, or
* <b>FALSE</b> if one could not be found.
*/
function readline_callback_handler_remove(): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Redraws the display
* @link http://php.net/manual/en/function.readline-redisplay.php
* @return void No value is returned.
*/
function readline_redisplay() {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Inform readline that the cursor has moved to a new line
* @link http://php.net/manual/en/function.readline-on-new-line.php
* @return void No value is returned.
*/
function readline_on_new_line() {}
define ('READLINE_LIB', "libedit");
// End of readline v.7.0.4-7ubuntu2
?>