Server IP : 162.213.251.212 / Your IP : 3.145.81.198 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/allssztx/public_html/easybuyer/vendor/facade/ignition/src/Support/Packagist/ |
Upload File : |
<?php namespace Facade\Ignition\Support\Packagist; class Packagist { /** * @param string $className * * @return \Facade\Ignition\Support\Packagist\Package[] */ public static function findPackagesForClassName(string $className): array { $parts = explode('\\', $className); $queryParts = array_splice($parts, 0, 2); $url = 'https://packagist.org/search.json?q='.implode(' ', $queryParts); try { $packages = json_decode(file_get_contents($url)); } catch (\Exception $e) { return []; } return array_map(function ($packageProperties) { return new Package((array) $packageProperties); }, $packages->results); } }