Returns an instance of this class

This method allows the passed argument to be either an instance of
IDS_Init or an array.

@param  mixed  $config    IDS_Init | array
@param  string $classname the class name to use

@return object $this
336877
public static function getInstance($config, $classname = 'IDS_Log_Email')
    {
        if (!self::$instance) {
            self::$instance = new $classname($config);
        }

        return self::$instance;
    }
563414
public static function configure($config)
    {
        if (is_null(static::$instance)) {
            static::$instance = new self();

            static::$name = $config['default'];

            static::$config = $config;
        }

        return static::$instance;
    }
839538
protected function createInstance($className, $name)
    {
        $formConfiguration = $this->typoScriptService->getFormConfiguration($className);

        /** @var FormObject $instance */
        $instance = Core::instantiate(FormObject::class, $className, $name, $formConfiguration);

        $this->insertObjectProperties($instance);

        $instance->getHash();

        return $instance;
    }
626313
function fromClass($className)
    {
        if(!isset($this->metas[$className]))
        {
            $this->metas[$className] = $this->findMeta($className, $this);
        }

        return $this->metas[$className];
    }
1023005
public static function getInstance($cfg = array())
    {
        if (!isset(self::$instance)) {
            $className = __CLASS__;
            // self::$instance set in __construct
            new $className($cfg);
        } elseif ($cfg) {
            self::$instance->setCfg($cfg);
        }
        return self::$instance;
    }
1008926
public static function deserialize(array $config)
    {
        if (isset($config['class']) && isset($config['config'])) {
            $config = $config['config'];
        }
        $instance = new self();
        $instance->loadConfig($config);
        return $instance;
    }
872219
public function asSharedInstanceOf($className)
        {
            $endPoint =& $this->_getEndPoint();
            $endPoint['lookupType'] = self::TYPE_SHARED;
            $endPoint['className'] = $className;

            return $this;
        }
1007937
public function search($mainEntityClassname, $config = [])
    {
        return Yii::$container->get(SearchQuery::class, [$mainEntityClassname, $this, $config]);
    }
1371822
public function getInstance($className)
    {
        switch ($className) {
            case '\\Zepi\\Api\\AccessControl\\Manager\\TokenManager':
                if ($this->tokenManager === null) {
                    $this->tokenManager = $this->framework->initiateObject($className);
                }
                
                return $this->tokenManager;
            break;
            
            default: 
                return $this->framework->initiateObject($className);
            break;
        }
    }
262890
public function bootstrap($config = [])
    {
        $config         = $this->setConfig($config)->getConfig();
        $this->request  = $this->getNewRequest(array_merge($_SERVER, $_GET));
        $this->iterator = new BlogIterator(realpath($config['data_dir']));
        $this->factory  = new BlogFactory;

        return $this;
    }
1172151
public function asSharedInstanceOf($className)
    {
        $endPoint = &$this->getEndPoint();
        $endPoint['lookupType'] = self::TYPE_SHARED;
        $endPoint['className'] = $className;

        return $this;
    }
823939
public static function create(Config $config)
    {
        if (php_sapi_name() === 'cli' || !(self::$instance instanceof self)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }
431114
public static function create($className) {
        // The best logger configuration for the given class name
        $bestLoggerConfiguration = LoggerManager::findBestLoggerConfigurationForClass($className);

        // If no logger configuration was found for the given class name
        if (!isset($bestLoggerConfiguration)) {
            // Return an empty logger
            return new Logger($className);
        }

        // A logger configuration has been found for the given class name
        $logger = new Logger($className);
        $logger->_targetClassName = $bestLoggerConfiguration['class'];
        $logger->_level = LogLevel::createFromCode($bestLoggerConfiguration['level']);
        $logger->_setupWriters($bestLoggerConfiguration['writers']);

        return $logger;
    }
735016
public static function createObject( $className, $arguments = array() )
	{
		if( !class_exists( $className ) )
			throw new RuntimeException( 'Class "'.$className.'" has not been loaded' );
		$class	= new ReflectionClass( $className );
		if( $arguments )
			$object	= $class->newInstanceArgs( $arguments );
		else
			$object	= $class->newInstance();
		return $object;
	}
358476
public static function instance($config = [])
    {
        if (null === self::$instance) {
            self::$instance = new static($config);
        }

        return self::$instance;
    }
193351
public static function getInstance(Configuration $config = null)
    {
        if (!self::$instance) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }
1313858
public function getIdByClassName($className)
    {
        $classId = $this->getClassIdFromShopMap($className);

        if (empty($classId)) {
            $classId = $this->getClassIdFromModuleMap($className);
        }
        return $classId;
    }