From 04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 9 Jan 2020 10:55:03 +0100 Subject: phpmyadmin working --- .../mariadb-mysql-kbs/test/RefProvider.php | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/test/RefProvider.php (limited to 'srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/test/RefProvider.php') diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/test/RefProvider.php b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/test/RefProvider.php new file mode 100644 index 0000000..50b25cc --- /dev/null +++ b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/test/RefProvider.php @@ -0,0 +1,50 @@ +{'$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))); + } + } + +} -- cgit