A_Z_Listing_Singleton

A_Z_Listing_Singleton


Description


Source

File: classes/class-a-z-listing-singleton.php

abstract class A_Z_Listing_Singleton implements A_Z_Listing_Extension {
	/**
	 * Instances
	 *
	 * @var array
	 */
	private static $_instances = array();

	/**
	 * Singleton
	 *
	 * @return A_Z_Listing_Extension extension object.
	 */
	final public static function instance() {
		$class = get_called_class();
		if ( ! isset( self::$_instances[ $class ] ) ) {
			self::$_instances[ $class ] = new $class();
		}
		return self::$_instances[ $class ];
	}

	/**
	 * Activate
	 *
	 * @param string $plugin the plugin path.
	 *
	 * @return A_Z_Listing_Singleton
	 */
	public function activate( $plugin = '' ) {
		return $this; // no-op.
	}

	/**
	 * Initialize
	 */
	public function initialize() {
		return; // no-op.
	}
}

More Information

You are currently logged out. To view tickets you must first login.

I have read and understood the Terms of Service



Methods


User Contributed Notes

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.