2017 © Pedro Peláez
 

library libmageconf

Discover Magento environment and configuration information outside of an application installation.

image

meanbee/libmageconf

Discover Magento environment and configuration information outside of an application installation.

  • Friday, September 16, 2016
  • by meanbee
  • Repository
  • 2 Watchers
  • 6 Stars
  • 247 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

LibMageConf

Build Status Scrutinizer Code Quality Code Coverage, (*1)

This library provides a mechanism for discovering a Magento (1.x and 2.x supported) installation, given a starting directory. This is useful for building tools that integrate externally with Magento but still need access to its configuration or certain files, such as magedbm and mageconfigsync., (*2)

Installation

composer require meanbee/libmageconf

Usage

Given that I have Magento installed in /home/nrj/magento, I can discover its location with the following code:, (*3)

$rootDiscovery = new RootDiscovery('/home/nrj');

// Outputs: "Root: /home/nrj/magento"
printf("Root: %s", $rootDiscovery->getRootDirectory());

Given that I know where the Magento installation's local.xml is, I can access the configuration held in that file with the following code:, (*4)

$configReader = ConfigReader\MagentoOne("path/to/local.xml");
$databaseName = $configReader->getDatabaseName();

or, (*5)

$configReader = ConfigReader\MagentoTwo("path/to/env.php");
$databaseName = $configReader->getDatabaseName();

The Versions

16/09 2016

dev-master

9999999-dev

Discover Magento environment and configuration information outside of an application installation.

  Sources   Download

MIT

The Development Requires

magento

15/09 2016

1.0.0

1.0.0.0

Discover Magento environment and configuration information outside of an application installation.

  Sources   Download

MIT

The Development Requires

magento

15/09 2016

0.3.0

0.3.0.0

Discover Magento environment and configuration information outside of an application installation.

  Sources   Download

MIT

The Development Requires

magento

06/07 2016

0.2.0

0.2.0.0

Discover Magento environment and configuration information outside of an application installation.

  Sources   Download

MIT

The Development Requires

magento

05/07 2016

0.1.0

0.1.0.0

Discover Magento environment and configuration information outside of an application installation.

  Sources   Download

MIT

The Development Requires

magento