One Hat Cyber Team
Your IP:
216.73.216.176
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
proc
/
thread-self
/
root
/
proc
/
self
/
cwd
/
Edit File:
nexmo-bridge.tar
src/autoload.php 0000644 00000000412 15111416570 0007652 0 ustar 00 <?php declare(strict_types=1); /** * Vonage Nexmo Bridge * * @copyright Copyright (c) 2020 Vonage, Inc. (http://vonage.com) * @license https://github.com/nexmo/vonage-php-nexmo-bridge/blob/master/LICENSE MIT License */ Vonage\NexmoBridge\Autoloader::load(); src/error_log 0000644 00000004271 15111416570 0007255 0 ustar 00 [18-Nov-2025 09:28:39 UTC] PHP Fatal error: Uncaught Error: Class "Vonage\NexmoBridge\Autoloader" not found in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php:10 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php on line 10 [18-Nov-2025 19:36:58 UTC] PHP Fatal error: Uncaught Error: Class "Vonage\NexmoBridge\Autoloader" not found in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php:10 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php on line 10 [19-Nov-2025 02:05:06 UTC] PHP Fatal error: Uncaught Error: Class "Vonage\NexmoBridge\Autoloader" not found in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php:10 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php on line 10 [19-Nov-2025 09:14:43 UTC] PHP Fatal error: Uncaught Error: Class "Vonage\NexmoBridge\Autoloader" not found in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php:10 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php on line 10 [19-Nov-2025 09:16:48 UTC] PHP Fatal error: Uncaught Error: Class "Vonage\NexmoBridge\Autoloader" not found in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php:10 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php on line 10 [19-Nov-2025 09:26:31 UTC] PHP Fatal error: Uncaught Error: Class "Vonage\NexmoBridge\Autoloader" not found in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php:10 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php on line 10 [25-Nov-2025 05:27:39 UTC] PHP Fatal error: Uncaught Error: Class "Vonage\NexmoBridge\Autoloader" not found in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php:10 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/vonage/nexmo-bridge/src/autoload.php on line 10 src/Autoloader.php 0000644 00000011345 15111416570 0010150 0 ustar 00 <?php declare(strict_types=1); /** * Vonage Nexmo Bridge * * @copyright Copyright (c) 2020 Vonage, Inc. (http://vonage.com) * @license https://github.com/nexmo/vonage-php-nexmo-bridge/blob/master/LICENSE MIT License */ namespace Vonage\NexmoBridge; use \ArrayObject; use Closure; use Composer\Autoload\ClassLoader; use \RuntimeException; /** * Alias legacy Nexmo classes/interfaces/traits to Vonage equivalents. */ class Autoloader { /** * Attach autoloaders for managing legacy Nexmo artifacts. * * We attach two autoloaders: * * - The first is _prepended_ to handle new classes and add aliases for * legacy classes. PHP expects any interfaces implemented, classes * extended, or traits used when declaring class_alias() to exist and/or * be autoloadable already at the time of declaration. If not, it will * raise a fatal error. This autoloader helps mitigate errors in such * situations. * * - The second is _appended_ in order to create aliases for legacy * classes. */ /** * @var array<string, string> */ protected static $namespaces = ['Nexmo\\' => 'Vonage\\']; /** * @var array<string, string> */ protected static $namespacesReversed = ['Vonage\\' => 'Nexmo\\']; public static function load() : void { $loaded = new ArrayObject([]); spl_autoload_register(self::createPrependAutoloader( static::$namespacesReversed, self::getClassLoader(), $loaded ), true, true); spl_autoload_register(self::createAppendAutoloader( static::$namespaces, $loaded )); } /** * @throws RuntimeException */ private static function getClassLoader() : ClassLoader { if (getenv('COMPOSER_VENDOR_DIR') !== false && file_exists(getenv('COMPOSER_VENDOR_DIR') . '/autoload.php')) { return include getenv('COMPOSER_VENDOR_DIR') . '/autoload.php'; } if (file_exists(__DIR__ . '/../../../autoload.php')) { return include __DIR__ . '/../../../autoload.php'; } if (file_exists(__DIR__ . '/../vendor/autoload.php')) { return include __DIR__ . '/../vendor/autoload.php'; } throw new RuntimeException('Cannot detect composer autoload. Please run composer install'); } /** * @param array<string, string> $namespaces Namespaces to flip between * @return Closure(string): void */ private static function createPrependAutoloader( array $namespaces, ClassLoader $classLoader, ArrayObject $loaded ) : Closure { /** * @param string $class Class name to autoload * @return void */ return static function (string $class) use ($namespaces, $classLoader, $loaded) : void { if (isset($loaded[$class])) { return; } $segments = explode('\\', $class); $i = 0; $check = ''; while (isset($segments[$i + 1], $namespaces[$check . $segments[$i] . '\\'])) { $check .= $segments[$i] . '\\'; ++$i; } if ($check === '') { return; } if ($classLoader->loadClass($class)) { $legacy = $namespaces[$check] . strtr(substr($class, strlen($check)), [ 'Vonage' => 'Nexmo', ]); class_alias($class, $legacy); } }; } /** * @param array<string, string> $namespaces Namespaces to flip between * @return Closure(string): void */ private static function createAppendAutoloader(array $namespaces, ArrayObject $loaded) : Closure { /** * @param string $class Class name to autoload * @return void */ return static function (string $class) use ($namespaces, $loaded) : void { $segments = explode('\\', $class); $i = 0; $check = ''; // We are checking segments of the namespace to match quicker while (isset($segments[$i + 1], $namespaces[$check . $segments[$i] . '\\'])) { $check .= $segments[$i] . '\\'; ++$i; } if ($check === '') { return; } $alias = $namespaces[$check] . strtr(substr($class, strlen($check)), [ 'Nexmo' => 'Vonage', ]); $loaded[$alias] = true; if (class_exists($alias) || interface_exists($alias) || trait_exists($alias)) { class_alias($alias, $class); } }; } } README.md 0000644 00000003334 15111416570 0006027 0 ustar 00 Vonage Nexmo Bridge =================== [](https://github.com/nexmo/vonage-php-nexmo-bridge/actions?query=workflow%3Abuild) [](./LICENSE) [](https://codecov.io/gh/nexmo/vonage-php-nexmo-bridge) <img src="https://developer.nexmo.com/assets/images/Vonage_Nexmo.svg" height="48px" alt="Nexmo is now known as Vonage" /> This library provides a custom autoloader that aliases legacy Nexmo classes, traits, and interfaces to their replacements under the Vonage namespace. This library is handy if you want to switch over to the newer `vonage/client` or `vonage/client-core` libraries but have a lot of older code that utilizes the `\Nexmo` namespace. If you are starting a project from scratch, we recommend immediately using the `\Vonage` namespace. Much of this code has been ported from the [`laminas/laminas-zendframework-bridge`](https://github.com/laminas/laminas-zendframework-bridge) project. ## Installation Run the following to install this library: ```bash $ composer require vonage/nexmo-bridge ``` ## Usage There is none! By including this package, the autoloader will be automatically invoked and will do all the work for you. ## Contributing This library is actively developed and we love to hear from you! Please feel free to [create an issue][issues] or [open a pull request][pulls] with your questions, comments, suggestions and feedback. [issues]: https://github.com/Nexmo/vonage-php-nexmo-bridge/issues [pulls]: https://github.com/Nexmo/vonage-php-nexmo-bridge/pulls LICENSE 0000644 00000002757 15111416570 0005565 0 ustar 00 Copyright (c) 2020 Vonage Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Vonage, Laminas Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. composer.json 0000644 00000001610 15111416570 0007265 0 ustar 00 { "name": "vonage/nexmo-bridge", "description": "Provides a bridge for using the Vonage PHP SDK with the older Nexmo namespace", "type": "library", "license": "BSD-3-Clause", "authors": [ { "name": "Chris Tankersley", "email": "chris.tankersley@vonage.com" } ], "require": { "php": "^7.1 || ^8.0" }, "autoload": { "files": [ "src/autoload.php" ], "psr-4": { "Vonage\\NexmoBridge\\": "src/" } }, "autoload-dev": { "files": [ "test/classes.php" ], "psr-4": { "VonageTest\\NexmoBridge\\": "test/", "Vonage\\": "test/TestAsset/Vonage/" } }, "require-dev": { "phpunit/phpunit": "^7.4", "phpstan/phpstan": "^0.12.39", "squizlabs/php_codesniffer": "^3.5" } }
Simpan