ZF2 Module wrapper around Jeremy Kendall's PHP Domain Parser Utility
Install with composer
"netglue/zf2-domain-parser" : "1.0.*" and add to your modules with the name
There's only one config option which is the directory location of the downloaded and prepared public suffix list files.
return array( netglueDomainParser' => array( 'publicSuffixListDirectory' => 'path/to/where/you/want/them/kept', ), );
'Pdp\PublicSuffixListManager'- Access the list manager that's been configured with your specific cache directory.
'Pdp\Parser'- Access the parser instance that's been initialized with the list retrieved from the list manager
There's an initializer setup in main service config
'NetglueDomainParser\Factory\ParserInitializer' that will provide the parser instance to anything that implements the interface
There's one action available that will download and process the latest list and could easily be triggered by cron once a week/month or something.
$ php public/index.php updatePublicSuffixList
Refer to jeremykendall/php-domain-parser for instructions on how to use the parser once you've got an instance of it.
Contributions, issues, pull-requests are welcome.
There are currently no tests. I saw little point in this as this module is just a collection of factories really, but perhaps some tests would be helpful...