Skip to content

Commit bee60fe

Browse files
Add vendor files for Mercanet
1 parent f692792 commit bee60fe

26 files changed

+2190
-140
lines changed

composer.lock

Lines changed: 97 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
// autoload.php @generated by Composer
44

5-
require_once __DIR__ . '/composer' . '/autoload_real.php';
5+
require_once __DIR__ . '/composer/autoload_real.php';
66

77
return ComposerAutoloaderInitc9ef76b3c4ca80d184aa0c79f412a58f::getLoader();

vendor/composer/ClassLoader.php

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ class ClassLoader
5353

5454
private $useIncludePath = false;
5555
private $classMap = array();
56-
5756
private $classMapAuthoritative = false;
57+
private $missingClasses = array();
58+
private $apcuPrefix;
5859

5960
public function getPrefixes()
6061
{
@@ -271,6 +272,26 @@ public function isClassMapAuthoritative()
271272
return $this->classMapAuthoritative;
272273
}
273274

275+
/**
276+
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277+
*
278+
* @param string|null $apcuPrefix
279+
*/
280+
public function setApcuPrefix($apcuPrefix)
281+
{
282+
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
283+
}
284+
285+
/**
286+
* The APCu prefix in use, or null if APCu caching is not enabled.
287+
*
288+
* @return string|null
289+
*/
290+
public function getApcuPrefix()
291+
{
292+
return $this->apcuPrefix;
293+
}
294+
274295
/**
275296
* Registers this instance as an autoloader.
276297
*
@@ -313,29 +334,34 @@ public function loadClass($class)
313334
*/
314335
public function findFile($class)
315336
{
316-
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
317-
if ('\\' == $class[0]) {
318-
$class = substr($class, 1);
319-
}
320-
321337
// class map lookup
322338
if (isset($this->classMap[$class])) {
323339
return $this->classMap[$class];
324340
}
325-
if ($this->classMapAuthoritative) {
341+
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
326342
return false;
327343
}
344+
if (null !== $this->apcuPrefix) {
345+
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
346+
if ($hit) {
347+
return $file;
348+
}
349+
}
328350

329351
$file = $this->findFileWithExtension($class, '.php');
330352

331353
// Search for Hack files if we are running on HHVM
332-
if ($file === null && defined('HHVM_VERSION')) {
354+
if (false === $file && defined('HHVM_VERSION')) {
333355
$file = $this->findFileWithExtension($class, '.hh');
334356
}
335357

336-
if ($file === null) {
358+
if (null !== $this->apcuPrefix) {
359+
apcu_add($this->apcuPrefix.$class, $file);
360+
}
361+
362+
if (false === $file) {
337363
// Remember that this class does not exist.
338-
return $this->classMap[$class] = false;
364+
$this->missingClasses[$class] = true;
339365
}
340366

341367
return $file;
@@ -348,9 +374,13 @@ private function findFileWithExtension($class, $ext)
348374

349375
$first = $class[0];
350376
if (isset($this->prefixLengthsPsr4[$first])) {
351-
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
352-
if (0 === strpos($class, $prefix)) {
353-
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
377+
$subPath = $class;
378+
while (false !== $lastPos = strrpos($subPath, '\\')) {
379+
$subPath = substr($subPath, 0, $lastPos);
380+
$search = $subPath.'\\';
381+
if (isset($this->prefixDirsPsr4[$search])) {
382+
foreach ($this->prefixDirsPsr4[$search] as $dir) {
383+
$length = $this->prefixLengthsPsr4[$first][$search];
354384
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
355385
return $file;
356386
}
@@ -399,6 +429,8 @@ private function findFileWithExtension($class, $ext)
399429
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
400430
return $file;
401431
}
432+
433+
return false;
402434
}
403435
}
404436

vendor/composer/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
2+
Copyright (c) Nils Adermann, Jordi Boggiano
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal

vendor/composer/autoload_psr4.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
'Omnipay\\MultiSafepay\\' => array($vendorDir . '/omnipay/multisafepay/src'),
3333
'Omnipay\\Mollie\\' => array($vendorDir . '/omnipay/mollie/src'),
3434
'Omnipay\\Migs\\' => array($vendorDir . '/omnipay/migs/src'),
35+
'Omnipay\\Mercanet\\' => array($vendorDir . '/fuzion/omnipay-mercanet/src'),
3536
'Omnipay\\Manual\\' => array($vendorDir . '/omnipay/manual/src'),
3637
'Omnipay\\Gopay\\' => array($vendorDir . '/sergej-koscejev/omnipay-gopay/src'),
3738
'Omnipay\\GoCardless\\' => array($vendorDir . '/omnipay/gocardless/src'),

vendor/composer/autoload_real.php

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,37 @@ public static function getLoader()
2525

2626
$includePaths = require __DIR__ . '/include_paths.php';
2727
array_push($includePaths, get_include_path());
28-
set_include_path(join(PATH_SEPARATOR, $includePaths));
28+
set_include_path(implode(PATH_SEPARATOR, $includePaths));
2929

30-
$map = require __DIR__ . '/autoload_namespaces.php';
31-
foreach ($map as $namespace => $path) {
32-
$loader->set($namespace, $path);
33-
}
30+
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
31+
if ($useStaticLoader) {
32+
require_once __DIR__ . '/autoload_static.php';
3433

35-
$map = require __DIR__ . '/autoload_psr4.php';
36-
foreach ($map as $namespace => $path) {
37-
$loader->setPsr4($namespace, $path);
38-
}
34+
call_user_func(\Composer\Autoload\ComposerStaticInitc9ef76b3c4ca80d184aa0c79f412a58f::getInitializer($loader));
35+
} else {
36+
$map = require __DIR__ . '/autoload_namespaces.php';
37+
foreach ($map as $namespace => $path) {
38+
$loader->set($namespace, $path);
39+
}
3940

40-
$classMap = require __DIR__ . '/autoload_classmap.php';
41-
if ($classMap) {
42-
$loader->addClassMap($classMap);
41+
$map = require __DIR__ . '/autoload_psr4.php';
42+
foreach ($map as $namespace => $path) {
43+
$loader->setPsr4($namespace, $path);
44+
}
45+
46+
$classMap = require __DIR__ . '/autoload_classmap.php';
47+
if ($classMap) {
48+
$loader->addClassMap($classMap);
49+
}
4350
}
4451

4552
$loader->register(true);
4653

47-
$includeFiles = require __DIR__ . '/autoload_files.php';
54+
if ($useStaticLoader) {
55+
$includeFiles = Composer\Autoload\ComposerStaticInitc9ef76b3c4ca80d184aa0c79f412a58f::$files;
56+
} else {
57+
$includeFiles = require __DIR__ . '/autoload_files.php';
58+
}
4859
foreach ($includeFiles as $fileIdentifier => $file) {
4960
composerRequirec9ef76b3c4ca80d184aa0c79f412a58f($fileIdentifier, $file);
5061
}

vendor/composer/autoload_static.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class ComposerStaticInitc9ef76b3c4ca80d184aa0c79f412a58f
4646
'Omnipay\\MultiSafepay\\' => 21,
4747
'Omnipay\\Mollie\\' => 15,
4848
'Omnipay\\Migs\\' => 13,
49+
'Omnipay\\Mercanet\\' => 17,
4950
'Omnipay\\Manual\\' => 15,
5051
'Omnipay\\Gopay\\' => 14,
5152
'Omnipay\\GoCardless\\' => 19,
@@ -170,6 +171,10 @@ class ComposerStaticInitc9ef76b3c4ca80d184aa0c79f412a58f
170171
array (
171172
0 => __DIR__ . '/..' . '/omnipay/migs/src',
172173
),
174+
'Omnipay\\Mercanet\\' =>
175+
array (
176+
0 => __DIR__ . '/..' . '/fuzion/omnipay-mercanet/src',
177+
),
173178
'Omnipay\\Manual\\' =>
174179
array (
175180
0 => __DIR__ . '/..' . '/omnipay/manual/src',

0 commit comments

Comments
 (0)