Package file for entry point

This commit is contained in:
Mike Jolley 2019-06-21 19:58:20 +01:00
parent 2943708bb1
commit a518b9cfd1
1 changed files with 48 additions and 0 deletions

48
src/Package.php Normal file
View File

@ -0,0 +1,48 @@
<?php
/**
* Returns information about the package and handles init.
*
* @package Automattic/WooCommerce/RestApi
*/
namespace Automattic\WooCommerce\RestApi;
defined( 'ABSPATH' ) || exit;
/**
* Main package class.
*/
class Package {
/**
* Version.
*
* @var string
*/
const VERSION = '1.0.0';
/**
* Init the package - load the REST API Server class.
*/
public static function init() {
\Automattic\WooCommerce\RestApi\Server::instance()->init();
}
/**
* Return the version of the package.
*
* @return string
*/
public static function get_version() {
return self::VERSION;
}
/**
* Return the path to the package.
*
* @return string
*/
public static function get_path() {
return dirname( __DIR__ );
}
}