
| Current Path : /var/www/html/strat/vendor/psy/psysh/src/Readline/Interactive/Suggestion/Source/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/strat/vendor/psy/psysh/src/Readline/Interactive/Suggestion/Source/SourceInterface.php |
<?php
/*
* This file is part of Psy Shell.
*
* (c) 2012-2026 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Psy\Readline\Interactive\Suggestion\Source;
use Psy\Readline\Interactive\Suggestion\SuggestionResult;
/**
* Interface for suggestion sources.
*
* Sources provide suggestions based on different strategies (history, completion, etc.).
*/
interface SourceInterface
{
/**
* Get suggestion for the given buffer.
*
* The engine calls sources only for non-empty buffers; callers invoking
* sources directly should apply the same precondition.
*/
public function getSuggestion(string $buffer, int $cursorPosition): ?SuggestionResult;
/**
* Get priority of this source (higher = checked first).
*/
public function getPriority(): int;
}