timgws/domainlist

用于域名列表的简单类

dev-master 2015-06-16 06:31 UTC

This package is auto-updated.

Last update: 2024-09-08 10:59:02 UTC


README

用于管理域名列表的快速类。没有特别之处。

Test Coverage Code Climate

添加域名的示例

    $list = new DomainList('ing');

    $list->add([
        $list->c('the awesome   € shop'),
        $list->c('hex-follows-0xaf--0xfacebeef'),
        $list->c('--lol-0xfacebeef')
    ]);

    $domains = $list->get();

    //---
    $domains = [
        'hex-follows-0xaf-0xfacebeef.ing',
        'hexfollows0xaf0xfacebeef.ing',
        'the-awesome-eur-shop.ing',
        'theawesomeeurshop.ing'
    ];

此类应验证域名是否与RFC 1035中定义的有效域名匹配。