From 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 27 Jul 2020 10:05:23 +0200 Subject: Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my familly --- .../williamdes/mariadb-mysql-kbs/src/Search.php | 167 --------------------- 1 file changed, 167 deletions(-) delete mode 100644 srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/src/Search.php (limited to 'srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/src/Search.php') diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/src/Search.php b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/src/Search.php deleted file mode 100644 index 12f8ded..0000000 --- a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/src/Search.php +++ /dev/null @@ -1,167 +0,0 @@ -a)) { - foreach ($kbEntrys->a as $kbEntry) { - if ($type === Search::ANY) { - return Search::$data->urls[$kbEntry->u]."#".$kbEntry->a; - } elseif ($type === Search::MYSQL) { - if ($kbEntry->t === Search::MYSQL) { - return Search::$data->urls[$kbEntry->u]."#".$kbEntry->a; - } - } elseif ($type === Search::MARIADB) { - if ($kbEntry->t === Search::MARIADB) { - return Search::$data->urls[$kbEntry->u]."#".$kbEntry->a; - } - } - } - } - - throw new KBException("$name does not exist for this type of documentation !"); - } - - /** - * Get a variable - * - * @param string $name Name of variable - * @return stdClass - * @throws KBException - */ - public static function getVariable(string $name): stdClass - { - self::loadData(); - if (isset(Search::$data->vars->{$name})) { - return Search::$data->vars->{$name}; - } else { - throw new KBException("$name does not exist !"); - } - } - - /** - * get the type of the variable - * - * @param string $name Name of variable - * @return string - * @throws KBException - */ - public static function getVariableType(string $name): string - { - self::loadData(); - $kbEntry = self::getVariable($name); - if (isset($kbEntry->t)) { - return Search::$data->varTypes->{$kbEntry->t}; - } else { - throw new KBException("$name does have a known type !"); - } - } - - /** - * Return the list of static variables - * - * @return array - */ - public static function getStaticVariables(): array - { - return self::getVariablesWithDynamic(false); - } - - /** - * Return the list of dynamic variables - * - * @return array - */ - public static function getDynamicVariables(): array - { - return self::getVariablesWithDynamic(true); - } - - /** - * Return the list of variables having dynamic = $dynamic - * - * @param bool $dynamic dynamic=true/dynamic=false - * @return array - */ - public static function getVariablesWithDynamic(bool $dynamic): array - { - self::loadData(); - $staticVars = array(); - foreach (Search::$data->vars as $name => $var) { - if (isset($var->d)) { - if ($var->d === $dynamic) { - $staticVars[] = $name; - } - } - } - return $staticVars; - } - -} -- cgit