aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/test/RefProvider.php
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-07-27 10:05:23 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-07-27 10:05:23 +0200
commit5bf66662a9bdd62c5bccab15e607cd95cfb8fcab (patch)
tree39a1a4629749056191c05dfd899f931701b7acf3 /srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/test/RefProvider.php
parent5afd237bbd22028b85532b8c0b3fcead49a00764 (diff)
downloadft_server-5bf66662a9bdd62c5bccab15e607cd95cfb8fcab.tar.gz
ft_server-5bf66662a9bdd62c5bccab15e607cd95cfb8fcab.tar.bz2
ft_server-5bf66662a9bdd62c5bccab15e607cd95cfb8fcab.zip
Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my famillyHEADmaster
Diffstat (limited to 'srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/test/RefProvider.php')
-rw-r--r--srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/test/RefProvider.php50
1 files changed, 0 insertions, 50 deletions
diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/test/RefProvider.php b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/test/RefProvider.php
deleted file mode 100644
index 50b25cc..0000000
--- a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/test/RefProvider.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-declare(strict_types = 1);
-namespace Williamdes\MariaDBMySQLKBS\Test;
-
-use \Swaggest\JsonSchema\RemoteRefProvider;
-
-class RefProvider implements RemoteRefProvider
-{
-
- /**
- * Preloaded urn schemas
- *
- * @var \stdClass[]
- */
- private $urnSchemas = [];
-
- /**
- * Create a new RefProvider instance
- */
- public function __construct()
- {
- $files = glob(__DIR__ . "/../schemas/*.json");
- if ($files === false) {
- return;
- } else {
- foreach ($files as $filename) {
- $schema = json_decode((string) file_get_contents($filename));
- if (isset($schema) && isset($schema->{'$id'}) && $schema !== null) {
- $this->urnSchemas[$schema->{'$id'}] = $schema;
- }
- }
- }
- }
-
- /**
- * @param string $url The file url
- * @return \stdClass|false json_decode of $url resource content
- */
- public function getSchemaData($url)
- {
- if (isset($this->urnSchemas[$url])) {// Handle urn: urls
- return $this->urnSchemas[$url];
- } elseif (is_file($url)) {// Handle file
- return json_decode((string) file_get_contents($url));
- } else {// Handle URL
- return json_decode((string) file_get_contents(rawurldecode($url)));
- }
- }
-
-}