Created
November 19, 2011 20:41
-
-
Save fabriziomachado/1379326 to your computer and use it in GitHub Desktop.
application/workers/worker_helper.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# load stack codeigniter | |
include_once dirname(__FILE__) . '/../third_party/CIUnit/bootstrap_phpunit.php'; | |
require_default_class_job_this_worker(); | |
function require_default_class_job_this_worker() | |
{ | |
$currentFile = $_SERVER["SCRIPT_NAME"]; | |
$parts = Explode('/', $currentFile); | |
$current_worker = $parts[count($parts) - 1]; | |
$current_worker = str_replace('worker','job', $current_worker); | |
require_once(APPPATH ."/workers/$current_worker"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment