"Fossies" - the Fresh Open Source Software Archive

Member "phpMyAdmin-5.1.0-all-languages/libraries/classes/Providers/ServerVariables/MariaDbMySqlKbsProvider.php" (24 Feb 2021, 1000 Bytes) of package /linux/www/phpMyAdmin-5.1.0-all-languages.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 <?php
    2 
    3 declare(strict_types=1);
    4 
    5 namespace PhpMyAdmin\Providers\ServerVariables;
    6 
    7 use Williamdes\MariaDBMySQLKBS\KBException;
    8 use Williamdes\MariaDBMySQLKBS\Search as KBSearch;
    9 
   10 class MariaDbMySqlKbsProvider implements ServerVariablesProviderInterface
   11 {
   12     public function getVariableType(string $name): ?string
   13     {
   14         try {
   15             return KBSearch::getVariableType($name);
   16         } catch (KBException $e) {
   17             return null;
   18         }
   19     }
   20 
   21     public function getStaticVariables(): array
   22     {
   23         return [];
   24     }
   25 
   26     public function getDocLinkByNameMariaDb(string $name): ?string
   27     {
   28         try {
   29             return KBSearch::getByName($name, KBSearch::MARIADB);
   30         } catch (KBException $e) {
   31             return null;
   32         }
   33     }
   34 
   35     public function getDocLinkByNameMysql(string $name): ?string
   36     {
   37         try {
   38             return KBSearch::getByName($name, KBSearch::MYSQL);
   39         } catch (KBException $e) {
   40             return null;
   41         }
   42     }
   43 }