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
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/config/routes.php
config/routes.php
<?php return [ // default route. You can rmeove if you don't want one. '__default__' => ['welcome', 'index'], // Custom regex routes, "#" not allowed. Don't end with slash if // you want non slash to match (or use /?). Use capture groups for arguments: // '^/id/(\d+)/?$' => ['Controller', 'index'], passes t...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/controllers/Users.php
sample_app/controllers/Users.php
<?php final class Users extends GPController { public function login() { $email = $this->post->getString('email'); $password = $this->post->getString('password'); $user = User::getOneByEmail($email); if (!$user || !password_verify($password, $user->getPassword())) { Welcome::redirect(); } ...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/controllers/Posts.php
sample_app/controllers/Posts.php
<?php final class Posts extends GPController { public function __construct() { if (!GPSession::get('user_id')) { Welcome::redirect(); } } public function index() { GP::view('post_list', ['posts' => Post::getAll()]); } public function one($id) { $post = Post::getByID($id); if (!$p...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/controllers/Welcome.php
sample_app/controllers/Welcome.php
<?php class Welcome extends GPController { public function index() { GP::view('login_view'); } }
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/controllers/admin/Admin.php
sample_app/controllers/admin/Admin.php
<?php class Admin extends GPController { public function __construct() { if (!GPConfig::get()->admin_enabled) { GP::return404(); } } public function index() { $data = [ 'types' => GPNodeMap::regenAndGetAllTypes(), 'counts' => ipull(GPDatabase::get()->getTypeCounts(), 'count', 'typ...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/controllers/admin/AdminAjax.php
sample_app/controllers/admin/AdminAjax.php
<?php class AdminAjax extends GPController { public function __construct() { if (!GPConfig::get()->admin_enabled) { GP::return404(); } } public function create($type) { if ($this->post->getExists('create')) { GPNode::createFromType($type)->save(); } Admin::redirect()->node_type(...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/models/User.php
sample_app/models/User.php
<?php final class User extends GPNode { protected static function getDataTypesImpl() { return [ new GPDataType('email', GPDataType::GP_STRING, true), new GPDataType('password', GPDataType::GP_STRING), ]; } protected static function getEdgeTypesImpl() { return [ (new GPEdgeType(Pos...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/models/Comment.php
sample_app/models/Comment.php
<?php final class Comment extends GPNode { protected static function getDataTypesImpl() { return [ new GPDataType('text', GPDataType::GP_STRING), ]; } protected static function getEdgeTypesImpl() { return [ (new GPEdgeType(Post::class))->setSingleNodeName('post'), (new GPEdgeType(...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/models/Post.php
sample_app/models/Post.php
<?php final class Post extends GPNode { protected static function getDataTypesImpl() { return [ new GPDataType('text', GPDataType::GP_STRING), ]; } protected static function getEdgeTypesImpl() { return [ (new GPEdgeType(Comment::class, 'comments')) ->inverse(Comment::getEdgeType...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/views/one_post.php
sample_app/views/one_post.php
<p> <?=$post->getText()?> </p> <label>Comments:</label> <ul> <?php foreach ($post->getComments() as $comment):?> <li><?=$comment->getText()?></li> <?php endforeach ?> </ul> <form method="POST" action="<?=Posts::URI()->createComment()?>"> <label>New Comment:</label> <textarea name="text"></textarea> <but...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/views/login_view.php
sample_app/views/login_view.php
<form method="POST" action="<?=Users::URI()->create()?>"> <label>New User</label> <label>Email:</label> <input type="email" name="email" required> <label>Password:</label> <input type="password" name="password" required> <button>Submit</button> <?=GPSecurity::csrf()?> </form> <form method="POST" action="...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/views/post_list.php
sample_app/views/post_list.php
<form method="POST" action="<?=Posts::URI()->create()?>"> <label>New Post:</label> <textarea name="text"></textarea> <button>Create</button> <?=GPSecurity::csrf()?> </form> <ul> <?php foreach ($posts as $post):?> <li> <a href="<?=Posts::URI()->one($post->getID())?>"> <?=StringLibrary::trunca...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/views/admin/node_view.php
sample_app/views/admin/node_view.php
<a href="<?=Admin::URI()->node_type($node::getType())?>"> back to <?= get_class($node) ?> list </a> <h2><?= get_class($node) ?> ID <?= $node->getID() ?></h2> <h3>Data:</h3> <div class="table-responsive"> <table class="table table-bordered table-striped"> <thead> <tr> <th scope="col" class="col-xs-...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/views/admin/edge_view.php
sample_app/views/admin/edge_view.php
<h1>Edges</h1> <div class="table-responsive"> <table class="table table-bordered table-striped"> <thead> <tr> <th scope="col" class="col-xs-4">Type</th> <th scope="col" class="col-xs-4">Name</th> <th scope="col" class="col-xs-4">From Type</th> <th scope="col" class="col-xs-4"...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/views/admin/node_type_view.php
sample_app/views/admin/node_type_view.php
<h3> <form action="<?=AdminAjax::URI()->create($type)?>" method="POST"> <?=GPSecurity::csrf()?> <?=$name?> <button class="btn btn-primary"> New <?=$name?> </button> <input name="create" type="hidden"> </form> </h3> <div class="table-responsive"> <table class="table table-striped"> <...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/views/admin/explore_view.php
sample_app/views/admin/explore_view.php
<h3>Node Types</h3> <div class="table-responsive"> <table class="table table-striped"> <thead> <tr> <th>Type</th> <th>Name</th> <th>Count</th> </tr> </thead> <tbody> <?php foreach ($types as $id => $name): ?> <tr> <td><a href="<?=Admin::URI()->no...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/views/layout/admin_layout.php
sample_app/views/layout/admin_layout.php
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Node Explorer</title> <!-- Bootstrap --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.co...
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
mikeland73/graphp
https://github.com/mikeland73/graphp/blob/5f55bbb2eae1e058f83e831baaaec728a9c10dfd/sample_app/libraries/StringLibrary.php
sample_app/libraries/StringLibrary.php
<?php final class StringLibrary extends GPObject { public static function truncate($string, $length) { if (mb_strlen($string) > $length) { $string = mb_substr($string, 0, $length - 3).'...'; } return $string; } }
php
MIT
5f55bbb2eae1e058f83e831baaaec728a9c10dfd
2026-01-05T04:54:31.965184Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/ecs.php
ecs.php
<?php declare(strict_types=1); use PhpCsFixer\Fixer\Basic\NoTrailingCommaInSinglelineFixer; use PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer; use PhpCsFixer\Fixer\FunctionNotation\NativeFunctionInvocationFixer; use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer; use PhpCsFixer\Fixer\Import\OrderedImportsFixer; use ...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/SwordBundle.php
src/SwordBundle.php
<?php declare(strict_types=1); namespace Sword\SwordBundle; use Sword\SwordBundle\DependencyInjection\Compiler\WordpressPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; final class SwordBundle extends Bundle { public function getPath(): string ...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Event/WooCommerceRegistrationEvent.php
src/Event/WooCommerceRegistrationEvent.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Event; use Symfony\Contracts\EventDispatcher\Event; final class WooCommerceRegistrationEvent extends Event { public function __construct( public readonly int $customerId, public readonly array $customerData, ) { } }
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Entity/WordpressEntityInterface.php
src/Entity/WordpressEntityInterface.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Entity; interface WordpressEntityInterface { }
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Controller/ReauthenticateController.php
src/Controller/ReauthenticateController.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Controller; use Sword\SwordBundle\Loader\WordpressLoader; use Sword\SwordBundle\Security\UserReauthenticator; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Controller/WordpressController.php
src/Controller/WordpressController.php
<?php namespace Sword\SwordBundle\Controller; use Sword\SwordBundle\Loader\WordpressLoader; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Attribute\AsController; use Symfony\Component\Routing\Annotation\Route; #[AsCon...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Controller/Routes.php
src/Controller/Routes.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Controller; final class Routes { public const WORDPRESS = 'sword_wordpress'; public const REAUTHENTICATE = 'sword_reauthenticate'; }
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Translation/ChildThemeTranslationInitializer.php
src/Translation/ChildThemeTranslationInitializer.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Translation; use Sword\SwordBundle\Service\AbstractWordpressService; use Symfony\Component\DependencyInjection\Attribute\Autowire; final class ChildThemeTranslationInitializer extends AbstractWordpressService { public function __construct( #[Aut...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Translation/LocaleSwitcher.php
src/Translation/LocaleSwitcher.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Translation; use Sword\SwordBundle\Service\AbstractWordpressService; use Symfony\Component\Translation\LocaleSwitcher as SymfonyLocaleSwitcher; final class LocaleSwitcher extends AbstractWordpressService { public function __construct( private re...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/DependencyInjection/SwordExtension.php
src/DependencyInjection/SwordExtension.php
<?php namespace Sword\SwordBundle\DependencyInjection; use Doctrine\Bundle\DoctrineBundle\Dbal\RegexSchemaAssetFilter; use ReflectionClass; use Sword\SwordBundle\Service\WordpressService; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Depend...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/DependencyInjection/Configuration.php
src/DependencyInjection/Configuration.php
<?php namespace Sword\SwordBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; final class Configuration implements ConfigurationInterface { public function getConfigTreeBuilder(): TreeBuilder { $tree...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/DependencyInjection/Compiler/WordpressPass.php
src/DependencyInjection/Compiler/WordpressPass.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\DependencyInjection\Compiler; use Sword\SwordBundle\Store\WordpressWidgetStore; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; final class WordpressPass implements Compil...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Exception/WordpressLoginSuccessfulException.php
src/Exception/WordpressLoginSuccessfulException.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Exception; final class WordpressLoginSuccessfulException extends \Exception { public function __construct( public readonly string $username, public readonly string $password, public readonly bool $rememberMe, ) { paren...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Exception/WordpressLougoutSuccessfulException.php
src/Exception/WordpressLougoutSuccessfulException.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Exception; use Symfony\Component\HttpFoundation\Response; final class WordpressLougoutSuccessfulException extends \Exception { public function __construct( public readonly Response $response ) { parent::__construct(); } }
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Helper/ContainerHelper.php
src/Helper/ContainerHelper.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Helper; use Sword\SwordBundle\Loader\WordpressLoader; use Sword\SwordBundle\Service\WordpressService; /** * @template T * @param class-string<T> $serviceId * @return T */ function get_symfony_service(string $serviceId): mixed { /** @var WordpressLoa...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Loader/wp-load.php
src/Loader/wp-load.php
<?php /** * This file is included at the end of the project's `wp-config.php`. */ // Redefines globals that had been unset global $action;
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Loader/WordpressLoader.php
src/Loader/WordpressLoader.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Loader; use Sword\SwordBundle\Event\WooCommerceRegistrationEvent; use Sword\SwordBundle\Exception\WordpressLoginSuccessfulException; use Sword\SwordBundle\Exception\WordpressLougoutSuccessfulException; use Sword\SwordBundle\Security\UserAuthenticator; use Sw...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Loader/WordpressGlobals.php
src/Loader/WordpressGlobals.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Loader; final class WordpressGlobals { public const GLOBALS = [ '_links_add_base', '_links_add_target', '_menu_item_sort_prop', '_nav_menu_placeholder', '_new_bundled_files', '_old_files', '_parent_...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Loader/LazyServiceInstantiator.php
src/Loader/LazyServiceInstantiator.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Loader; use Sword\SwordBundle\Store\WordpressWidgetStore; use Symfony\Component\DependencyInjection\Attribute\Autowire; final class LazyServiceInstantiator { public function __construct( private readonly WordpressWidgetStore $widgetsStore, ...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Attribute/AsWordpressCommand.php
src/Attribute/AsWordpressCommand.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Attribute; use Symfony\Component\Console\Attribute\AsCommand; #[\Attribute(\Attribute::TARGET_CLASS)] final class AsWordpressCommand extends AsCommand { }
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Widget/DefineWidgetTrait.php
src/Widget/DefineWidgetTrait.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Widget; trait DefineWidgetTrait { private function defineWidget( string $id, string $name, string $description, string $cssClass, array $fields, ): void { $this->widget_id = $id; $this->widget_n...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Store/WordpressWidgetStore.php
src/Store/WordpressWidgetStore.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Store; final class WordpressWidgetStore { private array $widgets = []; public function getWidgets(): array { return $this->widgets; } public function addWidget(string $widget): void { $this->widgets[$widget] = $widge...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/EnvVarProcessor/AutoFileEnvVarProcessor.php
src/EnvVarProcessor/AutoFileEnvVarProcessor.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\EnvVarProcessor; use Symfony\Component\DependencyInjection\EnvVarProcessorInterface; final class AutoFileEnvVarProcessor implements EnvVarProcessorInterface { public function getEnv(string $prefix, string $name, \Closure $getEnv): string|array|bool|null...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/EventListener/WordpressTablePrefixEventListener.php
src/EventListener/WordpressTablePrefixEventListener.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\EventListener; use Doctrine\Bundle\DoctrineBundle\Attribute\AsDoctrineListener; use Doctrine\ORM\Event\LoadClassMetadataEventArgs; use Doctrine\ORM\Events; use Doctrine\ORM\Mapping\ClassMetadataInfo; use Sword\SwordBundle\Entity\WordpressEntityInterface; use...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/EventListener/WordpressLoggedInStatusCheckEventSubscriber.php
src/EventListener/WordpressLoggedInStatusCheckEventSubscriber.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\EventListener; use Sword\SwordBundle\Controller\Routes; use Sword\SwordBundle\Loader\WordpressLoader; use Sword\SwordBundle\Security\UserReauthenticator; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\EventDispatcher\Even...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/EventListener/WordpressTerminateEventListener.php
src/EventListener/WordpressTerminateEventListener.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\EventListener; use Sword\SwordBundle\Controller\Routes; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpK...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Security/UserAuthenticator.php
src/Security/UserAuthenticator.php
<?php namespace Sword\SwordBundle\Security; use Psr\EventDispatcher\EventDispatcherInterface; use Sword\SwordBundle\Controller\Routes; use Sword\SwordBundle\Event\WooCommerceRegistrationEvent; use Sword\SwordBundle\Exception\WordpressLoginSuccessfulException; use Sword\SwordBundle\Exception\WordpressLougoutSuccessful...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Security/User.php
src/Security/User.php
<?php namespace Sword\SwordBundle\Security; use DateTime; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use Sword\SwordBundle\Entity\WordpressEntityInterface; use Symfony\Component\Security\Core\User\EquatableInterface; use Symfony\Component\Security\Core\User\PasswordAuthenticated...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Security/UserReauthenticator.php
src/Security/UserReauthenticator.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Security; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\DependencyInjection\ServiceLocator; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Security\Core\User\UserCheckerInterface; final class U...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Security/UserProvider.php
src/Security/UserProvider.php
<?php namespace Sword\SwordBundle\Security; use Doctrine\ORM\EntityManagerInterface as DoctrineEntityManagerInterface; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\Security\Core\Exception\UnsupportedUserException; use Symfony\Component\Security\Core\User\UserInterface; use Symfo...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Security/Voter/CapabilityVoter.php
src/Security/Voter/CapabilityVoter.php
<?php namespace Sword\SwordBundle\Security\Voter; use Sword\SwordBundle\Security\User; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; final class CapabilityVoter implements VoterInterface { public function vote(Toke...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Security/Voter/RoleVoter.php
src/Security/Voter/RoleVoter.php
<?php namespace Sword\SwordBundle\Security\Voter; use Sword\SwordBundle\Security\User; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; final class RoleVote...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Service/AbstractWordpressService.php
src/Service/AbstractWordpressService.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Service; abstract class AbstractWordpressService implements WordpressService { public function getPriority(): int { return 0; } }
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Service/WordpressService.php
src/Service/WordpressService.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Service; interface WordpressService { /** * Priority given to the service for its initialization. Higher number means higher priority. Defaults to 0. */ public function getPriority(): int; public function initialize(): void; }
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Command/WordpressCommand.php
src/Command/WordpressCommand.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Command; use Sword\SwordBundle\Attribute\AsWordpressCommand; use Sword\SwordBundle\Service\WordpressService; use WP_CLI; use WP_CLI_Command; abstract class WordpressCommand extends WP_CLI_Command implements WordpressService { abstract public function __...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/src/Command/WpCommand.php
src/Command/WpCommand.php
<?php namespace Sword\SwordBundle\Command; use Sword\SwordBundle\Loader\WordpressGlobals; use Sword\SwordBundle\Loader\WordpressLoader; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Ou...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/tests/WordpressTestCase.php
tests/WordpressTestCase.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Test; use PHPUnit\Framework\TestCase; use function Brain\Monkey\setUp; use function Brain\Monkey\tearDown; abstract class WordpressTestCase extends TestCase { protected function setUp(): void { setUp(); } protected function tearDow...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/tests/bootstrap.php
tests/bootstrap.php
<?php declare(strict_types=1); require dirname(__DIR__).'/vendor/autoload.php';
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/tests/Translation/ChildThemeTranslationInitializerTest.php
tests/Translation/ChildThemeTranslationInitializerTest.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Test\Translation; use Sword\SwordBundle\Test\WordpressTestCase; use Sword\SwordBundle\Translation\ChildThemeTranslationInitializer; use function Brain\Monkey\Functions\expect; class ChildThemeTranslationInitializerTest extends WordpressTestCase { priva...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/tests/Translation/LocaleSwitcherTest.php
tests/Translation/LocaleSwitcherTest.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Test\Translation; use Sword\SwordBundle\Test\WordpressTestCase; use Sword\SwordBundle\Translation\LocaleSwitcher; use Symfony\Component\Translation\LocaleSwitcher as SymfonyLocaleSwitcher; use function Brain\Monkey\Functions\expect; class LocaleSwitcherTes...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/tests/DependencyInjection/SwordExtensionTest.php
tests/DependencyInjection/SwordExtensionTest.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Test\DependencyInjection; use Doctrine\Bundle\DoctrineBundle\DependencyInjection\DoctrineExtension; use PHPUnit\Framework\TestCase; use Sword\SwordBundle\DependencyInjection\SwordExtension; use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExte...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/tests/Loader/LazyServiceInstantiatorTest.php
tests/Loader/LazyServiceInstantiatorTest.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Test\Loader; use Mockery; use Sword\SwordBundle\Loader\LazyServiceInstantiator; use Sword\SwordBundle\Store\WordpressWidgetStore; use Sword\SwordBundle\Test\WordpressTestCase; use function Brain\Monkey\Actions\expectAdded; class LazyServiceInstantiatorTest...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/tests/Store/WordpressWidgetStoreTest.php
tests/Store/WordpressWidgetStoreTest.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Test\Store; use Sword\SwordBundle\Store\WordpressWidgetStore; use PHPUnit\Framework\TestCase; class WordpressWidgetStoreTest extends TestCase { public function testAddingWidgets(): void { $widgets = ['Some\\Widget', 'Some\\OtherWidget']; ...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/tests/EnvVarProcessor/AutoFileEnvVarProcessorTest.php
tests/EnvVarProcessor/AutoFileEnvVarProcessorTest.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Test\EnvVarProcessor; use PHPUnit\Framework\TestCase; use Sword\SwordBundle\EnvVarProcessor\AutoFileEnvVarProcessor; class AutoFileEnvVarProcessorTest extends TestCase { private const ENV_VAR_FILE = __DIR__ . '/../../var/test/env_var.test'; protect...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/tests/Security/Voter/CapabilityVoterTest.php
tests/Security/Voter/CapabilityVoterTest.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Test\Security\Voter; use Mockery; use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; use Sword\SwordBundle\Security\User; use Sword\SwordBundle\Security\Voter\CapabilityVoter; use PHPUnit\Framework\TestCase; use Symfony\Component\Security\Core\Authentica...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/tests/Service/AbstractWordpressServiceTest.php
tests/Service/AbstractWordpressServiceTest.php
<?php declare(strict_types=1); namespace Sword\SwordBundle\Test\Service; use Sword\SwordBundle\Service\AbstractWordpressService; use PHPUnit\Framework\TestCase; class AbstractWordpressServiceTest extends TestCase { public function testGetPriority(): void { $this->assertSame(0, (new class extends Abs...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
phpsword/sword-bundle
https://github.com/phpsword/sword-bundle/blob/29d8e4c86dd9b873cf70051af234b6b3e3a27f52/install/wp/wp-config.php
install/wp/wp-config.php
<?php /** * The base configuration for WordPress * * The wp-config.php creation script uses this file during the * installation. You don't have to use the web site, you can * copy this file to "wp-config.php" and fill in the values. * * This file contains the following configurations: * * * MySQL settings * ...
php
MIT
29d8e4c86dd9b873cf70051af234b6b3e3a27f52
2026-01-05T04:54:40.429142Z
false
moonlandsoft/yii2-phpexcel
https://github.com/moonlandsoft/yii2-phpexcel/blob/ccf28ff8ce2c665a7769dd6516098b4a35c8c309/Excel.php
Excel.php
<?php namespace moonland\phpexcel; use yii\helpers\ArrayHelper; use yii\base\InvalidConfigException; use yii\base\InvalidParamException; use yii\i18n\Formatter; use PhpOffice\PhpSpreadsheet\Spreadsheet; /** * Excel Widget for generate Excel File or for load Excel File. * * Usage * ----- * * Exporting data into...
php
MIT
ccf28ff8ce2c665a7769dd6516098b4a35c8c309
2026-01-05T04:54:48.747475Z
true
rap2hpoutre/similar-text-finder
https://github.com/rap2hpoutre/similar-text-finder/blob/89fa6b59483b42ee670c3959fbe20f8cc1ccd177/src/Finder.php
src/Finder.php
<?php namespace SimilarText; /** * Class Finder * @package SimilarText * * Thanks to: http://php.net/manual/fr/function.levenshtein.php#113702 */ class Finder { /** * @var string Needle */ protected $needle; /** * @var array Haystack */ protected $haystack; /** * Hol...
php
MIT
89fa6b59483b42ee670c3959fbe20f8cc1ccd177
2026-01-05T04:54:57.053589Z
false
rap2hpoutre/similar-text-finder
https://github.com/rap2hpoutre/similar-text-finder/blob/89fa6b59483b42ee670c3959fbe20f8cc1ccd177/test/FinderTest.php
test/FinderTest.php
<?php namespace SimilarText\Test; use SimilarText\Finder; use PHPUnit\Framework\TestCase; /** * Class FinderTest * @package SimilarText\Test */ class FinderTest extends TestCase { /** * Test first() method */ public function testFirst() { $text_finder = new Finder('bananna', ['apple',...
php
MIT
89fa6b59483b42ee670c3959fbe20f8cc1ccd177
2026-01-05T04:54:57.053589Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/GeminiServiceProvider.php
src/GeminiServiceProvider.php
<?php namespace HosseinHezami\LaravelGemini; use Illuminate\Support\ServiceProvider; use HosseinHezami\LaravelGemini\Console\ModelsCommand; use HosseinHezami\LaravelGemini\Factory\ProviderFactory; use HosseinHezami\LaravelGemini\Gemini; class GeminiServiceProvider extends ServiceProvider { /** * Register se...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Gemini.php
src/Gemini.php
<?php namespace HosseinHezami\LaravelGemini; use HosseinHezami\LaravelGemini\Builders\TextBuilder; use HosseinHezami\LaravelGemini\Builders\ImageBuilder; use HosseinHezami\LaravelGemini\Builders\VideoBuilder; use HosseinHezami\LaravelGemini\Builders\AudioBuilder; use HosseinHezami\LaravelGemini\Builders\FileBuilder; ...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Exceptions/RateLimitException.php
src/Exceptions/RateLimitException.php
<?php namespace HosseinHezami\LaravelGemini\Exceptions; class RateLimitException extends BaseException { public ?int $retryAfter; public function __construct(string $message = 'Rate limit exceeded', ?int $retryAfter = null) { parent::__construct($message); $this->retryAfter = $retryAfter;...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Exceptions/NetworkException.php
src/Exceptions/NetworkException.php
<?php namespace HosseinHezami\LaravelGemini\Exceptions; class NetworkException extends BaseException { public function __construct(string $message = 'Network issue') { parent::__construct($message); } }
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Exceptions/StreamException.php
src/Exceptions/StreamException.php
<?php namespace HosseinHezami\LaravelGemini\Exceptions; class StreamException extends BaseException { public function __construct(string $message = 'Streaming interrupted') { parent::__construct($message); } }
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Exceptions/BaseException.php
src/Exceptions/BaseException.php
<?php namespace HosseinHezami\LaravelGemini\Exceptions; use Exception; class BaseException extends Exception { // }
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Exceptions/ApiException.php
src/Exceptions/ApiException.php
<?php namespace HosseinHezami\LaravelGemini\Exceptions; class ApiException extends BaseException { public function __construct(string $message = 'API error occurred') { parent::__construct($message); } }
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Exceptions/ValidationException.php
src/Exceptions/ValidationException.php
<?php namespace HosseinHezami\LaravelGemini\Exceptions; class ValidationException extends BaseException { public function __construct(string $message = 'Invalid input parameters') { parent::__construct($message); } }
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Exceptions/AuthenticationException.php
src/Exceptions/AuthenticationException.php
<?php namespace HosseinHezami\LaravelGemini\Exceptions; class AuthenticationException extends BaseException { public function __construct(string $message = 'Invalid API key or authentication issue') { parent::__construct($message); } }
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Helpers/helpers.php
src/Helpers/helpers.php
<?php if (! function_exists('safe_base64_encode')) { function safe_base64_encode(string $data): string { return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); } }
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Http/HttpClient.php
src/Http/HttpClient.php
<?php namespace HosseinHezami\LaravelGemini\Http; use Illuminate\Support\Facades\Http; use Illuminate\Http\Client\PendingRequest; use HosseinHezami\LaravelGemini\Exceptions\RateLimitException; class HttpClient { protected PendingRequest $client; public function __construct(?string $baseUrl = null, ?string $...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Contracts/ProviderInterface.php
src/Contracts/ProviderInterface.php
<?php namespace HosseinHezami\LaravelGemini\Contracts; use HosseinHezami\LaravelGemini\Responses; interface ProviderInterface { public function generateText(array $payload): Responses\TextResponse; public function generateImage(array $payload): Responses\ImageResponse; public function generateVideo(arr...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Builders/TextBuilder.php
src/Builders/TextBuilder.php
<?php namespace HosseinHezami\LaravelGemini\Builders; use HosseinHezami\LaravelGemini\Enums\Capability; use HosseinHezami\LaravelGemini\Responses\TextResponse; class TextBuilder extends BaseBuilder { protected function getCapability(): string { return Capability::TEXT->value; } public functi...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Builders/CacheBuilder.php
src/Builders/CacheBuilder.php
<?php namespace HosseinHezami\LaravelGemini\Builders; use HosseinHezami\LaravelGemini\Providers\GeminiProvider; use HosseinHezami\LaravelGemini\Responses\CacheResponse; use HosseinHezami\LaravelGemini\Exceptions\ValidationException; class CacheBuilder { protected GeminiProvider $provider; public function __...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Builders/VideoBuilder.php
src/Builders/VideoBuilder.php
<?php namespace HosseinHezami\LaravelGemini\Builders; use HosseinHezami\LaravelGemini\Enums\Capability; use HosseinHezami\LaravelGemini\Responses\VideoResponse; class VideoBuilder extends BaseBuilder { protected function getCapability(): string { return Capability::VIDEO->value; } public fun...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Builders/BaseBuilder.php
src/Builders/BaseBuilder.php
<?php namespace HosseinHezami\LaravelGemini\Builders; use HosseinHezami\LaravelGemini\Contracts\ProviderInterface; use HosseinHezami\LaravelGemini\Exceptions\ValidationException; use HosseinHezami\LaravelGemini\Responses\CacheResponse; abstract class BaseBuilder { protected ProviderInterface $provider; prot...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Builders/AudioBuilder.php
src/Builders/AudioBuilder.php
<?php namespace HosseinHezami\LaravelGemini\Builders; use HosseinHezami\LaravelGemini\Enums\Capability; use HosseinHezami\LaravelGemini\Responses\AudioResponse; use HosseinHezami\LaravelGemini\Exceptions\ValidationException; class AudioBuilder extends BaseBuilder { protected function getCapability(): string ...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Builders/FileBuilder.php
src/Builders/FileBuilder.php
<?php namespace HosseinHezami\LaravelGemini\Builders; use HosseinHezami\LaravelGemini\Providers\GeminiProvider; use HosseinHezami\LaravelGemini\Responses\FileResponse; use HosseinHezami\LaravelGemini\Exceptions\ValidationException; class FileBuilder { protected array $params = []; protected GeminiProvider $p...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Builders/ImageBuilder.php
src/Builders/ImageBuilder.php
<?php namespace HosseinHezami\LaravelGemini\Builders; use HosseinHezami\LaravelGemini\Enums\Capability; use HosseinHezami\LaravelGemini\Responses\ImageResponse; class ImageBuilder extends BaseBuilder { protected function getCapability(): string { return Capability::IMAGE->value; } public fun...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Facades/Gemini.php
src/Facades/Gemini.php
<?php namespace HosseinHezami\LaravelGemini\Facades; use Illuminate\Support\Facades\Facade; use HosseinHezami\LaravelGemini\Builders\TextBuilder; use HosseinHezami\LaravelGemini\Builders\ImageBuilder; use HosseinHezami\LaravelGemini\Builders\VideoBuilder; use HosseinHezami\LaravelGemini\Builders\AudioBuilder; use Hos...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Console/ModelsCommand.php
src/Console/ModelsCommand.php
<?php namespace HosseinHezami\LaravelGemini\Console; use Illuminate\Console\Command; use HosseinHezami\LaravelGemini\Facades\Gemini; class ModelsCommand extends Command { protected $signature = 'gemini:models'; protected $description = 'List available Gemini models'; public function handle(): void ...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Config/gemini.php
src/Config/gemini.php
<?php return [ /* |-------------------------------------------------------------------------- | Gemini API Key |-------------------------------------------------------------------------- | | Your Google Gemini API key. You can get it from: | https://aistudio.google.com/app/apikey | ...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Enums/Capability.php
src/Enums/Capability.php
<?php namespace HosseinHezami\LaravelGemini\Enums; enum Capability: string { case TEXT = 'text'; case IMAGE = 'image'; case VIDEO = 'video'; case AUDIO = 'audio'; }
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Providers/BaseProvider.php
src/Providers/BaseProvider.php
<?php namespace HosseinHezami\LaravelGemini\Providers; use HosseinHezami\LaravelGemini\Http\HttpClient; use HosseinHezami\LaravelGemini\Exceptions; use Illuminate\Support\Facades\Http; abstract class BaseProvider { protected HttpClient $http; public function __construct(?string $apiKey = null) { ...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Providers/GeminiProvider.php
src/Providers/GeminiProvider.php
<?php namespace HosseinHezami\LaravelGemini\Providers; use HosseinHezami\LaravelGemini\Contracts\ProviderInterface; use HosseinHezami\LaravelGemini\Responses; use HosseinHezami\LaravelGemini\Exceptions\ApiException; use HosseinHezami\LaravelGemini\Exceptions\StreamException; use HosseinHezami\LaravelGemini\Exceptions...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Responses/BaseResponse.php
src/Responses/BaseResponse.php
<?php namespace HosseinHezami\LaravelGemini\Responses; abstract class BaseResponse { protected array $data; public function __construct(array $data) { $this->data = $data; } abstract public function content(): string; public function toArray(): array { return $this->data...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Responses/VideoResponse.php
src/Responses/VideoResponse.php
<?php namespace HosseinHezami\LaravelGemini\Responses; class VideoResponse extends BaseResponse { public function content(): string { return $this->data['video'] ?? ''; } public function url(): string { return $this->data['uri'] ?? ''; } public function save(string $path)...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Responses/AudioResponse.php
src/Responses/AudioResponse.php
<?php namespace HosseinHezami\LaravelGemini\Responses; use HosseinHezami\LaravelGemini\Exceptions\ApiException; class AudioResponse extends BaseResponse { public function content(): string { if (isset($this->data['candidates'][0]['finishReason']) && $this->data['candidates'][0]['finishReason'] != 'STOP') { ...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Responses/CacheResponse.php
src/Responses/CacheResponse.php
<?php namespace HosseinHezami\LaravelGemini\Responses; class CacheResponse { protected array $data; public function __construct(array $data) { $this->data = $data; } public function toArray(): array { return $this->data; } public function name(): string { ...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Responses/ImageResponse.php
src/Responses/ImageResponse.php
<?php namespace HosseinHezami\LaravelGemini\Responses; use HosseinHezami\LaravelGemini\Exceptions\ApiException; class ImageResponse extends BaseResponse { public function content(): string { foreach($this->data['candidates'][0]['content']['parts'] as $parts){ if(key_exists('inlineData', $...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Responses/FileResponse.php
src/Responses/FileResponse.php
<?php namespace HosseinHezami\LaravelGemini\Responses; use HosseinHezami\LaravelGemini\Exceptions\ApiException; class FileResponse { protected array $data; public function __construct(array $data) { $this->data = $data; } public function toArray(): array { return $this->data...
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false
hosseinhezami/laravel-gemini
https://github.com/hosseinhezami/laravel-gemini/blob/4ab7bae02f0cc88f3e93455e8363d9a517c6eafe/src/Responses/TextResponse.php
src/Responses/TextResponse.php
<?php namespace HosseinHezami\LaravelGemini\Responses; class TextResponse extends BaseResponse { public function content(): string { return $this->data['candidates'][0]['content']['parts'][0]['text'] ?? ''; } }
php
MIT
4ab7bae02f0cc88f3e93455e8363d9a517c6eafe
2026-01-05T04:55:15.491730Z
false