REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 863 B
Close
/home/nshryvcy/himaltourism.com/wp-content/plugins/woocommerce/includes/rest-api/Utilities/SingletonTrait.php
Text
Base64
<?php /** * Singleton class trait. * * @package WooCommerce\Utilities */ namespace Automattic\WooCommerce\RestApi\Utilities; /** * Singleton trait. */ trait SingletonTrait { /** * The single instance of the class. * * @var object */ protected static $instance = null; /** * Constructor * * @return void */ protected function __construct() {} /** * Get class instance. * * @return object Instance. */ final public static function instance() { if ( null === static::$instance ) { static::$instance = new static(); } return static::$instance; } /** * Prevent cloning. */ private function __clone() {} /** * Prevent unserializing. */ final public function __wakeup() { wc_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of this class is forbidden.', 'woocommerce' ), '4.6' ); die(); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
ImageAttachment.php
1.94 KB
lrw-r--r--
2026-03-03 06:10:17
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SingletonTrait.php
863 B
lrw-r--r--
2026-03-03 06:10:17
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).