You are here

function ClassFinderAdapter::composerJson in X Autoload 7.5

Same name and namespace in other branches
  1. 7.4 lib/Adapter/ClassFinderAdapter.php \Drupal\xautoload\Adapter\ClassFinderAdapter::composerJson()

Scan a composer.json file provided by a Composer package.

Parameters

string $file:

Throws

\Exception

Overrides ClassFinderAdapterInterface::composerJson

File

src/Adapter/ClassFinderAdapter.php, line 111

Class

ClassFinderAdapter
An instance of this class is passed around to implementations of hook_xautoload(). It acts as a wrapper around the ClassFinder, to register stuff.

Namespace

Drupal\xautoload\Adapter

Code

function composerJson($file) {
  $json = ComposerJson::createFromFile($file);
  $json
    ->writeToAdapter($this);
}