symfony upgrade fixer ā¢
twig gettext extractor ā¢
wisdom ā¢
centipede ā¢
permissions handler ā¢
extraload ā¢
gravatar ā¢
locurro ā¢
country list ā¢
transliterator
, (*1)
Wisdom
, (*2)
Domain availability checker based on React/Whois., (*3)
Example
<?php
$domain = 'umpirsky.com';
$wisdom = new Wisdom($client);
$wisdom
->check($domain)
->then(function ($available) use ($domain) {
printf('Domain %s is %s.', $domain, $available ? 'available' : 'taken');
});
// Outputs:
// Domain umpirsky.com is taken.
See more examples., (*4)
Adding support for a TLD
This example uses the ch
domain, replace .ch
with your own one., (*5)
- First, create the test cases:
$ whois umpirsky-wisdom.ch > tests/Wisdom/Fixtures/whois/umpirsky-wisdom.ch
$ whois google.ch > tests/Wisdom/Fixtures/whois/google.ch
-
Run the tests to make sure they fail., (*6)
-
Identify a string in the umpirsky-wisdom
variant that identifies the
domain as available., (*7)
-
Create the Wisdom\Whois\Parser\Tld\Ch
class and implement the isAvailable
method., (*8)
-
Run the tests to make sure they pass., (*9)
-
Create a pull request on GitHub., (*10)
Tests
To run the test suite, you need PHPUnit., (*11)
$ phpunit