|
Server : LiteSpeed System : Linux server900.shared.spaceship.host 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64 User : kvzyqrttyz ( 5084) PHP Version : 8.1.34 Disable Function : NONE Directory : /home/kvzyqrttyz/monologtogel.com/wp-content/plugins/amp/src/ | |
|
Path: /home/kvzyqrttyz/monologtogel.com/wp-content/plugins/amp/src/AmpWpPluginFactory.php
Size: 918 B
Permissions: 0644
<?php
/**
* Final class AmpWpPluginFactory.
*
* @package AmpProject\AmpWP
*/
namespace AmpProject\AmpWP;
use AmpProject\AmpWP\Infrastructure\Plugin;
/**
* The plugin factory is responsible for instantiating the plugin and returning
* that instance.
*
* It can decide whether to return a shared or a fresh instance as needed.
*
* To read more about why this is preferable to a Singleton,
*
* @see https://www.alainschlesser.com/singletons-shared-instances/
* @since 2.0
* @internal
*/
final class AmpWpPluginFactory {
/**
* Create and return an instance of the plugin.
*
* This always returns a shared instance. This way, outside code can always
* get access to the object instance of the plugin.
*
* @return Plugin Plugin instance.
*/
public static function create() {
static $plugin = null;
if ( null === $plugin ) {
$plugin = new AmpWpPlugin();
}
return $plugin;
}
}