Namespace and structure improvements

This commit is contained in:
Mike Jolley 2019-06-12 13:09:20 +01:00
parent 2eff709060
commit 732eb4b453
166 changed files with 444 additions and 508 deletions

View File

@ -14,6 +14,13 @@
"woocommerce/woocommerce-sniffs": "0.0.6" "woocommerce/woocommerce-sniffs": "0.0.6"
}, },
"autoload": { "autoload": {
"classmap": ["src"] "classmap": [
"src/Controllers/Version1",
"src/Controllers/Version2",
"src/Controllers/Version3"
],
"psr-4": {
"WooCommerce\\RestApi\\": "src/"
}
} }
} }

View File

@ -6,6 +6,6 @@
*/ */
return function() { return function() {
require __DIR__ . '/src/RestApi.php'; require __DIR__ . '/src/Server.php';
\WooCommerce\RestApi::instance()->init(); \WooCommerce\RestApi\Server::instance()->init();
}; };

View File

@ -13,7 +13,7 @@
* @package WooCommerce/RestApi * @package WooCommerce/RestApi
*/ */
namespace WooCommerce\RestApi\Version4\Controllers; namespace WooCommerce\RestApi\Controllers\Version4;
defined( 'ABSPATH' ) || exit; defined( 'ABSPATH' ) || exit;

View File

@ -5,7 +5,7 @@
* @package WooCommerce/RestApi * @package WooCommerce/RestApi
*/ */
namespace WooCommerce\RestApi\Version4\Controllers; namespace WooCommerce\RestApi\Controllers\Version4;
defined( 'ABSPATH' ) || exit; defined( 'ABSPATH' ) || exit;

View File

@ -5,7 +5,7 @@
* @package WooCommerce/RestApi * @package WooCommerce/RestApi
*/ */
namespace WooCommerce\RestApi\Version4\Controllers; namespace WooCommerce\RestApi\Controllers\Version4;
defined( 'ABSPATH' ) || exit; defined( 'ABSPATH' ) || exit;

Some files were not shown because too many files have changed in this diff Show More