Get the existing instance of this Plugin.
@param string Optionally, the name or classname of the Plugin to retrieve
@return Plugin instance if bootstrapped, otherwise false
16412
static function getInstance($name = null)
  {
    if (empty($name)) {
      $name = get_called_class();
    }
    if (!empty(static::$plugins[$name])) {
      return static::$plugins[$name];
    }
    return false;
  }
230585
public function getInstance() {
        if(!$this->isInstanceLoaded()) {
            $inst = $this->loadInstance();
            if(!$this->instance)
                $this->instance = $inst;
        }
		return $this->instance;
	}
1234882
function(plugin) {
		
		var self = this;
		
		// getter
		if (typeof plugin == 'string') {
			
			var pluginName = plugin,
				p = null;
			
			// if the namespace is provided, it's easy to search
			if (pluginName.indexOf('.') > 0) {
				p = self.__plugins[pluginName];
			}
			// otherwise, return the first name that matches
			else {
				$.each(self.__plugins, function(i, plugin) {
					
					if (plugin.name.substring(plugin.name.length - pluginName.length - 1) == '.'+ pluginName) {
						p = plugin;
						return false;
					}
				});
			}
			
			return p;
		}
		// setter
		else {
			
			// force namespaces
			if (plugin.name.indexOf('.') < 0) {
				throw new Error('Plugins must be namespaced');
			}
			
			self.__plugins[plugin.name] = plugin;
			
			// if the plugin has core features
			if (plugin.core) {
				
				// bridge non-private methods onto the core to allow new core methods
				self.__bridge(plugin.core, self, plugin.name);
			}
			
			return this;
		}
	}
1210520
<T extends Plugin> Optional<T> findFirstPlugin(Class<T> clazz) {
        requireNonNull(clazz, "clazz");
        return plugins.stream().filter(clazz::isInstance).map(clazz::cast).findFirst();
    }
9715
public function getInstance(string $locale = FakerFactory::DEFAULT_LOCALE, bool $new = false): FakerGenerator
    {
        return $this->once($locale, function () use ($locale) {
            return $this->create($locale);
        }, $new);
    }
242539
public function getInstance($className)
    {
        switch ($className) {
            case '\\Zepi\\Web\\UserInterface\\Frontend\\FrontendHelper':
                return $this->framework->initiateObject($className, array(), true);
            break;
            
            default: 
                return $this->framework->initiateObject($className);
            break;
        }
    }
275994
public static function get($plugin) {
        $dir = core_component::get_component_directory('tinymce_' . $plugin);
        require_once($dir . '/lib.php');
        $classname = 'tinymce_' . $plugin;
        return new $classname($plugin);
    }
157335
public static function getInstance($className)
    {
        if (!isset(static::$registeredClasses[$className])) {
            return null;
        }
        /** @var DI $object */
        $object = $className::build()->auto();
        return $object;
    }
1175297
public static function getInstance($name=null) {
		if( !$name ) {
			$name = 'default';
		}
		if( !isset(static::$instances[$name]) ) {
			static::make($name);
		}
		return static::$instances[$name];
	}
84946
function _getInstance (element, options) {
  let machine;
  if (!$.data(element[0], 'plugin_' + name)) {
    machine = new JQuerySlotMachine(element[0], options);
    $.data(element[0], 'plugin_' + name, machine);
  } else {
    machine = $.data(element[0], 'plugin_' + name);
  }
  return machine;
}
219227
public function getBySlug($sSlug, $bOnlySelectable = false)
    {
        $aAvailable = $this->getAll($bOnlySelectable);

        foreach ($aAvailable as $oType) {

            if ($oType->slug == $sSlug) {

                if (!isset($oType->instance)) {
                    $oType->instance = Factory::factory(
                        $oType->component,
                        $oType->provider
                    );
                }

                return $oType->instance;
            }
        }

        return null;
    }
754480
public function getInstance($className)
    {
        switch ($className) {
            case '\\Zepi\\Core\\Utils\\Manager\\ConfigurationManager':
                if ($this->configurationManager === null) {
                    $path = $this->framework->getRootDirectory() . '/config/framework.json';
                    $configFileBackend = new \Zepi\Core\Utils\Backend\ConfigurationFileBackend($path);
                    
                    $this->configurationManager = $this->framework->initiateObject($className, array(
                        'configurationFileBackend' => $configFileBackend
                    ));
                    $this->configurationManager->loadConfigurationFile();
                }
                
                return $this->configurationManager;
            break;
            
            default: 
                return $this->framework->initiateObject($className);
            break;
        }
    }
811004
public static function &getInstance()
    {
        $classname = get_called_class();
        if (!isset(self::$_instances[ $classname ])) {
            self::createInstance($classname, func_get_args());
        }
        $instance = self::$_instances[ $classname ];
        return $instance;
    }
172581
public function className($plugin = true) {
		return (($plugin && !empty($this->plugin)) ? $this->plugin . '.' : '') . $this->name;
	}
796634
function get_plugin_name( $premium_suffix = false ) {
            $this->_logger->entrance();

            /**
             * This `if-else` can be squeezed into a single `if` but I intentionally split it for code readability.
             *
             * @author Vova Feldman
             */
            if ( ! isset( $this->_plugin_name ) ) {
                // Name is not yet set.
                $this->set_name( $premium_suffix );
            } else if (
                ! empty( $premium_suffix ) &&
                ( ! is_object( $this->_plugin ) || $this->_plugin->premium_suffix !== $premium_suffix )
            ) {
                // Name is already set, but there's a change in the premium suffix.
                $this->set_name( $premium_suffix );
            }

            return $this->_plugin_name;
        }
1158492
public static function getInstance($className)
    {
        if (!isset(self::$instances[$className])) {
            self::$instances[$className] = new self($className);
        }

        return self::$instances[$className];
    }
1113775
public static function getInstance($type)
    {
        $classname = self::getClassname($type);

        if (!isset(self::$__instances[$classname])) {
            $instance = new $classname();
            self::$__instances[$classname] = $instance;
        }

        $instance = clone self::$__instances[$classname];

        return $instance;
    }