Skip to content

Commit

Permalink
Merge pull request #102 from jpirkey/fix-default-class-prefix
Browse files Browse the repository at this point in the history
Fix default class prefix
  • Loading branch information
j03k64 committed Sep 5, 2014
2 parents 73f59de + ee415e5 commit 0e77571
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 1 addition & 5 deletions GearmanManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,10 @@ protected function getopt($config = array()) {

if (isset($opts['p'])) {
$this->prefix = $opts['p'];
} elseif(!empty($this->config['prefix'])) {
} elseif(isset($this->config['prefix'])) {
$this->prefix = $this->config['prefix'];
} elseif(defined('NET_GEARMAN_JOB_CLASS_PREFIX')) {
$this->prefix = NET_GEARMAN_JOB_CLASS_PREFIX;
} else {
$this->prefix = 'Net_Gearman_Job_';
}

if(isset($opts['u'])){
Expand Down Expand Up @@ -1219,5 +1217,3 @@ protected function show_help($msg = "") {
}

}

?>
6 changes: 6 additions & 0 deletions GearmanPearManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ class GearmanPearManager extends GearmanManager {

private $start_time;

/**
* Job Class prefix to use.
* @var string
*/
protected $prefix = 'Net_Gearman_Job_';

/**
* Starts a worker for the PEAR library
*
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"autoload": {
"classmap": [ "GearmanManager.php", "GearmanPearManager.php", "GearmanPeclManager.php" ]
}
}
}

0 comments on commit 0e77571

Please sign in to comment.