From e06e5813f8df67edce9fd0caf477716c5dc2edd2 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 16 Dec 2023 13:05:40 +0200 Subject: [PATCH] update depencency name --- README.md | 8 ++++---- composer.json | 6 +++--- composer.lock | 20 ++++++++++---------- src/public/dig.php | 8 ++++---- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 7ce78d6..82c7f88 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# dns-api +# net-api -Simple DNS API +Simple Network Tools API ## Install ``` -git clone https://github.com/YGGverse/dns-api.git -cd dns-api +git clone https://github.com/YGGverse/net-api.git +cd net-api composer install ``` diff --git a/composer.json b/composer.json index d1fa667..b3cc9ec 100644 --- a/composer.json +++ b/composer.json @@ -1,13 +1,13 @@ { - "name": "yggverse/dns-api", + "name": "yggverse/net-api", "type": "project", "license": "MIT", "autoload": { "psr-4": { - "Yggverse\\DnsApi\\": "src/" + "Yggverse\\NetApi\\": "src/" } }, "require": { - "yggverse/dns": "^1.0" + "yggverse/net": "^1.0" } } diff --git a/composer.lock b/composer.lock index 269f886..e7bb34d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,26 +4,26 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4fd3c797b2c98cf2e93558b64c5da47b", + "content-hash": "0bf82e6e2a05c49f8a6c7e89da62a373", "packages": [ { - "name": "yggverse/dns", + "name": "yggverse/net", "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/YGGverse/dns-php.git", - "reference": "e54a40bb673e3c4cb87d8d7275adc7121042281e" + "url": "https://github.com/YGGverse/net-php.git", + "reference": "3a89da61d56fba97e5f48c2d840dd9f70b4fd295" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/YGGverse/dns-php/zipball/e54a40bb673e3c4cb87d8d7275adc7121042281e", - "reference": "e54a40bb673e3c4cb87d8d7275adc7121042281e", + "url": "https://api.github.com/repos/YGGverse/net-php/zipball/3a89da61d56fba97e5f48c2d840dd9f70b4fd295", + "reference": "3a89da61d56fba97e5f48c2d840dd9f70b4fd295", "shasum": "" }, "type": "library", "autoload": { "psr-4": { - "Yggverse\\Dns\\": "src/" + "Yggverse\\Net\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -31,10 +31,10 @@ "MIT" ], "support": { - "issues": "https://github.com/YGGverse/dns-php/issues", - "source": "https://github.com/YGGverse/dns-php/tree/1.0.0" + "issues": "https://github.com/YGGverse/net-php/issues", + "source": "https://github.com/YGGverse/net-php/tree/1.0.0" }, - "time": "2023-12-15T16:19:42+00:00" + "time": "2023-12-16T10:55:48+00:00" } ], "packages-dev": [], diff --git a/src/public/dig.php b/src/public/dig.php index abf6b46..1d271d3 100644 --- a/src/public/dig.php +++ b/src/public/dig.php @@ -8,7 +8,7 @@ header('Content-Type: application/json; charset=utf-8'); require_once(__DIR__ . '/../../vendor/autoload.php'); // Valid name required to continue -if (empty($_GET['name']) || !is_string($_GET['name']) || !\Yggverse\Dns\Dig::isHostName($_GET['name'])) +if (empty($_GET['name']) || !is_string($_GET['name']) || !\Yggverse\Net\Dig::isHostName($_GET['name'])) { exit( json_encode( @@ -23,7 +23,7 @@ if (empty($_GET['name']) || !is_string($_GET['name']) || !\Yggverse\Dns\Dig::isH // Valid records required to continue $records = []; -if (isset($_GET['record']) && is_string($_GET['record']) && \Yggverse\Dns\Dig::isRecord($_GET['record'])) +if (isset($_GET['record']) && is_string($_GET['record']) && \Yggverse\Net\Dig::isRecord($_GET['record'])) { $records[] = $_GET['record']; } @@ -32,7 +32,7 @@ if (isset($_GET['records']) && is_array($_GET['records'])) { foreach ($_GET['records'] as $record) { - if (is_string($record) && \Yggverse\Dns\Dig::isRecord($record)) + if (is_string($record) && \Yggverse\Net\Dig::isRecord($record)) { $records[] = $record; } @@ -61,7 +61,7 @@ if (empty($records)) } // Resolve begin -if (!$result = \Yggverse\Dns\Dig::records($_GET['name'], array_unique($records))) +if (!$result = \Yggverse\Net\Dig::records($_GET['name'], array_unique($records))) { exit( json_encode(