*/ class YIT_Ajax { /** * @var string version of class */ public $version = '1.0.0'; /** * @var object The single instance of the class * @since 1.0 */ protected static $_instance = null; /** * Constructor * * @since 1.0 * @author Leanza Francesco */ private function __construct() { } /** * get single instance * * @static * @return YIT_Ajax * * @since 1.0 * @author Leanza Francesco */ public static function instance() { if ( is_null( self::$_instance ) ) { self::$_instance = new self(); } return self::$_instance; } } } YIT_Ajax::instance();