aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-09-10 12:53:23 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-09-10 12:53:23 +0200
commit0374f02b293801fb495f2732149e2b1cf0f710c4 (patch)
treed477211813b5dabf5ef9aa8400fa955d97f37b1b
parent03003ea54c357cd365f046ed555eff302495fa77 (diff)
downloadDns-0374f02b293801fb495f2732149e2b1cf0f710c4.zip
Dns-0374f02b293801fb495f2732149e2b1cf0f710c4.tar.gz
Dns-0374f02b293801fb495f2732149e2b1cf0f710c4.tar.bz2
mv Dns.php Resolver.php1.14.09.16
-rw-r--r--Documentation/En/Index.xyl6
-rw-r--r--Documentation/Fr/Index.xyl8
-rw-r--r--README.md12
-rw-r--r--Resolver.php (renamed from Dns.php)19
4 files changed, 18 insertions, 27 deletions
diff --git a/Documentation/En/Index.xyl b/Documentation/En/Index.xyl
index d08c52e..0b988f6 100644
--- a/Documentation/En/Index.xyl
+++ b/Documentation/En/Index.xyl
@@ -107,12 +107,12 @@ port 57005</code></pre>
<p>We will <strong>create</strong> a server that listens the
<code>127.0.0.1:57005</code> address in UDP. This server will be given to
- <code>Hoa\Dns\Dns</code>, and all will be written in the
+ <code>Hoa\Dns\Resolver</code>, and all will be written in the
<code>Resolver.php</code> file:</p>
- <pre><code class="language-php">$dns = new Hoa\Dns\Dns(
+ <pre><code class="language-php">$dns = new Hoa\Dns\Resolver(
new Hoa\Socket\Server('udp://127.0.0.1:57005')
);</code></pre>
- <p><code>Hoa\Dns\Dns</code> fires only one event: <code>query</code>, and
+ <p><code>Hoa\Dns\Resolver</code> fires only one event: <code>query</code>, and
sends an array containing <code>domain</code> (for example
<code>foo.bar.baz.tld</code>), <code>type</code> (for example
<code>aaaa</code>) and <code>class</code> (for example <code>in</code>). We
diff --git a/Documentation/Fr/Index.xyl b/Documentation/Fr/Index.xyl
index f1da098..d9c42ef 100644
--- a/Documentation/Fr/Index.xyl
+++ b/Documentation/Fr/Index.xyl
@@ -125,13 +125,13 @@ port 57005</code></pre>
<p>Nous allons <strong>créer</strong> un serveur qui écoute l'adresse
<code>127.0.0.1:57005</code> et en UDP. Ce serveur sera donné à
- <code>Hoa\Dns\Dns</code>, et le tout sera dans le fichier
+ <code>Hoa\Dns\Resolver</code>, et le tout sera dans le fichier
<code>Resolver.php</code> :</p>
- <pre><code class="language-php">$dns = new Hoa\Dns\Dns(
+ <pre><code class="language-php">$dns = new Hoa\Dns\Resolver(
new Hoa\Socket\Server('udp://127.0.0.1:57005')
);</code></pre>
- <p><code>Hoa\Dns\Dns</code> émet un seul évènement : <code>query</code>, et
- envoie en donnée un tableau contenant <code>domain</code> (par exemple
+ <p><code>Hoa\Dns\Resolver</code> émet un seul évènement : <code>query</code>,
+ et envoie en donnée un tableau contenant <code>domain</code> (par exemple
<code>foo.bar.baz.tld</code>), <code>type</code> (par exemple
<code>aaaa</code>) et <code>class</code> (par exemple <code>in</code>). Nous
allons <strong>associer</strong> à tous les domaines <code>*.hoa</code>
diff --git a/README.md b/README.md
index b498135..91c058d 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ Moreover, Hoa aims at being a bridge between industrial and research worlds.
# Hoa\Dns ![state](http://central.hoa-project.net/State/Dns)
-This library allows to resolve domain name according to their types.
+This library allows to create a domain name resolver.
## Quick usage
@@ -46,7 +46,7 @@ Well, now, we will create our resolution server that will listen
file:
```php
-$dns = new Hoa\Dns\Dns(
+$dns = new Hoa\Dns\Resolver(
new Hoa\Socket\Server('udp://127.0.0.1:57005')
);
$dns->on('query', function ( Hoa\Core\Event\Bucket $bucket ) {
@@ -71,17 +71,17 @@ index responds `yeah \o/`, then we start our resolver:
$ php Resolver.php
```
-And we make a HTTP request on `foo.hoa` (that will be resolve to `127.0.0.1`):
+And we make an HTTP request on `foo.hoa` (that will be resolve to `127.0.0.1`):
```sh
$ curl foo.hoa --verbose
-* About to connect() to foo.hoa port 8888 (#0)
+* About to connect() to foo.hoa port 80 (#0)
* Trying 127.0.0.1... connected
-* Connected to foo.hoa (127.0.0.1) port 8888 (#0)
+* Connected to foo.hoa (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/a.b.c (…) libcurl/d.e.f
> OpenSSL/g.h.i zlib/j.k.l
-> Host: foo.hoa:8888
+> Host: foo.hoa:80
> Accept: */*
>
< HTTP/1.1 200 OK
diff --git a/Dns.php b/Resolver.php
index bd5bc1f..57b33b7 100644
--- a/Dns.php
+++ b/Resolver.php
@@ -48,9 +48,9 @@ from('Hoa')
namespace Hoa\Dns {
/**
- * Class \Hoa\Dns.
+ * Class \Hoa\Dns\Resolver.
*
- * Provide a tiny and very simple DNS server.
+ * Provide a DNS resolution server.
* Please, see RFC6195, RFC1035 and RFC1034 for an overview.
*
* @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
@@ -58,7 +58,7 @@ namespace Hoa\Dns {
* @license New BSD License
*/
-class Dns implements \Hoa\Core\Event\Listenable {
+class Resolver implements \Hoa\Core\Event\Listenable {
/**
* Listeners.
@@ -151,7 +151,7 @@ class Dns implements \Hoa\Core\Event\Listenable {
/**
* Class values for resources and queries.
*
- * @var \Hoa\Dns array
+ * @var \Hoa\Dns\Resolver array
*/
protected static $_classes = array(
'in' => 1, // Internet.
@@ -192,7 +192,7 @@ class Dns implements \Hoa\Core\Event\Listenable {
* @access public
* @param string $listenerId Listener ID.
* @param mixed $callable Callable.
- * @return \Hoa\Dns
+ * @return \Hoa\Dns\Resolver
* @throw \Hoa\Core\Exception
*/
public function on ( $listenerId, $callable ) {
@@ -347,12 +347,3 @@ class Dns implements \Hoa\Core\Event\Listenable {
}
}
-
-namespace {
-
-/**
- * Flex entity.
- */
-Hoa\Core\Consistency::flexEntity('Hoa\Dns\Dns');
-
-}