repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Data/Objects/Reviews/Review.php | src/Data/Objects/Reviews/Review.php | <?php
namespace AugmentedSteam\Server\Data\Objects\Reviews;
class Review implements \JsonSerializable
{
public function __construct(
public ?int $score,
public ?string $verdict,
public string $url
) {}
/**
* @return array<string, mixed>
*/
#[\Override]
public func... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Data/Providers/HLTBProvider.php | src/Data/Providers/HLTBProvider.php | <?php
declare(strict_types=1);
namespace AugmentedSteam\Server\Data\Providers;
use AugmentedSteam\Server\Data\Interfaces\AppData\HLTBProviderInterface;
use AugmentedSteam\Server\Data\Objects\HLTB;
use AugmentedSteam\Server\Endpoints\EndpointBuilder;
use AugmentedSteam\Server\Lib\Loader\SimpleLoader;
class HLTBProvid... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Data/Providers/PlayersProvider.php | src/Data/Providers/PlayersProvider.php | <?php
declare(strict_types=1);
namespace AugmentedSteam\Server\Data\Providers;
use AugmentedSteam\Server\Data\Interfaces\AppData\PlayersProviderInterface;
use AugmentedSteam\Server\Data\Objects\Players;
use AugmentedSteam\Server\Endpoints\EndpointBuilder;
use AugmentedSteam\Server\Lib\Loader\SimpleLoader;
class Play... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Data/Providers/EarlyAccessProvider.php | src/Data/Providers/EarlyAccessProvider.php | <?php
namespace AugmentedSteam\Server\Data\Providers;
use AugmentedSteam\Server\Data\Interfaces\EarlyAccessProviderInterface;
use AugmentedSteam\Server\Endpoints\EndpointBuilder;
use AugmentedSteam\Server\Lib\Loader\SimpleLoader;
class EarlyAccessProvider implements EarlyAccessProviderInterface {
public function... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Data/Providers/TwitchProvider.php | src/Data/Providers/TwitchProvider.php | <?php
declare(strict_types=1);
namespace AugmentedSteam\Server\Data\Providers;
use AugmentedSteam\Server\Data\Interfaces\TwitchProviderInterface;
use AugmentedSteam\Server\Data\Objects\TwitchStream;
use AugmentedSteam\Server\Endpoints\EndpointBuilder;
use AugmentedSteam\Server\Lib\Loader\SimpleLoader;
class TwitchPr... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Data/Providers/ExfglsProvider.php | src/Data/Providers/ExfglsProvider.php | <?php
declare(strict_types=1);
namespace AugmentedSteam\Server\Data\Providers;
use AugmentedSteam\Server\Data\Interfaces\ExfglsProviderInterface;
use AugmentedSteam\Server\Endpoints\EndpointBuilder;
use AugmentedSteam\Server\Lib\Loader\SimpleLoader;
class ExfglsProvider implements ExfglsProviderInterface
{
publi... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Data/Providers/WSGFProvider.php | src/Data/Providers/WSGFProvider.php | <?php
declare(strict_types=1);
namespace AugmentedSteam\Server\Data\Providers;
use AugmentedSteam\Server\Data\Interfaces\AppData\WSGFProviderInterface;
use AugmentedSteam\Server\Data\Objects\WSGF;
use AugmentedSteam\Server\Endpoints\EndpointBuilder;
use AugmentedSteam\Server\Lib\Loader\SimpleLoader;
class WSGFProvid... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Data/Providers/RatesProvider.php | src/Data/Providers/RatesProvider.php | <?php
declare(strict_types=1);
namespace AugmentedSteam\Server\Data\Providers;
use AugmentedSteam\Server\Data\Interfaces\RatesProviderInterface;
use AugmentedSteam\Server\Endpoints\EndpointBuilder;
use AugmentedSteam\Server\Lib\Loader\SimpleLoader;
class RatesProvider implements RatesProviderInterface
{
public f... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Data/Providers/SteamRepProvider.php | src/Data/Providers/SteamRepProvider.php | <?php
declare(strict_types=1);
namespace AugmentedSteam\Server\Data\Providers;
use AugmentedSteam\Server\Data\Interfaces\SteamRepProviderInterface;
use AugmentedSteam\Server\Endpoints\EndpointBuilder;
use AugmentedSteam\Server\Lib\Loader\SimpleLoader;
class SteamRepProvider implements SteamRepProviderInterface {
... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Data/Providers/PricesProvider.php | src/Data/Providers/PricesProvider.php | <?php
declare(strict_types=1);
namespace AugmentedSteam\Server\Data\Providers;
use AugmentedSteam\Server\Data\Interfaces\PricesProviderInterface;
use AugmentedSteam\Server\Data\Objects\Prices;
use AugmentedSteam\Server\Endpoints\EndpointBuilder;
use AugmentedSteam\Server\Lib\Redis\ERedisKey;
use AugmentedSteam\Server... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Data/Providers/ReviewsProvider.php | src/Data/Providers/ReviewsProvider.php | <?php
declare(strict_types=1);
namespace AugmentedSteam\Server\Data\Providers;
use AugmentedSteam\Server\Data\Interfaces\AppData\ReviewsProviderInterface;
use AugmentedSteam\Server\Data\Objects\Reviews\Review;
use AugmentedSteam\Server\Data\Objects\Reviews\Reviews;
use AugmentedSteam\Server\Endpoints\EndpointBuilder;... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Data/Providers/SteamPeekProvider.php | src/Data/Providers/SteamPeekProvider.php | <?php
namespace AugmentedSteam\Server\Data\Providers;
use AugmentedSteam\Server\Data\Interfaces\AppData\SteamPeekProviderInterface;
use AugmentedSteam\Server\Data\Objects\SteamPeak\SteamPeekGame;
use AugmentedSteam\Server\Data\Objects\SteamPeak\SteamPeekResults;
use AugmentedSteam\Server\Endpoints\EndpointBuilder;
use... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Environment/Container.php | src/Environment/Container.php | <?php
namespace AugmentedSteam\Server\Environment;
use AugmentedSteam\Server\Config\BrightDataConfig;
use AugmentedSteam\Server\Config\CoreConfig;
use AugmentedSteam\Server\Controllers\AppController;
use AugmentedSteam\Server\Controllers\DLCController;
use AugmentedSteam\Server\Controllers\EarlyAccessController;
use A... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/Environment/Lock.php | src/Environment/Lock.php | <?php
declare(strict_types=1);
namespace AugmentedSteam\Server\Environment;
class Lock
{
private string $path;
public function __construct(string $name) {
$this->path = TEMP_DIR . "/locks/" . basename($name, ".lock") . ".lock";
}
public function isLocked(int $seconds): bool {
clearst... | php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
ihmily/music-api | https://github.com/ihmily/music-api/blob/5e22638f23624ddb20c8f993ea4a4401688d44b5/netease.php | netease.php | <?php
/**
* @Author:Hmily
* @Date:2023-05-20
* @Function:网易云音乐解析
* @Github:https://github.com/ihmily
**/
header('Access-Control-Allow-Origin:*');
header('content-type: application/json;');
$msg = $_GET['msg']; // 需要搜索的歌名
$n = $_GET['n']; // 你要获取下载链接的序号
$type = empty($_GET['type']) ? 'song': $_GET['type']; /... | php | MIT | 5e22638f23624ddb20c8f993ea4a4401688d44b5 | 2026-01-05T04:54:03.223901Z | false |
ihmily/music-api | https://github.com/ihmily/music-api/blob/5e22638f23624ddb20c8f993ea4a4401688d44b5/kuwo.php | kuwo.php | <?php
/**
* @Author:Hmily
* @Date:2023-06-23
* @Function:酷我音乐解析
* @Github:https://github.com/ihmily
**/
header('Access-Control-Allow-Origin:*');
header('content-type: application/json;');
$headers = array(
'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0',
... | php | MIT | 5e22638f23624ddb20c8f993ea4a4401688d44b5 | 2026-01-05T04:54:03.223901Z | false |
ihmily/music-api | https://github.com/ihmily/music-api/blob/5e22638f23624ddb20c8f993ea4a4401688d44b5/kugou.php | kugou.php | <?php
/**
* @Author:Hmily
* @Date:2023-05-28
* @Function:酷狗音乐解析
* @Github:https://github.com/ihmily
**/
header('Access-Control-Allow-Origin:*');
header('content-type: application/json;');
$msg = $_GET['msg'];//需要搜索的歌名
$n = $_GET['n'];//选择(序号)
$type = empty($_GET['type']) ? 'song': $_GET['type'];
$page_limit = ... | php | MIT | 5e22638f23624ddb20c8f993ea4a4401688d44b5 | 2026-01-05T04:54:03.223901Z | false |
ihmily/music-api | https://github.com/ihmily/music-api/blob/5e22638f23624ddb20c8f993ea4a4401688d44b5/qq.php | qq.php | <?php
/**
* @Author:Hmily
* @Date:2023-07-20
* @Function:qq音乐解析
* @Github:https://github.com/ihmily
**/
header('Access-Control-Allow-Origin:*');
header('content-type: application/json;');
$msg = $_GET['msg'];//需要搜索的歌名
$n = $_GET['n'];//选择(序号)
$type = empty($_GET['type']) ? 'song': $_GET['type'];
$page_limit = ... | php | MIT | 5e22638f23624ddb20c8f993ea4a4401688d44b5 | 2026-01-05T04:54:03.223901Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/CoinGeckoClient.php | src/CoinGeckoClient.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi;
use Codenixsv\CoinGeckoApi\Api\Coins;
use Codenixsv\CoinGeckoApi\Api\Contract;
use Codenixsv\CoinGeckoApi\Api\Derivatives;
use Codenixsv\CoinGeckoApi\Api\Events;
use Codenixsv\CoinGeckoApi\Api\ExchangeRates;
use Codenixsv\CoinGeckoApi\Api\Exchanges;
us... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Exceptions/TransformResponseException.php | src/Exceptions/TransformResponseException.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Exception;
use Exception;
/**
* Class TransformResponseException
* @package Codenixsv\CoinGeckoApi\Exception
*/
class TransformResponseException extends Exception
{
}
| php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Message/ResponseTransformer.php | src/Message/ResponseTransformer.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Message;
use Codenixsv\CoinGeckoApi\Exception\TransformResponseException;
use Psr\Http\Message\ResponseInterface;
use Exception;
/**
* Class ResponseTransformer
* @package Codenixsv\CoinGeckoApi\Message
*/
class ResponseTransformer
{
/**
* ... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/Api.php | src/Api/Api.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
use Codenixsv\CoinGeckoApi\Message\ResponseTransformer;
use Exception;
class Api
{
/** @var CoinGeckoClient */
protected $client;
private $version = 'v3';
/** @var ResponseTransformer *... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/Derivatives.php | src/Api/Derivatives.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Exception;
class Derivatives extends Api
{
/**
* @param array $params
* @return array
* @throws Exception
*/
public function getDerivatives(array $params = []): array
{
return $this->get('/derivatives', ... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/Finance.php | src/Api/Finance.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Exception;
class Finance extends Api
{
/**
* @param array $params
* @return array
* @throws Exception
*/
public function getPlatforms(array $params = []): array
{
return $this->get('/finance_platforms', ... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/Events.php | src/Api/Events.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Exception;
class Events extends Api
{
/**
* @param array $params
* @return array
* @throws Exception
*/
public function getEvents(array $params = []): array
{
return $this->get('/events', $params);
}... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/Globals.php | src/Api/Globals.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Exception;
class Globals extends Api
{
/**
* @return array
* @throws Exception
*/
public function getGlobal(): array
{
return $this->get('/global');
}
}
| php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/StatusUpdates.php | src/Api/StatusUpdates.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Exception;
class StatusUpdates extends Api
{
/**
* @param array $params
* @return array
* @throws Exception
*/
public function getStatusUpdates(array $params = []): array
{
return $this->get('/status_upd... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/Contract.php | src/Api/Contract.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Exception;
class Contract extends Api
{
/**
* @param string $id
* @param string $contractAddress
* @return array
* @throws Exception
*/
public function getContract(string $id, string $contractAddress): array
... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/ExchangeRates.php | src/Api/ExchangeRates.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Exception;
class ExchangeRates extends Api
{
/**
* @return array
* @throws Exception
*/
public function getExchangeRates(): array
{
return $this->get('/exchange_rates');
}
}
| php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/Ping.php | src/Api/Ping.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Exception;
class Ping extends Api
{
/**
* @return array
* @throws Exception
*/
public function ping(): array
{
return $this->get('/ping');
}
}
| php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/Simple.php | src/Api/Simple.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Exception;
class Simple extends Api
{
/**
* @param string $ids
* @param string $vsCurrencies
* @param array $params
* @return array
* @throws Exception
*/
public function getPrice(string $ids, string $vsCu... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/Indexes.php | src/Api/Indexes.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Exception;
class Indexes extends Api
{
/**
* @param array $params
* @return array
* @throws Exception
*/
public function getIndexes(array $params = []): array
{
return $this->get('/indexes', $params);
... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/Coins.php | src/Api/Coins.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Exception;
class Coins extends Api
{
/**
* @return array
* @throws Exception
*/
public function getList(): array
{
return $this->get('/coins/list');
}
/**
* @param string $vsCurrency
* @par... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/src/Api/Exchanges.php | src/Api/Exchanges.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Api;
use Exception;
class Exchanges extends Api
{
/**
* @param array $params
* @return array
* @throws Exception
*/
public function getExchanges(array $params = []): array
{
return $this->get('/exchanges', $param... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/CoinGeckoClientTest.php | tests/CoinGeckoClientTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests;
use Codenixsv\CoinGeckoApi\Api\Coins;
use Codenixsv\CoinGeckoApi\Api\Contract;
use Codenixsv\CoinGeckoApi\Api\Derivatives;
use Codenixsv\CoinGeckoApi\Api\Events;
use Codenixsv\CoinGeckoApi\Api\ExchangeRates;
use Codenixsv\CoinGeckoApi\Api\Exchang... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Message/ResponseTransformerTest.php | tests/Message/ResponseTransformerTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Message;
use Codenixsv\CoinGeckoApi\Exception\TransformResponseException;
use Codenixsv\CoinGeckoApi\Message\ResponseTransformer;
use GuzzleHttp\Psr7\Response;
use PHPUnit\Framework\TestCase;
class ResponseTransformerTest extends TestCase
{
p... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/ExchangesTest.php | tests/Api/ExchangesTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use Codenixsv\CoinGeckoApi\Api\Exchanges;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
class ExchangesTest extends ApiTestCase
{
public function testGetExchanges()
{
$this->createApi()->getExchanges();
$request = $thi... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/StatusUpdatesTest.php | tests/Api/StatusUpdatesTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use Codenixsv\CoinGeckoApi\Api\StatusUpdates;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
class StatusUpdatesTest extends ApiTestCase
{
public function testGlobal()
{
$api = new StatusUpdates(new CoinGeckoClient($this->getMoc... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/IndexesTest.php | tests/Api/IndexesTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use Codenixsv\CoinGeckoApi\Api\Indexes;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
class IndexesTest extends ApiTestCase
{
public function testGetIndexes()
{
$this->createApi()->getIndexes();
$request = $this->getLa... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/ExchangeRatesTest.php | tests/Api/ExchangeRatesTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use Codenixsv\CoinGeckoApi\Api\ExchangeRates;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
class ExchangeRatesTest extends ApiTestCase
{
public function testGetExchangeRates()
{
$api = new ExchangeRates(new CoinGeckoClient($th... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/FinanceTest.php | tests/Api/FinanceTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use Codenixsv\CoinGeckoApi\Api\Finance;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
class FinanceTest extends ApiTestCase
{
public function testGetPlatforms()
{
$this->createApi()->getPlatforms();
$request = $this->g... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/CoinsTest.php | tests/Api/CoinsTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use Codenixsv\CoinGeckoApi\Api\Coins;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
class CoinsTest extends ApiTestCase
{
public function testGetList()
{
$this->createApi()->getList();
$request = $this->getLastRequest(... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/ApiTestCase.php | tests/Api/ApiTestCase.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use GuzzleHttp\Client;
use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
use GuzzleHttp\Psr7\Response;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\RequestInterface;
class ApiTestCase extends... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/ContractTest.php | tests/Api/ContractTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use Codenixsv\CoinGeckoApi\Api\Contract;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
class ContractTest extends ApiTestCase
{
public function testGetContract()
{
$this->createApi()->getContract('ethereum', '0xE41d2489571d3221... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/PingTest.php | tests/Api/PingTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use Codenixsv\CoinGeckoApi\Api\Ping;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
class PingTest extends ApiTestCase
{
public function testPing()
{
$api = new Ping(new CoinGeckoClient($this->getMockClient()));
$api->pi... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/DerivativesTest.php | tests/Api/DerivativesTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use Codenixsv\CoinGeckoApi\Api\Derivatives;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
class DerivativesTest extends ApiTestCase
{
public function testGetDerivatives()
{
$this->createApi()->getDerivatives();
$reques... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/SimpleTest.php | tests/Api/SimpleTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use Codenixsv\CoinGeckoApi\Api\Simple;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
class SimpleTest extends ApiTestCase
{
public function testGetPrice()
{
$this->createApi()->getPrice('0x,bitcoin', 'usd,rub');
$reque... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/EventsTest.php | tests/Api/EventsTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use Codenixsv\CoinGeckoApi\Api\Events;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
class EventsTest extends ApiTestCase
{
public function testGetEvents()
{
$this->createApi()->getEvents();
$request = $this->getLastRe... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
codenix-sv/coingecko-api | https://github.com/codenix-sv/coingecko-api/blob/53996fc09eb903d08a80fbeb7bc8c4f24553c144/tests/Api/GlobalsTest.php | tests/Api/GlobalsTest.php | <?php
declare(strict_types=1);
namespace Codenixsv\CoinGeckoApi\Tests\Api;
use Codenixsv\CoinGeckoApi\Api\Globals;
use Codenixsv\CoinGeckoApi\CoinGeckoClient;
class GlobalsTest extends ApiTestCase
{
public function testGlobal()
{
$api = new Globals(new CoinGeckoClient($this->getMockClient()));
... | php | MIT | 53996fc09eb903d08a80fbeb7bc8c4f24553c144 | 2026-01-05T04:54:14.425104Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/app/controllers/Welcome.php | app/controllers/Welcome.php | <?php
class Welcome extends GPController {
public function index() {
GP::view('welcome_view');
}
}
| php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/app/models/StubModel.php | app/models/StubModel.php | <?php
/**
* This stub is here so that git keeps track of this folder. Feel free to delete
*/
final class StubModel extends GPNode {
}
| php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/app/views/welcome_view.php | app/views/welcome_view.php | <html>
<head>
<title>Welcome page</title>
<style type="text/css">
.box {
border: solid black 1px;
width: 500px;
margin:100px auto 0 auto;
padding: 10px;
text-align: center;
}
.header {
color: blue;
}
</style>
</head>
<body>
<d... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/app/libraries/StubLibrary.php | app/libraries/StubLibrary.php | <?php
/**
* This stub is here so that git keeps track of this folder. Feel free to delete
*/
final class StubLibrary extends GPObject {
}
| php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/model/GPEdgeType.php | graphp/model/GPEdgeType.php | <?php
class GPEdgeType extends GPObject {
private $fromType;
private $to;
private $name;
private $storageKey;
private $singleNodeName;
private $inverse;
private $type;
public function __construct($to, $name = '', $storage_key = '') {
$this->to = $to;
$this->name = $name ? $name : $to;
$th... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/model/GPBatch.php | graphp/model/GPBatch.php | <?php
final class GPBatch extends GPObject {
private $nodes = [];
private $classes = [];
private $lazy;
private $lazyEdges = [];
private $lazyForce = false;
public function __construct(array $nodes, $lazy) {
$this->nodes = $nodes;
$this->classes = array_unique(array_map(
function($node) { r... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/model/GPNodeMap.php | graphp/model/GPNodeMap.php | <?php
class GPNodeMap extends GPObject {
private static $inverseMap = [];
private static $map = [];
private static function getMap() {
if (!self::$map) {
self::$map = is_readable(self::buildPath()) ? include self::buildPath() : null;
}
return self::$map ?: [];
}
private static function ... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/model/GPNodeMagicMethods.php | graphp/model/GPNodeMagicMethods.php | <?php
trait GPNodeMagicMethods {
private static $methodCache = [];
// Magic API:
//
// getX() should only work if the node has a GPDataType with the name x
// returned by getDataTypeImpl() or if the node has a GPEdgeType with that
// name that has previously loaded. Calling getX on an unloaded edge will
... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/model/GPNode.php | graphp/model/GPNode.php | <?php
abstract class GPNode extends GPObject {
use GPNodeLoader;
use GPNodeMagicMethods;
use GPBatchLoader;
use GPNodeEdgeCreator;
private
$data,
$id,
$updated,
$created,
// array([edge_type] => [array of nodes indexed by id])
$connectedNodeIDs = [],
$connectedNodes = [],
$p... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/model/GPDataType.php | graphp/model/GPDataType.php | <?php
class GPDataType extends GPObject {
use GPDataTypeCreator;
const GP_INT = 'is_int';
const GP_NODE_ID = 'is_int';
const GP_FLOAT = 'is_float';
const GP_NUMBER = 'is_numeric';
const GP_ARRAY = 'is_array';
const GP_STRING = 'is_string';
const GP_BOOL = 'is_bool';
const GP_ANY = 'is_any';
priv... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/model/GPNodeLoader.php | graphp/model/GPNodeLoader.php | <?php
trait GPNodeLoader {
private static $cache = [];
public static function createFromType($type, array $data = []) {
$class = GPNodeMap::getClass($type);
return new $class($data);
}
private static function nodeFromArray(array $data) {
$class = GPNodeMap::getClass($data['type']);
$node = n... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/model/GPBatchLoader.php | graphp/model/GPBatchLoader.php | <?php
trait GPBatchLoader {
public static function batchSave(array $nodes) {
$db = GPDatabase::get();
$db->startTransaction();
foreach ($nodes as $node) {
$node->save();
}
$db->commit();
}
public static function batchDelete(array $nodes) {
$db = GPDatabase::get();
$db->startTr... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/model/traits/GPNodeEdgeCreator.php | graphp/model/traits/GPNodeEdgeCreator.php | <?php
trait GPNodeEdgeCreator {
public static function edge(string $name = null) {
return new GPEdgeType(get_called_class(), $name ?: STR::pluralize(get_called_class()));
}
public static function singleEdge(string $single_name = null, string $plural_name = null) {
$defaulted_single_name = $single_name ... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/model/traits/GPDataTypeCreator.php | graphp/model/traits/GPDataTypeCreator.php | <?php
trait GPDataTypeCreator {
public static function array($name, ...$args) {
return new GPDataType($name, GPDataType::GP_ARRAY, ...$args);
}
public static function string($name, ...$args) {
return new GPDataType($name, GPDataType::GP_STRING, ...$args);
}
public static function bool($name, ...$a... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/tests/GPBatchTest.php | graphp/tests/GPBatchTest.php | <?php
class GPTestBatchModel extends GPNode {
public static $customDelete = false;
protected static function getDataTypesImpl() {
return [
new GPDataType('name', GPDataType::GP_STRING, true),
new GPDataType('age', GPDataType::GP_INT),
];
}
protected static function getEdgeTypesImpl() {
... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/tests/GPLoadByRangeTest.php | graphp/tests/GPLoadByRangeTest.php | <?php
class GPTestRangeModel extends GPNode {
protected static function getDataTypesImpl() {
return [
GPDataType::string('firstName', true),
GPDataType::int('age', true),
GPDataType::string('sex', true),
];
}
}
class GPLoadByRangeTest extends GPTest {
public static function setUpBefo... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/tests/GPEdgeTest.php | graphp/tests/GPEdgeTest.php | <?php
class GPTestModel1 extends GPNode {
protected static function getEdgeTypesImpl() {
return [
(new GPEdgeType(GPTestModel2::class))->setSingleNodeName('Foo'),
];
}
}
class GPTestModel2 extends GPNode {
}
class GPEdgeTest extends GPTest {
public static function setUpBeforeClass(): void {
... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/tests/GPTestLimitLoadTest.php | graphp/tests/GPTestLimitLoadTest.php | <?php
class GPTestLimitLoadModel extends GPNode {
protected static function getEdgeTypesImpl() {
return [
new GPEdgeType(GPTestLimitLoadModel2::class),
];
}
}
class GPTestLimitLoadModel2 extends GPNode {}
class GPTestLimitLoadTest extends GPTest {
public static function setUpBeforeClass(): void... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/tests/GPModelTest.php | graphp/tests/GPModelTest.php | <?php
class GPTestModel extends GPNode {
protected static function getDataTypesImpl() {
return [
new GPDataType('name', GPDataType::GP_STRING, true),
new GPDataType('age', GPDataType::GP_INT),
new GPDataType('currency', GPDataType::GP_STRING, false, 'USD'),
];
}
}
class GPTestOtherModel... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/tests/GPEdgeCountTest.php | graphp/tests/GPEdgeCountTest.php | <?php
class GPTestCountModel1 extends GPNode {
protected static function getEdgeTypesImpl() {
return [
(new GPEdgeType(GPTestCountModel2::class))->setSingleNodeName('Foo'),
];
}
}
class GPTestCountModel2 extends GPNode {
}
class GPEdgeCountTest extends GPTest {
public static function setUpBefo... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/tests/GPBatchLoaderTest.php | graphp/tests/GPBatchLoaderTest.php | <?php
class GPTestBatchLoaderModel extends GPNode {
public static $customDelete = false;
protected static function getDataTypesImpl() {
return [
new GPDataType('name', GPDataType::GP_STRING, true),
new GPDataType('age', GPDataType::GP_INT),
];
}
protected static function getEdgeTypesImpl... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/tests/bootstrap.php | graphp/tests/bootstrap.php | <?php
// This is used to bootstrap the framework without routing.
// It is useful for tests and other require() cases.
// For cli, you can use public/index.php and provide a controller and method
// as arguments.
define('ROOT_PATH', __DIR__.'/../../');
date_default_timezone_set('UTC');
try {
require_once ROOT_PATH... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/tests/GPEdgeInverseTest.php | graphp/tests/GPEdgeInverseTest.php | <?php
class GPEdgeInverseTestModel1 extends GPNode {
protected static function getEdgeTypesImpl() {
return [
(new GPEdgeType(GPEdgeInverseTestModel2::class))
->inverse(GPEdgeInverseTestModel2::getEdgeType(
GPEdgeInverseTestModel1::class
)),
];
}
}
class GPEdgeInverseTestMo... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/tests/GPControllerHandlerTest.php | graphp/tests/GPControllerHandlerTest.php | <?php
class TestController extends GPController {
public function foo($var) {
}
}
class GPControllerHandlerTest extends GPTest {
public function testURI() {
$index = GPConfig::get()->use_index_php ? '/index.php' : '';
$uri = TestController::URI()->foo('abc');
$this->assertEquals($uri, $index.'/te... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/utils/arrays.php | graphp/utils/arrays.php | <?php
/**
* idxx
*
* @param mixed \array Description.
* @param mixed $key Description.
*
* @access public
*
* @return mixed Value.
*/
function idxx(array $array, $key, $message = '') {
if (!array_key_exists($key, $array)) {
throw new GPException(
$message ?: $key.' not in array: '.json_enco... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/utils/STRUtils.php | graphp/utils/STRUtils.php | <?php
class STRUtils {
public static function to64BitInt($string) {
$hash = substr(md5($string), 17); // truncate to 64 bits
return (int) base_convert($hash, 16, 10); // base 10
}
/**
* Basic HTML escaping for user input
* @param string $str String to be escaped.
* @return string
*/
publ... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/utils/Assert.php | graphp/utils/Assert.php | <?php
class Assert extends GPObject {
public static function true($var, $message = '') {
if ($var !== true) {
throw new GPException(
$message ?: 'Failed asserting that '.$var.' is true - '
);
}
}
public static function truthy($var, $message = '') {
if (!$var) {
throw new G... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/lib/GPRouteGenerator.php | graphp/lib/GPRouteGenerator.php | <?php
class GPRouteGenerator extends GPObject {
private $path;
private $controller;
private $method;
private $args;
public function __construct($uri = '') {
$this->path = explode('/', parse_url($uri)['path']);
}
public static function createFromParts($controller, $method = 'index', ...$args) {
... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/lib/GPProfiler.php | graphp/lib/GPProfiler.php | <?php
final class GPProfiler {
private static $enabled = false;
private static $queryData = [];
private static $marks = [];
public static function enable() {
if (self::$enabled) {
return;
}
self::$enabled = true;
self::$marks[] = [
'uri' => idx($_SERVER, 'REQUEST_URI', ''),
... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPURLControllerHandler.php | graphp/core/GPURLControllerHandler.php | <?php
final class GPURLControllerHandler extends GPURIControllerHandler {
public function handle($method, array $args) {
return GPConfig::get()->domain.parent::handle($method, $args);
}
}
| php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPLibrary.php | graphp/core/GPLibrary.php | <?php
class GPLibrary extends GPController {
public function isAllowed(string $method): bool {
if (GP::isCLI()) {
return true;
}
return false;
}
}
| php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPConfig.php | graphp/core/GPConfig.php | <?php
class GPConfig extends GPObject {
private static $configs = [];
private $config;
private $name;
public static function get($name = 'general') {
if (!isset(self::$configs[$name])) {
self::$configs[$name] = new GPConfig($name);
}
return self::$configs[$name];
}
protected function ... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPRouter.php | graphp/core/GPRouter.php | <?php
class GPRouter extends GPObject {
private static $routes;
private static $parts;
private static $controller;
private static $method;
public static function init() {
self::$routes = require_once ROOT_PATH.'config/routes.php';
self::$parts = self::getParts();
}
public static function route... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPObject.php | graphp/core/GPObject.php | <?php
class GPObject {
private static $classConstants = [];
private static $classConstantsFlip = [];
public static function assertConstValueExists($name) {
idxx(self::getClassConstantsFlip(), $name);
}
public static function getClassConstants() {
if (!array_key_exists(get_called_class(), self::$cl... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPTest.php | graphp/core/GPTest.php | <?php
use PHPUnit\Framework\TestCase;
abstract class GPTest extends TestCase {
public function __construct() {
parent::__construct();
GPEnv::isTest();
}
}
| php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPDatabase.php | graphp/core/GPDatabase.php | <?php
class GPDatabase extends GPObject {
public const LIMIT = 100;
private const NODE_SELECT =
'SELECT id, type, data, UNIX_TIMESTAMP(created) AS created, UNIX_TIMESTAMP(updated) AS updated';
private static $dbs = [];
private $connection;
private $guard;
private $nestedTransactions = 0;
private ... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPRequestData.php | graphp/core/GPRequestData.php | <?php
class GPRequestData extends GPObject {
private $data;
public function __construct(array $data) {
$this->data = $data;
}
public function getData() {
return $this->data;
}
public function getInt($key, $default = null) {
$val = $this->get($key, 'is_numeric');
return $val !== null ? ... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPController.php | graphp/core/GPController.php | <?php
class GPController extends GPObject {
protected $post;
protected $get;
private static $coreHandlers = [
'async' => true,
'redirect' => true,
'uri' => true,
'url' => true,
];
public function init() {
$post_json_data = (array) json_decode(file_get_contents('php://input'), true);
... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPEnv.php | graphp/core/GPEnv.php | <?php
final class GPEnv extends GPObject {
private static $isTestEnv = false;
public static function isTest() {
self::$isTestEnv = true;
}
public static function isTestEnv() {
return self::$isTestEnv;
}
public static function assertTestEnv() {
Assert::true(self::isTestEnv());
}
public ... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPErrorText.php | graphp/core/GPErrorText.php | <?php
final class GPErrorText extends GPObject {
public static function missingEdges($edges, GPNode $obj, array $loaded_ids) {
$to_load = mpull($edges, 'getName');
$possible = array_values(mpull($obj::getEdgeTypes(), 'getName'));
$loaded = array_values(mpull(
array_select_keys($obj::getEdgeTypes()... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPAsyncControllerHandler.php | graphp/core/GPAsyncControllerHandler.php | <?php
class GPAsyncControllerHandler extends GPURIControllerHandler {
private $handled = false;
public function handle($method, array $args) {
$this->handled = true;
$uri = parent::handle($method, $args);
$log = ini_get('error_log') ?: '/dev/null';
execx('php '.ROOT_PATH.'public/index.php %s >> '... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPLoader.php | graphp/core/GPLoader.php | <?php
// We load a couple of things up front. Everything else gets loaded on demand.
class GPException extends Exception {}
require_once ROOT_PATH.'graphp/utils/arrays.php';
require_once ROOT_PATH.'graphp/core/GPObject.php';
require_once ROOT_PATH.'graphp/core/GPFileMap.php';
require_once ROOT_PATH.'graphp/core/GPConf... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPFileMap.php | graphp/core/GPFileMap.php | <?php
class GPFileMap extends GPObject {
private $map = [];
private $dir;
private $name;
public function __construct($dirs, $name) {
$this->dirs = make_array($dirs);
$this->name = $name;
$map = is_readable($this->buildPath()) ? include $this->buildPath() : null;
$this->map = $map ?: [];
}
... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPURIControllerHandler.php | graphp/core/GPURIControllerHandler.php | <?php
class GPURIControllerHandler
extends GPControllerHandler
implements JsonSerializable {
public function handle($method, array $args) {
$index = GPConfig::get()->use_index_php ? '/index.php' : '';
return $index.'/'.strtolower($this->controller).'/'.$method.
($args ? '/'.implode('/', $args) : '... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPControllerHandler.php | graphp/core/GPControllerHandler.php | <?php
/**
* Controller handlers give you an easy way of extending controller
* functionality and syntax without having to modify any core code. This makes
* controller addons and extensions plug and play. Some basic extensions will be
* included: URI, URL, Async, redirect
*
* Some creative uses could be:
* -> R... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPRedirectControllerHandler.php | graphp/core/GPRedirectControllerHandler.php | <?php
class GPRedirectControllerHandler extends GPURIControllerHandler {
private $handled = false;
public function handle($method, array $args) {
$this->handled = true;
// The autoloader will not work if PHP is shutting down.
if (class_exists('GPDatabase', false)) {
GPDatabase::disposeAll();
... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPSession.php | graphp/core/GPSession.php | <?php
class GPSession extends GPObject {
const UID = 'uid';
private static $config;
private static $session;
public static function init() {
self::$config = GPConfig::get();
$json_with_hash = idx($_COOKIE, self::$config->cookie_name, '');
$json = '[]';
if ($json_with_hash) {
if (!GPSec... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/graphp/core/GPSecurity.php | graphp/core/GPSecurity.php | <?php
class GPSecurity extends GPObject {
const EXPIRATION = 86400;
private static $config;
private static $token;
public static function init() {
self::$config = GPConfig::get();
}
public static function getNewCSRFToken() {
$time = time();
$id = GPSession::get(GPSession::UID);
return s... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/public/index.php | public/index.php | <?php
define('ROOT_PATH', __DIR__.'/../');
date_default_timezone_set('UTC');
try {
require_once ROOT_PATH.'graphp/core/GPLoader.php';
GPRouter::init();
GPRouter::route();
} catch (Exception $e) {
$error = [
'There was an exception:',
$e->getMessage(),
$e->getTraceAsString(),
];
if (GPEnv::is... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/config/database.php | config/database.php | <?php
return [
'host' => '127.0.0.1',
'database' => 'graphp',
'user' => 'graphp',
'pass' => 'graphp',
'port' => 0,
];
| php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
mikeland73/graphp | https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/config/general.php | config/general.php | <?php
return [
'is_dev' => true,
'domain' => 'localhost',
'use_index_php' => true, // To avoid this, you need to configure your server
'handler_suffix' => 'ControllerHandler',
// Security
'salt' => 'CHANGE THIS TO ANY RANDOM STRING',
'admin_enabled' => true,
'cookie_exp' =>... | php | MIT | 5f55bbb2eae1e058f83e831baaaec728a9c10dfd | 2026-01-05T04:54:31.965184Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.