Get the dumper instance.

@param string $dumper the dumper

@return AbstractDumper the instance
196815
public static function getInstance(string $dumper): AbstractDumper
    {
        $class = static::getClassName($dumper);

        if (!isset(static::$singletons[$class])) {
            static::$singletons[$class] = new $class();
        }

        return static::$singletons[$class];
    }
1037725
public function getCacheBusterFactory()
    {
        if (null === $this->cacheBusterFactory) {
            $this->cacheBusterFactory = function ($helper) {
                return new CacheBusterDecorator($helper);
            };
        }
        return $this->cacheBusterFactory;
    }
1286238
public function getInstance()
    {
        if (!$this->parserInstance) {
            /**
             * Check if Twig_Autoloader class exists
             * otherwise include it.
             */
        
            if (!class_exists('\Twig_Autoloader')) {
                require_once $this->parserDirectory . '/Autoloader.php';
            }

            \Twig_Autoloader::register();
            $loader = new \Twig_Loader_Filesystem($this->getTemplateDirs());
            $this->parserInstance = new \Twig_Environment(
                $loader,
                $this->parserOptions
            );

            foreach ($this->parserExtensions as $ext) {
                $extension = is_object($ext) ? $ext : new $ext;
                $this->parserInstance->addExtension($extension);
            }
        }

        return $this->parserInstance;
    }
433191
public static function loader($loader = null)
    {
        if (is_object($loader)) {
            self::$loader = $loader;
        }

        return isset(self::$loader) ? self::$loader : self::$loader = new Loader;
    }
908005
public static function create($data = null, $transformer = null, $serializer = null)
    {
        $instance = new static(new Manager());

        $instance->data = $data;
        $instance->dataType = $instance->determineDataType($data);
        $instance->transformer = $transformer ?: null;
        $instance->serializer = $serializer ?: null;

        return $instance;
    }
738693
public function getLoader()
    {
        if (!($this->loader instanceof DictLoaderInterface)) {
            $dataDir = dirname(__DIR__).'/data/';

            $loaderName = $this->loader;
            $this->loader = new $loaderName($dataDir);
        }

        return $this->loader;
    }
909820
public static function from($sender = NULL) {
    if (!isset($sender) && ($sender = Config::get('mail.from')) == NULL) {
      $sender = 'www@'.PSC::getEnvironment()->getHostName();
    }
    return self::recipient($sender);
  }
77460
public function getExporter(?string $connection = null): AbstractExporter
    {
        $config = $this->config->extract('database');

        // Check is new or legacy
        if ($config->get('connections')) {
            $connection = $connection ?: $config->get('connection', 'local');

            $config = $config->extract('connections.' . $connection);
        }

        $driver = $config->get('driver', 'mysql');

        $class = 'Windwalker\Core\Database\Exporter\\' . ucfirst($driver) . 'Exporter';

        return $this->container->createSharedObject($class);
    }
1003978
final protected function resolvePersister($persister)
    {
        if (null === $persister) {
            return $this->persister;
        }

        switch (true) {
            case $persister instanceof PersisterInterface:
                return $persister;
            case $persister instanceof ObjectManager:
                return new Doctrine($persister);

            default:
                throw new \InvalidArgumentException(sprintf(
                    'Invalid persister type, expected Nelmio\Alice\PersisterInterface or Doctrine\Common\Persistence\ObjectManager. Got %s instead.',
                    get_class($persister)
                ));
        }
    }
312933
public function build(Injector $injector = null): Injector
    {
        if ($injector === null) {
            $injector = new Injector();
        }

        foreach ($this->configs as $config) {
            $config->apply($injector);
        }

        return $injector;
    }
45735
public function dump($value)
    {
        $dumper = $this->getDumper();

        if ($dumper) {
            // re-use the same DumpOutput instance, so it won't re-render the global styles/scripts on each dump.
            // exclude verbose information (e.g. exception stack traces)
            if (class_exists('Symfony\Component\VarDumper\Caster\Caster')) {
                $cloneVar = $this->getCloner()->cloneVar($value, Caster::EXCLUDE_VERBOSE);
                // Symfony VarDumper 2.6 Caster class dont exist.
            } else {
                $cloneVar = $this->getCloner()->cloneVar($value);
            }

            $dumper->dump(
                $cloneVar,
                $this->htmlDumperOutput
            );

            $output = $this->htmlDumperOutput->getOutput();
            $this->htmlDumperOutput->clear();

            return $output;
        }

        return htmlspecialchars(print_r($value, true));
    }
435289
public static function getLogger()
	{
		if(self::$logger === NULL)
		{
			self::$logger = new Logger('sonic');
			self::$logger->pushHandler(new StreamHandler(Configuration::getLogfile()));
		}
		
		return self::$logger;
	}
160159
public function dump(DumperInterface $dumper)
    {
        $refs = [0];
        $this->dumpItem($dumper, new Cursor(), $refs, $this->data[$this->position][$this->key]);
    }
1122902
public function createDumper(DumperConfigDataProvider $configDataProvider): DumperInterface
    {
        $configDataProvider->setSshHost($this->getConfig()->getSshHost());
        $configDataProvider->setSshUser($this->getConfig()->getSshUser());
        $configDataProvider->setProject($this->getConfig()->getProject());
        $configDataProvider->setImageName($this->getConfig()->getImageName());
        $configDataProvider->setDumpDirectory($this->getConfig()->getDumpDirectory());

        return new Dumper(
            $configDataProvider,
            $this->getDockerFacade()
        );
    }
23184
public static function getInstance()
    {
        return new GeneratorFinderCache(
            new GeneratorFinder(
                TranstyperFactory::getInstance(),
                GeneratorValidatorFactory::getInstance(),
                new FileManager()
            ),
            Installer::getDirectories(),
            new FileManager()
        );
    }
401240
public function getVarDumper()
    {
        if ($this->varDumper === null) {
            $this->varDumper = DataCollector::getDefaultVarDumper();
        }
        return $this->varDumper;
    }
1101497
public function getFormatter($formatter=null) {
		if (!$formatter) {
			$formatter = $this->getActualEditorType();
		}

		if (!isset(self::$registered_formatters[$formatter])) {
			throw new Exception("Formatter $formatter does not exist");
		}

		return self::$registered_formatters[$formatter];
	}