%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/tradesc/www/relax/wp-content/plugins/elementskit-lite/traits/
Upload File :
Create Path :
Current File : /home/tradesc/www/relax/wp-content/plugins/elementskit-lite/traits/singleton.php

<?php

namespace ElementsKit_Lite\Traits;

/**
 * Trait for making singleton instance
 * This is a factory singleton
 *
 * @package ElementsKit_Lite\Traits
 */
trait Singleton {
	private static $instances = array();

	public static function instance() {
		$class = get_called_class();
		if ( ! isset( self::$instances[ $class ] ) ) {
			self::$instances[ $class ] = new $class();
		}
		return self::$instances[ $class ];
	}
}

Zerion Mini Shell 1.0