$class ) { $instance = new $class(); $instance->register_routes(); } } /** * Return a list of controller classes for this REST API namespace. * * @return array */ protected static function get_controllers() { return [ 'product-attributes' => __NAMESPACE__ . '\RestApi\Controllers\ProductAttributes', 'product-attribute-terms' => __NAMESPACE__ . '\RestApi\Controllers\ProductAttributeTerms', 'product-categories' => __NAMESPACE__ . '\RestApi\Controllers\ProductCategories', 'product-tags' => __NAMESPACE__ . '\RestApi\Controllers\ProductTags', 'products' => __NAMESPACE__ . '\RestApi\Controllers\Products', 'variations' => __NAMESPACE__ . '\RestApi\Controllers\Variations', ]; } }