string) */ private $rip_options; /** * Constructs a new instance of this Worker class * * @param GearmanJob $gearman_job GearmanJob object describing the task distributed to this worker * @throws RippingCluster_Exception_LogicException */ private function __construct(GearmanJob $gearman_job) { $this->output = ''; $this->gearman_job = $gearman_job; $this->rip_options = unserialize($this->gearman_job->workload()); if ( ! $this->rip_options['id']) { throw new RippingCluster_Exception_LogicException("Job ID must not be zero/null"); } $this->job = RippingCluster_Job::fromId($this->rip_options['id']); } public static function init() { // Nothing to do } /** * Returns the list of functions (and names) implemented by this plugin for registration with Gearman * * @return array(string => callback) */ public static function workerFunctions() { return array( 'bluray_rip' => array(__CLASS__, 'rip'), ); } public static function run($args) { //$rip = new self($job); //$rip->execute(); } /** * Executes the process for ripping the source to the final output * */ private function execute() { // TODO } } ?>