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 |
|---|---|---|---|---|---|---|---|---|
Froiden/laravel-rest-api | https://github.com/Froiden/laravel-rest-api/blob/45e05076f8fc7918d70631369b02ed7168a6cb5d/tests/Models/DummyComment.php | tests/Models/DummyComment.php | <?php
namespace Froiden\RestAPI\Tests\Models;
use Froiden\RestAPI\ApiModel;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class DummyComment extends ApiModel
{
protected $table = 'dummy_comments';
/**
* The attributes that are mass assignable.
*
... | php | MIT | 45e05076f8fc7918d70631369b02ed7168a6cb5d | 2026-01-05T04:52:55.517023Z | false |
Froiden/laravel-rest-api | https://github.com/Froiden/laravel-rest-api/blob/45e05076f8fc7918d70631369b02ed7168a6cb5d/tests/Models/DummyPhone.php | tests/Models/DummyPhone.php | <?php
namespace Froiden\RestAPI\Tests\Models;
use Froiden\RestAPI\ApiModel;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class DummyPhone extends ApiModel
{
protected $table = 'dummy_phones';
/**
* The attributes that are mass assignable.
*
... | php | MIT | 45e05076f8fc7918d70631369b02ed7168a6cb5d | 2026-01-05T04:52:55.517023Z | false |
Froiden/laravel-rest-api | https://github.com/Froiden/laravel-rest-api/blob/45e05076f8fc7918d70631369b02ed7168a6cb5d/tests/Models/DummyPost.php | tests/Models/DummyPost.php | <?php
namespace Froiden\RestAPI\Tests\Models;
use Froiden\RestAPI\ApiModel;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class DummyPost extends ApiModel
{
protected $table = 'dummy_posts';
/**
* The attributes that are mass assignable.
*
*... | php | MIT | 45e05076f8fc7918d70631369b02ed7168a6cb5d | 2026-01-05T04:52:55.517023Z | false |
Froiden/laravel-rest-api | https://github.com/Froiden/laravel-rest-api/blob/45e05076f8fc7918d70631369b02ed7168a6cb5d/tests/Models/DummyUser.php | tests/Models/DummyUser.php | <?php
namespace Froiden\RestAPI\Tests\Models;
use Froiden\RestAPI\ApiModel;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class DummyUser extends ApiModel
{
protected $table = 'dummy_users';
/**
* The attributes that are mass assignable.
*
*... | php | MIT | 45e05076f8fc7918d70631369b02ed7168a6cb5d | 2026-01-05T04:52:55.517023Z | false |
Froiden/laravel-rest-api | https://github.com/Froiden/laravel-rest-api/blob/45e05076f8fc7918d70631369b02ed7168a6cb5d/tests/Factories/ModelFactory.php | tests/Factories/ModelFactory.php | <?php
$factory->define(
\Froiden\RestAPI\Tests\Models\DummyUser::class,
function(Faker\Generator $faker){
return [
'name' => $faker->name,
'email' => $faker->email,
'age' => $faker->randomDigitNotNull,
];
}
);
$factory->define(
\Froiden\RestAPI\Test... | php | MIT | 45e05076f8fc7918d70631369b02ed7168a6cb5d | 2026-01-05T04:52:55.517023Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/trello_integration/trello_integration.php | trello_integration/trello_integration.php | <?php
// Get the environment; we will post a new comment to Trello each time
// a commit appears on a new branch on Pantheon.
$env = $_ENV['PANTHEON_ENVIRONMENT'];
// Look up the secrets from the secrets file.
$secrets = _get_secrets(array('trello_key', 'trello_token'), array());
// Get latest commit
$current_commit... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/slack_notification/slack_notification.php | slack_notification/slack_notification.php | <?php
/**
* Quicksilver Script: Slack Notification
* Description: Send a notification to a Slack channel when code is deployed to Pantheon.
*/
/**
* Configuration options.
*
* Make changes here to customize the behavior of your notification.
*
* $slack_channel The Slack channel to post to.
* $type ... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/generate_dev_content/generate_dev_content.php | generate_dev_content/generate_dev_content.php | <?php
// Generating Developer Content for "Article" Content Type
// Only run this operation for development or multidev environments
if (isset($_POST['environment']) && !in_array($_POST['environment'], array('test', 'live'))) {
// Only run this operation if Devel and Devel Generate modules are available.
// Ena... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/debugging_example/debug.php | debugging_example/debug.php | <?php
echo "Quicksilver Debugging Output";
echo "\n\n";
echo "\n========= START PAYLOAD ===========\n";
print_r($_POST);
echo "\n========== END PAYLOAD ============\n";
echo "\n------- START ENVIRONMENT ---------\n";
$env = $_ENV;
foreach ($env as $key => $value) {
if (preg_match('#(PASSWORD|SALT|AUTH|SECURE|NONCE|... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/wp_solr_index/wp_solr_power_index.php | wp_solr_index/wp_solr_power_index.php | <?php
// Post Solr schema
echo "Posting Solr Schema File...\n";
passthru('wp solr repost-schema');
// Get Solr Server Info
echo "Getting Solr Server Info...\n";
passthru('wp solr info');
// Index Solr Power items
echo "Indexing Solr Power Items...\n";
passthru('wp solr index');
echo "Indexing complete.\n";
| php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/autopilot/autopilot.php | autopilot/autopilot.php | <?php
/**
* @file
* Sends Autopilot VRT Quicksilver hook data to Slack.
*/
// Retrieve Slack webhook config data
$config_file = $_SERVER['HOME'] . '/files/private/autopilot.json';
$config = json_decode(file_get_contents($config_file), 1);
if ($config == false) {
die('files/private/autopilot.json found. Aborting!'... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/new_relic_monitor/new_relic_monitor.php | new_relic_monitor/new_relic_monitor.php | <?php
// No need to log this script operation in New Relic's stats.
// PROTIP: you might also want to use this snippet if you have PHP code handling
// very fast things like redirects or the like.
if (extension_loaded('newrelic')) {
newrelic_ignore_transaction();
}
define("API_KEY_SECRET_NAME", "new_relic_api_key");... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/pivotal-tracker/pivotal_integration.php | pivotal-tracker/pivotal_integration.php | <?php
// Get the environment; we will post a new comment to Tracker each time a commit appears on Pantheon.
$env = $_ENV['PANTHEON_ENVIRONMENT'];
// Do not watch test or live, though.
if (($env == 'live') || ($env == 'test')) {
exit(0);
}
// Look up the secrets from the secrets file.
$secrets = _get_secrets(arra... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/drush_config_import/drush_config_import.php | drush_config_import/drush_config_import.php | <?php
// Import all config changes.
echo "Importing configuration from yml files...\n";
passthru('drush config-import -y');
echo "Import of configuration complete.\n";
//Clear all cache
echo "Rebuilding cache.\n";
passthru('drush cr');
echo "Rebuilding cache complete.\n";
| php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/google_chat_notification/google_chat_notification.php | google_chat_notification/google_chat_notification.php | <?php
// Run Google Chat notification.
new GoogleChatNotification();
class GoogleChatNotification
{
// Build a set of fields to be rendered with Google Chat.
// https://developers.google.com/chat/api/reference/rest/v1/spaces.messages
public $webhook_url;
public $secrets;
public $site_name;
pub... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/url_checker/url_checker.php | url_checker/url_checker.php | <?php
// Make note of the site and environment we are running on.
$env = $_ENV['PANTHEON_ENVIRONMENT'];
$site = $_ENV['PANTHEON_SITE_NAME'];
// Read our configuration file (or die)
$config = url_checker_get_config();
// If we are not running in the live environment, or if there
// is no 'base_url' defined in config.... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/wp_cfm_import/wp_cfm_after_clone.php | wp_cfm_import/wp_cfm_after_clone.php | <?php
print( "\n==== WP-CFM Config Import Starting ====\n" );
// Activate the wp-cfm plugin
exec( 'wp plugin activate wp-cfm 2>&1' );
// Automagically import config into WP-CFM site upon code deployment
$path = $_SERVER['DOCUMENT_ROOT'] . '/private/config';
$files = scandir( $path );
$files = array_diff( scandir( $pa... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/wp_cfm_import/alter_wpcfm_config_path.php | wp_cfm_import/alter_wpcfm_config_path.php | <?php
/*
Plugin Name: Alter-wpcfm-config-path
Plugin URI: http://www.eyesopen.ca
Description: Alters the wpcfm config path
Version: 0.1
Author: Grant McInnes
Author URI: http://www.eyesopen.ca
*/
// Tell wp-cfm where our config files live
add_filter('wpcfm_config_dir', function($var) { return $_SERVER['... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/drush_revert_features/revert_all_features.php | drush_revert_features/revert_all_features.php | <?php
//Revert all features
echo "Reverting all features...\n";
passthru('drush fra -y');
echo "Reverting complete.\n";
//Clear all cache
echo "Clearing cache.\n";
passthru('drush cc all');
echo "Clearing cache complete.\n";
| php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/webhook/webhook.php | webhook/webhook.php | <?php
// Define the url the data should be sent to.
// {wf_type} will be replaced with the workflow operation:
// clone_database, clear_cache, deploy, or sync_code.
//
// Useful to have one webhook handle multiple events.
// e.g. https://ifttt.com/maker
$url = 'http://example.com/quicksilver/{wf_type}';
$payload = $_... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/new_relic_apdex_t/new_relic_apdex_t.php | new_relic_apdex_t/new_relic_apdex_t.php | <?php
/**
* @file
* Sets New Relic Apdex T values for newly created multidev environments.
*/
define("API_KEY_SECRET_NAME", "new_relic_api_key");
// get New Relic info from the dev environment
// Change to test or live as you wish
$app_info = get_app_info( 'dev' );
$settings = $app_info['settings'];
// The "t" ... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/db_sanitization/db_sanitization_wordpress.php | db_sanitization/db_sanitization_wordpress.php | <?php
// Don't ever santize the database on the live environment. Doing so would
// destroy the canonical version of the data.
if (defined('PANTHEON_ENVIRONMENT') && (PANTHEON_ENVIRONMENT !== 'live')) {
// Bootstrap WordPress.
require_once $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php';
global $wpdb;
// Query the ... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/db_sanitization/db_sanitization_drupal.php | db_sanitization/db_sanitization_drupal.php | <?php
// Don't ever sanitize the database on the live environment. Doing so would
// destroy the canonical version of the data.
if (defined('PANTHEON_ENVIRONMENT') && (PANTHEON_ENVIRONMENT !== 'live')) {
// Run the Drush command to sanitize the database.
echo "Sanitizing the database...\n";
passthru('drush sql-sani... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/new_relic_deploy/new_relic_deploy.php | new_relic_deploy/new_relic_deploy.php | <?php
// No need to log this script operation in New Relic's stats.
// PROTIP: you might also want to use this snippet if you have PHP code handling
// very fast things like redirects or the like.
if (extension_loaded('newrelic')) {
newrelic_ignore_transaction();
}
define("API_KEY_SECRET_NAME", "new_relic_api_key");... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/wp_search_replace/wp_search_replace.php | wp_search_replace/wp_search_replace.php | <?php
echo "Replacing previous environment urls with new environment urls... \n";
if ( ! empty( $_ENV['PANTHEON_ENVIRONMENT'] ) ) {
switch( $_ENV['PANTHEON_ENVIRONMENT'] ) {
case 'live':
passthru('wp search-replace "://test-example.pantheonsite.io" "://example.com" --all-tables ');
break;
case 't... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/asana_integration/asana_integration.php | asana_integration/asana_integration.php | <?php
// Get the environment; we will post a new comment to Asana each time
// a commit appears on a new branch on Pantheon.
$env = $_ENV['PANTHEON_ENVIRONMENT'];
// Do not watch test or live, though.
if (($env == 'live') || ($env == 'test')) {
exit(0);
}
// Look up the secrets from the secrets file.
$secrets = _g... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/jenkins/jenkins_integration.php | jenkins/jenkins_integration.php | <?php
// Load a secrets file.
// See the included example.secrets.json and instructions in README.
$secrets = _get_secrets('secrets.json');
//Create curl post request to hit the Jenkins webhook
$curl = curl_init($secrets['jenkins_url']);
//Setup header with authentication
curl_setopt($curl, CURLOPT_HTTPHEADER, arra... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/cloudflare_cache/cloudflare_cache.php | cloudflare_cache/cloudflare_cache.php | <?php
// TODO: this header should not be required...
header('Content-Type: text/plain; charset=UTF-8');
// Only purge Cloudflare cache when the live environment's cache is cleared.
if ($_ENV['PANTHEON_ENVIRONMENT'] != 'live') {
die();
}
// Retrieve Cloudflare config data
$config_file = $_SERVER['HOME'] . '/files/pr... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/diffy_visualregression/diffyVisualregression.php | diffy_visualregression/diffyVisualregression.php | <?php
// An example of using Pantheon's Quicksilver technology to do
// automatic visual regression testing using diffy.website
define("SITE_URL", "https://app.diffy.website");
echo 'Checking if it is test environment deployment.' . PHP_EOL;
if (defined('PANTHEON_ENVIRONMENT') && (PANTHEON_ENVIRONMENT == 'test')) {
... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/jira_integration/jira_integration.php | jira_integration/jira_integration.php | <?php
// Get the environment; we will post a new comment to Jira each time
// a commit appears on a new branch on Pantheon.
$env = $_ENV['PANTHEON_ENVIRONMENT'];
// Do not watch test or live, though.
if (($env == 'live') || ($env == 'test')) {
exit(0);
}
// Look up the secrets from the secrets file.
$secrets = _ge... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/chikka-sms-notification/chikka_sms_notification.php | chikka-sms-notification/chikka_sms_notification.php | <?php
// Default values for parameters
$defaults = array(
'chikka_url' => 'https://post.chikka.com/smsapi/request',
'mobile_number' => 'xxxxxxxxxxxx',
);
// Load our hidden credentials.
// See the README.md for instructions on storing secrets.
$secrets = _get_secrets(array('chikka_client_id', 'chikka_client_secret... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/teams_notification/teams_notification.php | teams_notification/teams_notification.php | <?php
// Default values for parameters if needed
$defaults = array();
// Load our hidden credentials.
// See the README.md for instructions on storing secrets.
$secrets = _get_secrets(array('teams_url'), $defaults);
$params = [
'USERMAIL' => $_POST['user_email'],
'USERMAIL_HASH' => md5(strtolower(trim($_POST['u... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
pantheon-systems/quicksilver-examples | https://github.com/pantheon-systems/quicksilver-examples/blob/a2e3d7c00ff0bfab06873747e79c8eccae3b81da/enable_dev_modules/enable_dev_modules.php | enable_dev_modules/enable_dev_modules.php | <?php
/**
* This example enables the devel module when a database is cloned to a dev environment.
*
* This script should be configured into the clone_database operation in pantheon.yml
*/
// The clone_database may be triggered on any environment, but we only want
// to automatically enable the devel module when th... | php | MIT | a2e3d7c00ff0bfab06873747e79c8eccae3b81da | 2026-01-05T04:53:04.234036Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/.php-cs-fixer.dist.php | .php-cs-fixer.dist.php | <?php
$finder = PhpCsFixer\Finder::create()
->files()
->in(__DIR__ . '/src')
->in(__DIR__ . '/test')
->in(__DIR__ . '/example')
->name('*.php');
$finder->files()->append([__DIR__ . 'composer/bin/mddoc']);
return (new PhpCsFixer\Config)
->setUsingCache(true)
->setIndent("\t")
->setLineEnding("\n")
//->setUsi... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/ResponseStack.php | src/ResponseStack.php | <?php
namespace donatj\MockWebServer;
/**
* ResponseStack is used to store multiple responses for a request issued by the server in order.
*
* When the stack is empty, the server will return a customizable response defaulting to a 404.
*/
class ResponseStack implements InitializingResponseInterface, MultiResponse... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/InternalServer.php | src/InternalServer.php | <?php
namespace donatj\MockWebServer;
use donatj\MockWebServer\Exceptions\ServerException;
use donatj\MockWebServer\Responses\DefaultResponse;
use donatj\MockWebServer\Responses\NotFoundResponse;
/**
* Class InternalServer
*
* @internal
*/
class InternalServer {
/** @var string */
private $tmpPath;
/** @var ... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/MultiResponseInterface.php | src/MultiResponseInterface.php | <?php
namespace donatj\MockWebServer;
/**
* MultiResponseInterface is used to vary the response to a request.
*/
interface MultiResponseInterface extends ResponseInterface {
/**
* Called after each request is sent
*
* @internal
*/
public function next() : bool;
}
| php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/Response.php | src/Response.php | <?php
namespace donatj\MockWebServer;
use donatj\MockWebServer\Exceptions\RuntimeException;
class Response implements ResponseInterface {
/** @var string */
protected $body;
/** @var array */
protected $headers;
/** @var int */
protected $status;
/**
* Response constructor.
*/
public function __constru... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/MockWebServer.php | src/MockWebServer.php | <?php
namespace donatj\MockWebServer;
use donatj\MockWebServer\Exceptions\RuntimeException;
class MockWebServer {
public const VND = 'VND.DonatStudios.MockWebServer';
public const LAST_REQUEST_FILE = 'last.request';
public const REQUEST_COUNT_FILE = 'count.request';
public const TMP_ENV = 'MOCK_WEB_SERVER_TM... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/ResponseInterface.php | src/ResponseInterface.php | <?php
namespace donatj\MockWebServer;
interface ResponseInterface {
/**
* Get a unique identifier for the response.
*
* Expected to be 32 characters of hexadecimal
*
* @internal
*/
public function getRef() : string;
/**
* Get the body of the response
*
* @internal
*/
public function getBody(... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/ResponseByMethod.php | src/ResponseByMethod.php | <?php
namespace donatj\MockWebServer;
/**
* ResponseByMethod is used to vary the response to a request by the called HTTP Method.
*/
class ResponseByMethod implements MultiResponseInterface {
public const METHOD_GET = 'GET';
public const METHOD_POST = 'POST';
public const METHOD_PUT = 'PUT';
public ... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/InitializingResponseInterface.php | src/InitializingResponseInterface.php | <?php
namespace donatj\MockWebServer;
/**
* InitializingResponseInterface is used to initialize a response before headers are sent.
*/
interface InitializingResponseInterface extends ResponseInterface {
/**
* @internal
*/
public function initialize( RequestInfo $request ) : void;
}
| php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/RequestInfo.php | src/RequestInfo.php | <?php
namespace donatj\MockWebServer;
use donatj\MockWebServer\Exceptions\RuntimeException;
class RequestInfo implements \JsonSerializable {
public const JSON_KEY_GET = '_GET';
public const JSON_KEY_POST = '_POST';
public const JSON_KEY_FILES = '_FILES';
public const JSON_KEY_COOKIE ... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/DelayedResponse.php | src/DelayedResponse.php | <?php
namespace donatj\MockWebServer;
/**
* DelayedResponse wraps a response, causing it when called to be delayed by a specified number of microseconds.
*
* This is useful for simulating slow responses and testing timeouts.
*/
class DelayedResponse implements InitializingResponseInterface, MultiResponseInterface... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/Exceptions/ServerException.php | src/Exceptions/ServerException.php | <?php
namespace donatj\MockWebServer\Exceptions;
class ServerException extends RuntimeException {
}
| php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/Exceptions/RuntimeException.php | src/Exceptions/RuntimeException.php | <?php
namespace donatj\MockWebServer\Exceptions;
class RuntimeException extends \RuntimeException {
}
| php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/Responses/DefaultResponse.php | src/Responses/DefaultResponse.php | <?php
namespace donatj\MockWebServer\Responses;
use donatj\MockWebServer\MockWebServer;
use donatj\MockWebServer\RequestInfo;
use donatj\MockWebServer\ResponseInterface;
/**
* The Built-In Default Response.
* Results in an HTTP 200 with a JSON encoded version of the incoming Request
*/
class DefaultResponse imple... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/src/Responses/NotFoundResponse.php | src/Responses/NotFoundResponse.php | <?php
namespace donatj\MockWebServer\Responses;
use donatj\MockWebServer\MockWebServer;
use donatj\MockWebServer\RequestInfo;
use donatj\MockWebServer\ResponseInterface;
/**
* Basic Built-In 404 Response
*/
class NotFoundResponse implements ResponseInterface {
public function getRef() : string {
return md5(Moc... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/test/ResponseStackTest.php | test/ResponseStackTest.php | <?php
namespace Test;
use donatj\MockWebServer\RequestInfo;
use donatj\MockWebServer\Response;
use donatj\MockWebServer\ResponseStack;
use PHPUnit\Framework\TestCase;
class ResponseStackTest extends TestCase {
public function testEmpty() : void {
$mock = $this->getMockBuilder(RequestInfo::class)->disableOriginal... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/test/DelayedResponseTest.php | test/DelayedResponseTest.php | <?php
namespace Test;
use donatj\MockWebServer\DelayedResponse;
use donatj\MockWebServer\RequestInfo;
use donatj\MockWebServer\Response;
use donatj\MockWebServer\Responses\DefaultResponse;
use donatj\MockWebServer\ResponseStack;
use PHPUnit\Framework\TestCase;
class DelayedResponseTest extends TestCase {
public fu... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/test/InternalServerTest.php | test/InternalServerTest.php | <?php
namespace Test;
use donatj\MockWebServer\InternalServer;
use donatj\MockWebServer\MockWebServer;
use donatj\MockWebServer\RequestInfo;
use PHPUnit\Framework\TestCase;
class InternalServerTest extends TestCase {
private $testTmpDir;
/**
* @before
*/
public function beforeEachTest() : void {
$this->te... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/test/Integration/InternalServer_IntegrationTest.php | test/Integration/InternalServer_IntegrationTest.php | <?php
namespace Test\Integration;
use donatj\MockWebServer\InternalServer;
use donatj\MockWebServer\RequestInfo;
use donatj\MockWebServer\Response;
use PHPUnit\Framework\TestCase;
use Test\Integration\Mock\ExampleInitializingResponse;
class InternalServer_IntegrationTest extends TestCase {
private function getTemp... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/test/Integration/MockWebServer_IntegrationTest.php | test/Integration/MockWebServer_IntegrationTest.php | <?php
namespace Test\Integration;
use donatj\MockWebServer\DelayedResponse;
use donatj\MockWebServer\MockWebServer;
use donatj\MockWebServer\Response;
use donatj\MockWebServer\ResponseByMethod;
use donatj\MockWebServer\ResponseStack;
use PHPUnit\Framework\TestCase;
class MockWebServer_IntegrationTest extends TestCas... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/test/Integration/MockWebServer_ChangedDefault_IntegrationTest.php | test/Integration/MockWebServer_ChangedDefault_IntegrationTest.php | <?php
namespace Test\Integration;
use donatj\MockWebServer\MockWebServer;
use donatj\MockWebServer\Response;
use donatj\MockWebServer\Responses\NotFoundResponse;
use PHPUnit\Framework\TestCase;
class MockWebServer_ChangedDefault_IntegrationTest extends TestCase {
public function testChangingDefaultResponse() : voi... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/test/Integration/MockWebServer_GetRequestByOffset_IntegrationTest.php | test/Integration/MockWebServer_GetRequestByOffset_IntegrationTest.php | <?php
namespace Test\Integration;
use donatj\MockWebServer\MockWebServer;
use PHPUnit\Framework\TestCase;
class MockWebServer_GetRequestByOffset_IntegrationTest extends TestCase {
public function testGetRequestByOffset() : void {
$server = new MockWebServer;
$server->start();
for( $i = 0; $i <= 80; $i++ ) {... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/test/Integration/Mock/ExampleInitializingResponse.php | test/Integration/Mock/ExampleInitializingResponse.php | <?php
namespace Test\Integration\Mock;
use donatj\MockWebServer\InitializingResponseInterface;
use donatj\MockWebServer\RequestInfo;
use donatj\MockWebServer\Response;
class ExampleInitializingResponse extends Response implements InitializingResponseInterface {
public function __construct() {
parent::__construct... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/test/Regression/ResponseByMethod_RegressionTest.php | test/Regression/ResponseByMethod_RegressionTest.php | <?php
namespace Test\Regression;
use donatj\MockWebServer\MockWebServer;
use donatj\MockWebServer\Response;
use donatj\MockWebServer\ResponseByMethod;
use donatj\MockWebServer\ResponseStack;
use PHPUnit\Framework\TestCase;
class ResponseByMethod_RegressionTest extends TestCase {
public function test_forwardNextAsE... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/test/Regression/MockWebServer_RegressionTest.php | test/Regression/MockWebServer_RegressionTest.php | <?php
namespace Test\Regression;
use donatj\MockWebServer\MockWebServer;
use PHPUnit\Framework\TestCase;
class MockWebServer_RegressionTest extends TestCase {
/**
* @doesNotPerformAssertions
*/
public function test_stopTwiceShouldNotExplode() : void {
$server = new MockWebServer;
$server->start();
$serv... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/.phan/config.php | .phan/config.php | <?php
/**
* This configuration will be read and overlaid on top of the
* default configuration. Command line arguments will be applied
* after this file is read.
*/
return [
// Supported values: '7.0', '7.1', '7.2', '7.3', null.
// If this is set to null,
// then Phan assumes the PHP version which is closest t... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/example/basic.php | example/basic.php | <?php
use donatj\MockWebServer\MockWebServer;
require __DIR__ . '/../vendor/autoload.php';
$server = new MockWebServer;
$server->start();
$url = $server->getServerRoot() . '/endpoint?get=foobar';
echo "Requesting: $url\n\n";
echo file_get_contents($url);
| php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/example/delayed.php | example/delayed.php | <?php
use donatj\MockWebServer\DelayedResponse;
use donatj\MockWebServer\MockWebServer;
use donatj\MockWebServer\Response;
require __DIR__ . '/../vendor/autoload.php';
$server = new MockWebServer;
$server->start();
$response = new Response(
'This is our http body response',
[ 'Cache-Control' => 'no-cache' ],
200... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/example/notfound.php | example/notfound.php | <?php
use donatj\MockWebServer\MockWebServer;
use donatj\MockWebServer\Responses\NotFoundResponse;
require __DIR__ . '/../vendor/autoload.php';
$server = new MockWebServer;
$server->start();
// The default response is donatj\MockWebServer\Responses\DefaultResponse
// which returns an HTTP 200 and a descriptive JSON... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/example/multi.php | example/multi.php | <?php
use donatj\MockWebServer\MockWebServer;
use donatj\MockWebServer\Response;
use donatj\MockWebServer\ResponseStack;
require __DIR__ . '/../vendor/autoload.php';
$server = new MockWebServer;
$server->start();
// We define the servers response to requests of the /definedPath endpoint
$url = $server->setResponseO... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/example/methods.php | example/methods.php | <?php
use donatj\MockWebServer\MockWebServer;
use donatj\MockWebServer\Response;
use donatj\MockWebServer\ResponseByMethod;
require __DIR__ . '/../vendor/autoload.php';
$server = new MockWebServer;
$server->start();
// Create a response for both a POST and GET request to the same URL
$response = new ResponseByMeth... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/example/simple.php | example/simple.php | <?php
use donatj\MockWebServer\MockWebServer;
use donatj\MockWebServer\Response;
require __DIR__ . '/../vendor/autoload.php';
$server = new MockWebServer;
$server->start();
// We define the server's response to requests of the /definedPath endpoint
$url = $server->setResponseOfPath(
'/definedPath',
new Response(
... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/example/phpunit.php | example/phpunit.php | <?php
use donatj\MockWebServer\MockWebServer;
use donatj\MockWebServer\Response;
class ExampleTest extends PHPUnit\Framework\TestCase {
/** @var MockWebServer */
protected static $server;
public static function setUpBeforeClass() : void {
self::$server = new MockWebServer;
self::$server->start();
}
public... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
donatj/mock-webserver | https://github.com/donatj/mock-webserver/blob/01be0a641fda727c7fc140679c924fc8c8dc120e/server/server.php | server/server.php | <?php
use donatj\MockWebServer\MockWebServer;
$files = [
__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/../../../autoload.php',
];
foreach( $files as $file ) {
if( file_exists($file) ) {
require_once $file;
break;
}
}
$INPUT = file_get_contents("php://input");
if( $INPUT === false ) {
throw new RuntimeE... | php | MIT | 01be0a641fda727c7fc140679c924fc8c8dc120e | 2026-01-05T04:53:13.099180Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/test/Resque/Tests/JobStatusTest.php | test/Resque/Tests/JobStatusTest.php | <?php
require_once dirname(__FILE__) . '/bootstrap.php';
/**
* Resque_Job_Status tests.
*
* @package Resque/Tests
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Tests_JobStatusTest extends Resque_Tests_TestCase
{
public function s... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/test/Resque/Tests/JobTest.php | test/Resque/Tests/JobTest.php | <?php
require_once dirname(__FILE__) . '/bootstrap.php';
/**
* Resque_Job tests.
*
* @package Resque/Tests
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Tests_JobTest extends Resque_Tests_TestCase
{
protected $w... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/test/Resque/Tests/EventTest.php | test/Resque/Tests/EventTest.php | <?php
require_once dirname(__FILE__) . '/bootstrap.php';
/**
* Resque_Event tests.
*
* @package Resque/Tests
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Tests_EventTest extends Resque_Tests_TestCase
{
private $callbacksHit = ar... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/test/Resque/Tests/TestCase.php | test/Resque/Tests/TestCase.php | <?php
/**
* Resque test case class. Contains setup and teardown methods.
*
* @package Resque/Tests
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Tests_TestCase extends PHPUnit_Framework_TestCase
{
protected $resque;
protected $re... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/test/Resque/Tests/StatTest.php | test/Resque/Tests/StatTest.php | <?php
require_once dirname(__FILE__) . '/bootstrap.php';
/**
* Resque_Stat tests.
*
* @package Resque/Tests
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Tests_StatTest extends Resque_Tests_TestCase
{
public function testStatCanB... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/test/Resque/Tests/bootstrap.php | test/Resque/Tests/bootstrap.php | <?php
/**
* Resque test bootstrap file - sets up a test environment.
*
* @package Resque/Tests
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
define('CWD', dirname(__FILE__));
define('RESQUE_LIB', CWD . '/../../../lib/');
define('TEST_MISC', re... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/test/Resque/Tests/WorkerTest.php | test/Resque/Tests/WorkerTest.php | <?php
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'bootstrap.php';
/**
* Resque_Worker tests.
*
* @package Resque/Tests
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Tests_WorkerTest extends Resque_Tests_TestC... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque.php | lib/Resque.php | <?php
require_once dirname(__FILE__) . '/Resque/Event.php';
require_once dirname(__FILE__) . '/Resque/Exception.php';
/**
* Base Resque class.
*
* @package Resque
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque
{
const VERSION =... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/Redis.php | lib/Resque/Redis.php | <?php
if (class_exists('Redis')) {
class RedisApi extends Redis
{
private static $defaultNamespace = 'resque:';
public function __construct($host, $port, $timeout = 5, $password = null)
{
parent::__construct();
$this->host = $host;
$this->port = $po... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/Job.php | lib/Resque/Job.php | <?php
require_once dirname(__FILE__) . '/Event.php';
require_once dirname(__FILE__) . '/Job/Status.php';
require_once dirname(__FILE__) . '/Job/DontPerform.php';
/**
* Resque job.
*
* @package Resque/Job
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.p... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/Failure.php | lib/Resque/Failure.php | <?php
require_once dirname(__FILE__) . '/Failure/Interface.php';
/**
* Failed Resque job.
*
* @package Resque/Failure
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Failure
{
/**
* @var string Class name representing the backend... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/Exception.php | lib/Resque/Exception.php | <?php
/**
* Resque exception.
*
* @package Resque
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Exception extends Exception
{
}
?> | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/Stat.php | lib/Resque/Stat.php | <?php
/**
* Resque statistic management (jobs processed, failed, etc)
*
* @package Resque/Stat
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Stat
{
/**
* Get the value of the supplied statistic counter for the specified statisti... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/Event.php | lib/Resque/Event.php | <?php
/**
* Resque event/plugin system class
*
* @package Resque/Event
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Event
{
/**
* @var array Array containing all registered callbacks, indexked by event name.
*/
private stati... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/Worker.php | lib/Resque/Worker.php | <?php
require_once dirname(__FILE__) . '/Stat.php';
require_once dirname(__FILE__) . '/Event.php';
require_once dirname(__FILE__) . '/Job.php';
require_once dirname(__FILE__) . '/Job/DirtyExitException.php';
// Find and initialize Composer
$files = array(
__DIR__ . '/../../vendor/autoload.php',
__DIR__ . '/../... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/RedisCluster.php | lib/Resque/RedisCluster.php | <?php
// Third- party apps may have already loaded Resident from elsewhere
// so lets be careful.
if(!class_exists('RedisentCluster', false)) {
require_once dirname(__FILE__) . '/../Redisent/RedisentCluster.php';
}
/**
* Extended Redisent class used by Resque for all communication with
* redis. Essentially adds nam... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/Failure/Redis.php | lib/Resque/Failure/Redis.php | <?php
/**
* Redis backend for storing failed Resque jobs.
*
* @package Resque/Failure
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Failure_Redis implements Resque_Failure_Interface
{
/**
* Initialize a failed job class and sav... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/Failure/Interface.php | lib/Resque/Failure/Interface.php | <?php
/**
* Interface that all failure backends should implement.
*
* @package Resque/Failure
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
interface Resque_Failure_Interface
{
/**
* Initialize a failed job class and save it (where appropria... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/Job/DirtyExitException.php | lib/Resque/Job/DirtyExitException.php | <?php
/**
* Runtime exception class for a job that does not exit cleanly.
*
* @package Resque/Job
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Job_DirtyExitException extends RuntimeException
{
} | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/Job/Status.php | lib/Resque/Job/Status.php | <?php
/**
* Status tracker/information for a job.
*
* @package Resque/Job
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Job_Status
{
const STATUS_WAITING = 1;
const STATUS_RUNNING = 2;
const STATUS_FAILED = 3;
const STATUS_COMP... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Resque/Job/DontPerform.php | lib/Resque/Job/DontPerform.php | <?php
/**
* Exception to be thrown if a job should not be performed/run.
*
* @package Resque/Job
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Job_DontPerform extends Exception
{
} | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Redisent/Redisent.php | lib/Redisent/Redisent.php | <?php
/**
* Redisent, a Redis interface for the modest
* @author Justin Poliey <jdp34@njit.edu>
* @copyright 2009 Justin Poliey <jdp34@njit.edu>
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @package Redisent
*/
define('CRLF', sprintf('%s%s', chr(13), chr(10)));
/**
* Wraps na... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/lib/Redisent/RedisentCluster.php | lib/Redisent/RedisentCluster.php | <?php
/**
* Redisent, a Redis interface for the modest
* @author Justin Poliey <jdp34@njit.edu>
* @copyright 2009 Justin Poliey <jdp34@njit.edu>
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @package Redisent
*/
require_once dirname(__FILE__) . '/Redisent.php';
/**
* A general... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/extras/sample-plugin.php | extras/sample-plugin.php | <?php
// Somewhere in our application, we need to register:
Resque_Event::listen('afterEnqueue', array('My_Resque_Plugin', 'afterEnqueue'));
Resque_Event::listen('beforeFirstFork', array('My_Resque_Plugin', 'beforeFirstFork'));
Resque_Event::listen('beforeFork', array('My_Resque_Plugin', 'beforeFork'));
Resque_Event::l... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/demo/bad_job.php | demo/bad_job.php | <?php
class Bad_PHP_Job
{
public function perform()
{
throw new Exception('Unable to run this job!');
}
}
?> | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/demo/check_status.php | demo/check_status.php | <?php
if(empty($argv[1])) {
die('Specify the ID of a job to monitor the status of.');
}
require '../lib/Resque/Job/Status.php';
require '../lib/Resque.php';
date_default_timezone_set('GMT');
Resque::setBackend('127.0.0.1:6379');
$status = new Resque_Job_Status($argv[1]);
if(!$status->isTracking()) {
die("Resque is ... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/demo/queue.php | demo/queue.php | <?php
if(empty($argv[1])) {
die('Specify the name of a job to add. e.g, php queue.php PHP_Job');
}
require '../lib/Resque.php';
date_default_timezone_set('GMT');
Resque::setBackend('127.0.0.1:6379');
$args = array(
'time' => time(),
'array' => array(
'test' => 'test',
),
);
$jobId = Resque::enqueue('default', ... | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/demo/php_error_job.php | demo/php_error_job.php | <?php
class PHP_Error_Job
{
public function perform()
{
callToUndefinedFunction();
}
}
?> | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/demo/long_job.php | demo/long_job.php | <?php
class Long_PHP_Job
{
public function perform()
{
sleep(600);
}
}
?> | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/demo/job.php | demo/job.php | <?php
class PHP_Job
{
public function perform()
{
sleep(120);
fwrite(STDOUT, 'Hello!');
}
}
?> | php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
wa0x6e/php-resque-ex | https://github.com/wa0x6e/php-resque-ex/blob/e024280dae4d7cfe5bae1c34a993f4d82087e28c/demo/resque.php | demo/resque.php | <?php
date_default_timezone_set('GMT');
require 'bad_job.php';
require 'job.php';
require 'php_error_job.php';
require '../bin/resque';
?>
| php | MIT | e024280dae4d7cfe5bae1c34a993f4d82087e28c | 2026-01-05T04:53:25.889096Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/routing.php | routing.php | <?php
declare(strict_types=1);
require_once __DIR__."/src/bootstrap.php";
use AugmentedSteam\Server\Environment\Container;
use AugmentedSteam\Server\Routing\Router;
$container = Container::getInstance();
(new Router())->route($container);
| php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
IsThereAnyDeal/AugmentedSteam_Server | https://github.com/IsThereAnyDeal/AugmentedSteam_Server/blob/8a46ed2ae10106c1d4f0ec516aa04f1762093007/src/job.php | src/job.php | <?php
use AugmentedSteam\Server\Cron\CronJobFactory;
use AugmentedSteam\Server\Environment\Container;
require_once __DIR__."/bootstrap.php";
/** @var string[] $argv */
$container = Container::getInstance();
(new CronJobFactory($container))
->getJob(...array_slice($argv, 1))
->execute();
| php | MIT | 8a46ed2ae10106c1d4f0ec516aa04f1762093007 | 2026-01-05T04:53:50.744931Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.