Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 200
Zeile 1... Zeile 1...
1
<?php
1
<?php
Zeile 2... Zeile 2...
2
 
2
 
3
/*
3
/*
4
 * This file is part of Psy Shell.
4
 * This file is part of Psy Shell.
5
 *
5
 *
6
 * (c) 2012-2022 Justin Hileman
6
 * (c) 2012-2023 Justin Hileman
7
 *
7
 *
8
 * For the full copyright and license information, please view the LICENSE
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
9
 * file that was distributed with this source code.
Zeile 32... Zeile 32...
32
     * decided it would be awesome to swap out GNU Readline for Libedit, but
32
     * decided it would be awesome to swap out GNU Readline for Libedit, but
33
     * they ended up shipping an incomplete implementation. So we've got this.
33
     * they ended up shipping an incomplete implementation. So we've got this.
34
     *
34
     *
35
     * NOTE: As of PHP 7.4, PHP sometimes has history support in the Libedit
35
     * NOTE: As of PHP 7.4, PHP sometimes has history support in the Libedit
36
     * wrapper, so that will use the GNUReadline implementation as well!
36
     * wrapper, so that will use the GNUReadline implementation as well!
37
     *
-
 
38
     * @return bool
-
 
39
     */
37
     */
40
    public static function isSupported(): bool
38
    public static function isSupported(): bool
41
    {
39
    {
42
        return \function_exists('readline') && \function_exists('readline_list_history');
40
        return \function_exists('readline') && \function_exists('readline_list_history');
43
    }
41
    }
Zeile 44... Zeile 42...
44
 
42
 
45
    /**
43
    /**
46
     * Check whether this readline implementation supports bracketed paste.
44
     * Check whether this readline implementation supports bracketed paste.
47
     *
45
     *
48
     * Currently, the GNU readline implementation does, but the libedit wrapper does not.
-
 
49
     *
-
 
50
     * @return bool
46
     * Currently, the GNU readline implementation does, but the libedit wrapper does not.
51
     */
47
     */
52
    public static function supportsBracketedPaste(): bool
48
    public static function supportsBracketedPaste(): bool
53
    {
49
    {
54
        return self::isSupported() && \stripos(\readline_info('library_version') ?: '', 'editline') === false;
50
        return self::isSupported() && \stripos(\readline_info('library_version') ?: '', 'editline') === false;