You are here

function mollie_payment_libraries_info in Mollie Payment 7.2

Same name and namespace in other branches
  1. 7 mollie_payment.module \mollie_payment_libraries_info()

Implements hook_libraries_info().

File

./mollie_payment.module, line 183
Provides Mollie integration for the Payment platform.

Code

function mollie_payment_libraries_info() {
  $libraries = array();
  $libraries['mollie-api-php'] = array(
    'name' => 'Mollie API client for PHP',
    'vendor url' => 'https://www.mollie.nl/',
    'download url' => 'https://github.com/mollie/mollie-api-php',
    'version arguments' => array(
      'file' => 'src/MollieApiClient.php',
      'pattern' => '/CLIENT_VERSION = [",\'](\\d+.\\d+.\\d+)[",\']/',
      'lines' => 50,
    ),
    'xautoload' => function ($adapter) {

      /**
       * @var \Drupal\xautoload\Adapter\LocalDirectoryAdapter $adapter
       *   An adapter object that can register stuff into the class loader.
       */

      // Register a namespace with PSR-0 root in
      // 'sites/all/libraries/mollie-api-php/src'.
      $adapter
        ->addPsr4('Mollie\\Api\\', 'src/');
      $adapter
        ->composerDir('vendor/composer');
    },
  );
  return $libraries;
}