Creates and returns an instance of the helper

@return Object
962266
public function load($name)
    {
        $helper = $this->getRegisteredHelper($name);

        $reflection = new \ReflectionClass($helper);
        $class = $reflection->newInstance($this->di);

        return $class;
    }
1257397
private static function instance()
    {
        $currentClass = get_called_class();
        $instanceName = empty( self::$instance ) ? '' : new \ReflectionClass(self::$instance);
        if( empty( self::$instance ) || ( $instanceName->name != $currentClass ) ) {
            self::$instance = new static();
        }
        return self::$instance;
    }
250673
public function newInstance()
    {
        if (!$this->instantiator instanceof InstantiatorInterface) {
            $this->instantiator = new Instantiator();
        }

        return $this->instantiator->instantiate($this->name);
    }
852730
public static function getInstance()
    {
        $sClass = get_called_class();

        if (!isset(self::$_aInstances[$sClass])) {
            self::$_aInstances[$sClass] = new $sClass();
        }

        return self::$_aInstances[$sClass];
    }
972824
public function newInstance()
    {
        $escaper = $this->escaper;
        $aura = $this->aura;

        return new MetaHelper(
            [
                'title' => function () use ($aura, $escaper) {
                    return new Helper\Title(
                        $aura->get('title'),
                        $aura->get('metas'),
                        $escaper
                    );
                },
                'description' => function () use ($aura) {
                    return new Helper\Description(
                        $aura->get('metas')
                    );
                },
                'robots' => function () use ($aura) {
                    return new Helper\Robots(
                        $aura->get('metas')
                    );
                },
                'icons' => function () use ($aura) {
                    return new Helper\Icons(
                        $aura->get('links')
                    );
                },
                'charset' => function () use ($aura) {
                    return new Helper\Charset(
                        $aura->get('metas')
                    );
                },
                'compat' => function () use ($aura) {
                    return new Helper\Compat(
                        $aura->get('metas')
                    );
                },
                'viewport' => function () use ($aura) {
                    return new Helper\Viewport(
                        $aura->get('metas')
                    );
                },
                'url' => function () use ($aura) {
                    return new Helper\Url(
                        $aura->get('metas')
                    );
                },
                'locale' => function () use ($aura) {
                    return new Helper\Loc(
                        $aura->get('metas')
                    );
                },
                'image' => function () use ($aura) {
                    return new Helper\Image(
                        $aura->get('metas'),
                        $aura->get('links')
                    );
                },
                'containerClass' => function () use ($escaper) {
                    return new Helper\ContainerClass($escaper);
                },
                'bodyClass' => function () use ($escaper) {
                    return new Helper\ContainerClass($escaper);
                },
                'metas' => function () use ($aura) {
                    return $aura->get('metas');
                },
                'links' => function () use ($aura) {
                    return $aura->get('links');
                },
                'scripts' => function () use ($aura) {
                    return $aura->get('scripts');
                },
                'scriptsFoot' => function () use ($aura) {
                    return $aura->get('scriptsFoot');
                },
                'styles' => function () use ($aura) {
                    return $aura->get('styles');
                }
            ]
        );

    }
33827
public static function instance(): self
    {
        if (!self::$instance) {
            self::$instance = new self(
                Sequencer::sequence('spy-label'),
                CallFactory::instance(),
                Invoker::instance(),
                GeneratorSpyFactory::instance(),
                IterableSpyFactory::instance()
            );
        }

        return self::$instance;
    }
306601
public function getInstance()
    {
        if ($this->isSingleton() && $this->hasInstance()) {
            return $this->instance;
        }

        // require path
        if ($this->path) {
            require_once $this->path;
        }

        // initialize
        if ($this->isClosure()) {
            $closure = $this->class;
            $instance = $closure($this->container);
        } else {
            $class = $this->class;
            if ($class[0] !== '\\') $class = '\\' . $class;
            $script = sprintf('$instance = new %s(%s);', $class, $this->array2ArgsWithInjectDependency('$this->args', $this->args));
            eval($script);
        }

        if ($this->isSingleton()) {
            $this->instance = $instance;
        }
        if ($this->container && method_exists($instance, 'setContainer')) {
            $instance->setContainer($this->container);
        }
        
        // inject dependency
        if ($this->container) {
            $this->container->injectDependency($instance);
        }
        
        // init method
        if ($this->hasInitMethod()) {
            $this->callInitMethod($instance);
        } elseif($this->hasInitializeMethod($instance)) {
            $instance->initialize();
        }

        return $instance;
    }
986357
public static function getInstance(): MessageHelper {
		if (empty(self::$instance)) {
			self::$instance = new MessageHelper();
		}

		return self::$instance;
	}
1145547
private function getUrlHelper() : UrlHelper
    {
        if (null === $this->urlHelper) {
            $this->urlHelper = new UrlHelper(new View());
        }

        return $this->urlHelper;
    }
130167
protected function getHeadLinkHelper()
    {
        if ( $this->headLinkHelper )
        {
            return $this->headLinkHelper;
        }

        if ( method_exists( $this->view, 'plugin' ) )
        {
            $this->headLinkHelper = $this->view
                                         ->plugin( 'headLink' );
        }

        if ( ! $this->headLinkHelper instanceof HeadLink )
        {
            $this->headLinkHelper = new HeadLink();
        }

        return $this->headLinkHelper;
    }
11137
private static function getInstance()
    {
        if (self::$converter === null) {
            self::$converter = new AnsiToHtmlConverter(null, false);
        }

        return self::$converter;
    }
739786
public static function instance(): self
    {
        if (!self::$instance) {
            self::$instance = new self(
                MatcherVerifier::instance(),
                InlineExporter::instance(),
                DifferenceEngine::instance(),
                FeatureDetector::instance()
            );
        }

        return self::$instance;
    }
189061
public static function make()
    {
        $name = get_called_class();

        if (!isset(static::$instances[$name])) {

            $instance = new $name();

            static::$instances[$name] = method_exists($instance, 'boot') ? $instance->boot() : $instance;
        }

        return static::$instances[$name];
    }
742092
protected function getQuestionHelper(): QuestionHelper
    {
        if ($this->questionHelper === null) {
            $this->questionHelper = new QuestionHelper();
            $helperSet = new HelperSet([new FormatterHelper()]);
            $this->questionHelper->setHelperSet($helperSet);
        }
        return $this->questionHelper;
    }
621498
public function create(): Model
	{
		$model_class = $this->getModelClass();
		$instance = new $model_class;
		$this->fill($instance);

		return $instance;
	}
133053
protected function getTransformer()
    {
        if (is_callable($this->transformer) || $this->transformer instanceof TransformerAbstract) {
            return $this->transformer;
        }

        return Craft::createObject($this->transformer);
    }
872969
public function newInstance()
    {
        if ($this->prototype === null) {
            $this->prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));
        }

        return clone $this->prototype;
    }