Returns all installed libraries.

@return ComposerJson[]
775216
public function getLibraries(bool $rescan = false): array
    {
        if (!$rescan && !empty(self::$libraries)) {
            return self::$libraries;
        }

        $compiledFile = $this->pathHelper->realize('{MELIOR_BASE}/Data/Persistent/Compiler/Packages/library.map');
        if (!$rescan && is_file($compiledFile)) {
            $result = \unserialize(\file_get_contents($compiledFile));
        } else {
            $result = [];
            $path = $this->pathHelper->realize('{MELIOR_BASE}/Packages/Library/');

            if (!is_dir($path)) {
                return [];
            }

            foreach (scandir($path) as $entry) {
                if ($entry === '.' || $entry === '..') {
                    continue;
                }

                $subpath = $this->pathHelper->join($path, $entry);
                $result = array_merge($result, $this->readPackageFolder($subpath));
            }
        }

        self::$libraries = $result;

        return $result;
    }
875678
public function getAllInstalledPackages(bool $rescan = false): array
    {
        if (!$rescan && !empty(self::$allInstalledPackages)) {
            return self::$allInstalledPackages;
        }

        $compiledFile = $this->pathHelper->realize('{MELIOR_BASE}/Data/Persistent/Compiler/Packages/package.map');
        if (!$rescan && is_file($compiledFile)) {
            $result = \unserialize(\file_get_contents($compiledFile));
        } else {
            $result = array_merge(
                $this->getLibraries($rescan),
                $this->getPlugins($rescan),
                $this->getApplicationPackages($rescan)
            );
        }

        self::$allInstalledPackages = $result;

        return $result;
    }
229736
public function getRequiredPackages()
    {
        $packages = [];

        $content = $this->getFileContents('composer.json');

        foreach (['require', 'require-dev'] as $key) {
            if (!isset($content[$key])) {
                continue;
            }

            foreach ($content[$key] as $name => $version) {
                if (!strstr($name, '/')) {
                    continue;
                }

                $packages[$name] = [
                    'name' => $name,
                    'version' => $version,
                    'devDependency' => $key === 'require-dev',
                ];
            }
        }

        if (empty($packages)) {
            throw new LogicException('We couldn\'t find any required packages.');
        }

        return $packages;
    }
739279
private function loadComposerPackages()
    {
        $repository = $this->composer->getRepositoryManager()->getLocalRepository();
        $packages = array();

        foreach ($repository->getPackages() as $package) {
            /* @var PackageInterface $package */
            $packages[$package->getName()] = $package;
        }

        return $packages;
    }
348070
public function getComposerInstall()
    {
        if (file_exists('composer.lock')) {
            $json = json_decode(file_get_contents('composer.lock'));
            foreach ($json->packages as $package) {
                if ($package->name === 'gestionlan/framework') {
                    return $package;
                }
            }
        }

        return false;
    }
741068
public static function get_all() {
		if (self::$skeleton_cache === null) {
			/**
			 * Search for other Skeleton packages installed
			 */
			$composer_dir = realpath(__DIR__ . '/../../../../../');
			$installed = file_get_contents($composer_dir . '/composer/installed.json');
			$installed = json_decode($installed);

			$skeletons = [];
			foreach ($installed as $install) {
				$package = $install->name;
				list($vendor, $name) = explode('/', $package);
				if ($vendor != 'tigron') {
					continue;
				}

				if (strpos($name, 'skeleton-package') === 0) {
					$skeleton = new Package();
				} else {
					$skeleton = new self();
				}
				$skeleton->name = $name;
				$skeleton->path = $composer_dir . '/tigron/' . $name;
				$skeleton->template_path = $composer_dir . '/tigron/' . $name . '/template';
				$skeleton->asset_path = $composer_dir . '/tigron/' . $name . '/media';
				$skeleton->migration_path = $composer_dir . '/tigron/' . $name . '/migration';

				$skeletons[] = $skeleton;
			}
			self::$skeleton_cache = $skeletons;
		}
		return self::$skeleton_cache;
	}
413151
public function getInstallers()
    {
        $this->orderedInstallers = [];

        if ($this->orderInstallersByNumber) {
            $this->orderInstallersByNumber();
        }

        if ($this->orderInstallersByDependencies) {
            $this->orderInstallersByDependencies();
        }

        if (!$this->orderInstallersByNumber && !$this->orderInstallersByDependencies) {
            $this->orderedInstallers = $this->installers;
        }

        return $this->orderedInstallers;
    }
498536
public function handleInstall(): array
    {
        $result = [];

        $handlers = AbstractOperation::getOperationHandlers($this->composer);
        $handlersMap = [];

        foreach ($handlers as $handler) {
            $handler = new $handler($this->package, $this->projectType, $this->composer);
            if ($handler instanceof SupportedProjectTypesInterface) {
                if (in_array($this->projectType->getMachineName(), $handler->getSupportedProjectTypes())) {
                    $handlersMap[] = $handler;
                }
            }
        }

        foreach ($this->projectType->getTypes() as $type) {
            if (isset($handlers[$type])) {
                $class = $handlers[$type];
                /** @var AbstractOperation $handler */
                $handler = new $class($this->package, $this->projectType, $this->composer);
                $handlersMap[] = $handler;
            }
        }

        foreach ($handlersMap as $handler) {
            if ($handler instanceof AvailableOperationInterface) {
                if (!$handler->isAvailable()) {
                    continue;
                }
            }
            $result[] = $handler->install();
        }

        return $result;
    }
953902
public static function get_all() {
		$packages = [];
		$packages[] = 'project';
		foreach (\Skeleton\Core\Skeleton::get_all() as $package) {
			$packages[] = $package->name;
		}
		$migrations = [];
		foreach ($packages as $package) {
			$migrations[$package] = \Skeleton\Database\Migration::get_between_versions($package);
		}

		return $migrations;
	}
469545
public static function get_all() {
		$skeletons = parent::get_all();
		$packages = [];
		foreach ($skeletons as $skeleton) {
			if (strpos($skeleton->name, 'skeleton') !== 0) {
				continue;
			}
			$packages[] = $skeleton;
		}
		return $packages;
	}
933236
protected function setComposerJson() {
    if (file_exists($this->getConfigValue('repo.root') . '/composer.json')) {
      $composer_json = json_decode(file_get_contents($this->getConfigValue('repo.root') . '/composer.json'), TRUE);
      $this->composerJson = $composer_json;

      return $composer_json;
    }

    return [];
  }
1196140
public function getLocalPackages() {
		$composer = $this->getComposer();
		$dispatcher = new EventDispatcher($composer, $this->io);
		$autoloadGenerator = new \Composer\Autoload\AutoloadGenerator($dispatcher);
		
		if ($this->selfEdit) {
			chdir(__DIR__."/../../..");
			\putenv('COMPOSER=composer-mouf.json');
		} else {
			chdir(__DIR__."/../../../../../..");
		}
		//TODO: this call is strange because it will return the same isntance as above.
		$composer = $this->getComposer();
				
		$localRepos = new CompositeRepository(array($composer->getRepositoryManager()->getLocalRepository()));
		$package = $composer->getPackage();
		$packagesList = $localRepos->getPackages();
		$packagesList[] = $package;
		
		return $packagesList;
	}
649263
public function handleUninstall(): array
    {
        $result = [];

        $handlers = AbstractOperation::getOperationHandlers($this->composer);

        foreach ($this->projectType->getTypes() as $type) {
            if (isset($handlers[$type])) {
                $class = $handlers[$type];
                /** @var AbstractOperation $handler */
                $handler = new $class($this->package, $this->projectType, $this->composer);
                if ($handler instanceof AvailableOperationInterface) {
                    if (!$handler->isAvailable()) {
                        continue;
                    }
                }
                $result[] = $handler->uninstall();
            }
        }

        return $result;
    }
580077
public function findAll(): array
    {
        $rootPackage = $this->composer->getPackage();
        $dependencies = $this->composer->getRepositoryManager()->getLocalRepository()->getPackages();

        $packagesWithDuplicates = array_merge([$rootPackage], $dependencies);

        return $this->removeDuplicates($packagesWithDuplicates);
    }
12079
public function allSourcePaths()
    {
        return array_merge(
            $this->allPsr4SourcePaths(),
            $this->allPsr0SourcePaths(),
            $this->autoloadClassmap(),
            $this->autoloadFiles(),
            $this->includePath()
        );
    }
1265588
public function findAll()
    {
        $repos = array();
        foreach ($this->repository->findAll() as $repo) {
            $this->loadPackagistInfos($repo);
            $repos[] = $repo;
        }

        return $repos;
    }
725643
public function getInstalledPlugins()
    {
        $arr = array();

        foreach ($this->pluginInformations as $single) {
            $arr = array_merge($arr, $single->getInstalledPlugins());
        }

        return $arr;
    }