Server IP : 52.91.253.208 / Your IP : 3.137.210.143 [ Web Server : Apache System : Linux ip-172-26-9-9 4.19.0-25-cloud-amd64 #1 SMP Debian 4.19.289-1 (2023-07-24) x86_64 User : daemon ( 1) PHP Version : 7.3.18 Disable Function : NONE Domains : 3 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/amp/src/ |
Upload File : |
<?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; } }