芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/store.kwesioben.com/vendor/psy/psysh/src/Readline/Hoa/AutocompleterAggregate.php
setAutocompleters($autocompleters); return; } /** * Complete a word. * Returns null for no word, a full-word or an array of full-words. */ public function complete(&$prefix) { foreach ($this->getAutocompleters() as $autocompleter) { $preg = \preg_match( '#('.$autocompleter->getWordDefinition().')$#u', $prefix, $match ); if (0 === $preg) { continue; } $_prefix = $match[0]; if (null === $out = $autocompleter->complete($_prefix)) { continue; } $prefix = $_prefix; return $out; } return null; } /** * Set/initialize list of autocompleters. */ protected function setAutocompleters(array $autocompleters) { $old = $this->_autocompleters; $this->_autocompleters = new \ArrayObject($autocompleters); return $old; } /** * Get list of autocompleters. */ public function getAutocompleters() { return $this->_autocompleters; } /** * Get definition of a word. */ public function getWordDefinition(): string { return '.*'; } }