Get the installer instance.

@return Installer
964522
protected function getInstaller()
    {
        if ($this->installer === null) {
            $this->installer = $this->app->make(Installer::class);
        }

        return $this->installer;
    }
702961
public function getAutoloader()
    {
        if (!isset($this->autoloader)) {
            $this->autoloader = new Autoloader(new FileLocator($this->getPath()), $this->getInflector());
        }

        return $this->autoloader;
    }
144580
private function getDownloader(): InstallerInterface
    {
        /**
         * Reverse the order of the downloaders so that the ones added last are checked first.
         *
         * @var InstallerInterface[]
         */
        $installers = \array_reverse($this->installers);
        foreach ($installers as $installer) {
            /** @var InstallerInterface $installer */
            if ($installer->isEligible()) {
                return $installer;
            }
        }

        throw new NoDownloaderFoundException('No eligible downloader found for Mock Server binaries.');
    }
434677
public function getDriver()
    {
        // if driver status is false, we return the BlackHole driver
        if (!$this->getStatus()) {
            if (is_null(self::$nullDriver)) {
                self::$nullDriver = new Storage\BlackHole();
            }

            return self::$nullDriver;
        }

        return $this->driver;
    }
1066946
public function getDriver()
    {
        if (null === $this->driver) {
            $this->driver = $this->autodetectDriver($this->knownDrivers);
        }
        return $this->driver;
    }
966017
public function getSorter()
    {
        if (null === $this->sorter) {
            $this->sorter = new Sorter($this);
        }
        return $this->sorter;
    }
1063857
public function getInstallationManager()
    {
        if (!$this->installationManager) {
            $this->installationManager = new InstallationManagerImpl(
                $this->getPuli()->getEnvironment(),
                $this->getPuli()->getRepository(),
                $this->getInstallTargetManager()->getTargets(),
                $this->getInstallerManager()
            );
        }

        return $this->installationManager;
    }
1241370
public function getDriver()
    {
        if ($this->driver === null) {
            // Get driver configuration
            $config = $this->config('drivers.' . $this->config('driver'), []);

            // Get driver class
            $driver = Arr::pull($config, 'class');

            // Create driver instance
            $this->driver = new $driver($config);
        }

        return $this->driver;
    }
224036
public function install()
    {
        $this->ensureNotInstalledBefore();

        if ($this->locator) {
            $this->path = $this->locator->locate($this->slug);
        }

        $this->validate();

        $this->make();

        $this->register();

        $this->migrate();

        $this->installSubAddons();

        AddonInstalledEvent::dispatch($this->addon);

        return $this;
    }
862685
public static function instance() {
		if ( ! isset( self::$instance ) ) {
			self::$instance = new self;
			self::$instance->boot();
			self::$instance->setup_actions();
		}

		return self::$instance;
	}
1129579
public function getLoader()
    {
        if (!$this->loader) {
            if ($this->config->get('path_separator')) {
                $this->loader = new TwigFilesystemLoader(
                    iterator_to_array(clone $this->getPaths()),
                    $this->config->get('path_separator')
                );
            } else {
                $this->loader = new \Twig_Loader_Filesystem(iterator_to_array(clone $this->getPaths()));
            }
        }

        return $this->loader;
    }
592841
private function getLoader(): LoaderInterface
    {
        if (null !== $this->loader) {
            return $this->loader;
        }

        if (null !== $this->localFile) {
            $this->loader = new Local($this->localFile);

            return $this->loader;
        }

        if (extension_loaded('curl')) {
            $this->loader = new Curl($this);

            return $this->loader;
        }

        $streamHelper = new StreamCreator($this);

        if (ini_get('allow_url_fopen')) {
            $this->loader = new FopenLoader($this, $streamHelper);

            return $this->loader;
        }

        $this->loader = new SocketLoader($this, $streamHelper);

        return $this->loader;
    }
142377
public function getInstallScript()
    {
        if (! $this->installScript) {
            $installClass = $this->installNamespace.'Install';

            if (! class_exists($installClass)) {
                $message = sprintf('No install class found at %s. Nothing to do.', $installClass);

                throw new RuntimeException($message);
            }

            $installScript = new $installClass;

            $this->installScript = $installScript;
        }

        return $this->installScript;
    }
246424
protected function setupFinder()
    {
        $finder = new Finder();
        $finder
            ->in($this->config->getIncludedPaths())
            ->notPath('/vendor/')
            ->files();
        foreach ($this->config->getExcludedPaths() as $excluded) {
            $finder->notPath($excluded);
        }

        return $finder;
    }
805576
public function getWorker()
    {
        if ($this->_worker===null) {
            $config = Config::getInstance();
            $this->setupWorker($config);
        }

        return $this->_worker;
    }
58954
public static function instance()
    {
        if (null === self::$_instance) {
            $logger = new Monolog(Config::read('app.id'));
            $file_handler = new StreamHandler(self::getFilepath());
            $logger->pushHandler($file_handler);

            self::$_instance = $logger;
        }
        return self::$_instance;
    }
37915
protected function getUploader()
    {
        if (is_null($this->fileUploader)) {
            $this->fileUploader = $this->uploaderFactory->create();

            $this->fileUploader->init();

            $dirConfig = DirectoryList::getDefaultConfig();
            $dirAddon = $dirConfig[DirectoryList::MEDIA][DirectoryList::PATH];
            $DS = DIRECTORY_SEPARATOR;
            $tmpPath = $dirAddon . $DS . $this->mediaDirectory->getRelativePath('import');

            if (!$this->fileUploader->setTmpDir($tmpPath)) {
                throw new LocalizedException(
                    __('File directory \'%1\' is not readable.', $tmpPath)
                );
            }

            $destinationDir = "catalog/category";
            $destinationPath = $dirAddon . $DS . $this->mediaDirectory->getRelativePath($destinationDir);
            $this->mediaDirectory->create($destinationPath);

            if (!$this->fileUploader->setDestDir($destinationPath)) {
                throw new LocalizedException(
                    __('File directory \'%1\' is not writable.', $destinationPath)
                );
            }
        }

        return $this->fileUploader;
    }