PHP code example of w2w / apie-domain-plugin

1. Go to this page and download the library: Download w2w/apie-domain-plugin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

w2w / apie-domain-plugin example snippets



use W2w\Lib\Apie\Apie;
use W2w\Lib\ApieDomainPlugin\DomainPlugin;

$apie = new Apie([new DomainPlugin()], true, null);


use Pdp\Cache;
use Pdp\Manager;
use Pdp\Rules;
use W2w\Lib\Apie\Apie;
use W2w\Lib\ApieDomainPlugin\DomainPlugin;
use W2w\Lib\ApieDomainPlugin\HttpClient\MockHttpClient;

$manager = new Manager(
    new Cache(sys_get_temp_dir()),
    new MockHttpClient()
);
$rules = $manager->getRules(Rules::ICANN_DOMAINS);

$apie = new Apie([new DomainPlugin($rules)], true, null);


// config/apie.php
use W2w\Lib\ApieDomainPlugin\DomainPlugin;

return [
    'plugins' => [DomainPlugin::class],
];