PHP code example of xwp / wp-autoload

1. Go to this page and download the library: Download xwp/wp-autoload 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/ */

    

xwp / wp-autoload example snippets


$autoload = new XWP\IO\WP_Autoload\Autoload();

$autoload->add(
	__DIR__ . '/php',
	'YourVendor\Project'
);

$autoload->add(
	__DIR__ . '/lib/rest-api',
	'Another_Vendor\Rest_Api'
);

// Now instantiate the class without any