umpirsky/wisdom
Composer 安装命令:
composer require umpirsky/wisdom
包简介
Domain availability checker.
README 文档
README
symfony upgrade fixer • twig gettext extractor • wisdom • centipede • permissions handler • extraload • gravatar • locurro • country list • transliterator
Wisdom 
Domain availability checker based on React/Whois.
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.
Adding support for a TLD
This example uses the ch domain, replace .ch with your own one.
- 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.
-
Identify a string in the
umpirsky-wisdomvariant that identifies the domain as available. -
Create the
Wisdom\Whois\Parser\Tld\Chclass and implement theisAvailablemethod. -
Run the tests to make sure they pass.
-
Create a pull request on GitHub.
Tests
To run the test suite, you need PHPUnit.
$ phpunit
统计信息
- 总下载量: 215
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 119
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-09-12