Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
HIPO_Herder Class Reference
Inheritance diagram for HIPO_Herder:
MySource_Object

Public Member Functions

 HIPO_Herder ()
 
getBackendOutputter ()
 
getJob ($code_name)
 
 uncacheJob ($code_name)
 
 getProcessURL ($code_name)
 
 processWeb ()
 
 paintWeb ()
 
 prepareProcessServer (&$input_data, &$output_data, $taskid)
 
 processServer ()
 
 serverSigHandler ($signo)
 
 queueHipo ($job_type, $vars=Array(), $on_complete_url='', $job_dir='')
 
 runQueuedJobs ($on_complete_url='')
 
 freestyleHipo ($job_type, &$vars, $job_dir='')
 
 _includeHipoJobLocales ($job_dir)
 
 paintBackend (&$backend)
 
 getJobsForUser ($userid)
 
- Public Member Functions inherited from MySource_Object
 MySource_Object ()
 
 __sleep ()
 
 __wakeup ()
 

Data Fields

 $_jobs = Array()
 
 $_queued_jobs = Array()
 
 $ho = NULL
 
 $threshold = 0
 
- Data Fields inherited from MySource_Object
 $_tmp
 

Detailed Description

Definition at line 27 of file hipo_herder.inc.

Member Function Documentation

_includeHipoJobLocales (   $job_dir)

Include the locales for a hipo job

Parameters
string$job_dirwhere to find this hipo job include files
Returns
void private

Definition at line 800 of file hipo_herder.inc.

freestyleHipo (   $job_type,
$vars,
  $job_dir = '' 
)

Run the HIPO Job right now

Parameters
string$job_typethe type of job (hipo_job_BLAH)
array&$varsHIPO vars to send to the job
string$job_dirwhere to find this hipo job include files (can be left blank to use default hipo job directory)
Returns
array public

Definition at line 771 of file hipo_herder.inc.

& getBackendOutputter ( )

Backend outputter for hipos

Returns
object public

Definition at line 71 of file hipo_herder.inc.

& getJob (   $code_name)

Returns the job for the passed code name

Returns the requested hipo job OR null on error

Parameters
string$code_namethe codename of the job
Returns
object public

Definition at line 92 of file hipo_herder.inc.

getJobsForUser (   $userid)

Gets the jobs with percentage done for specified user

Parameters
int$useridthe user id
Returns
array public

Definition at line 1226 of file hipo_herder.inc.

getProcessURL (   $code_name)

Return the URL that will continue the processing of the HIPO

If the HIPO is finsihed, the URL returned will be the on_complete_url in the _options array of the HIPO so that the HIPO can redirect back to where it started

Parameters
string$code_namethe codename of the job
Returns
string public

Definition at line 181 of file hipo_herder.inc.

Constructor

Returns
object public

Definition at line 59 of file hipo_herder.inc.

paintBackend ( $backend)

Print out the backend interface for the Herder

Parameters
object&$backendreference to the backend object
Returns
void public

Definition at line 830 of file hipo_herder.inc.

paintWeb ( )

Called by the web script to paint the current process bar

Returns
void public

Definition at line 260 of file hipo_herder.inc.

prepareProcessServer ( $input_data,
$output_data,
  $taskid 
)

Called by the daemon script to inform the hipo manager that it is about to start processing This is needed so that we can check the the input from the web script and returns an ACK or an error, indicating whether processing should start or not

Parameters
array&$input_datadata sent from the web script
array&$output_datadata to be sent back to the web script
string$taskidthe id of the task on the server (used if we need to abort later on)
Returns
boolean public

Definition at line 479 of file hipo_herder.inc.

processServer ( )

Called by the daemon script to inform the hipo manager that it can start processing Process the current step of a HIPO in a server environment

This function should only be called by a HIPO running on the HIPO server, so we assume no timeouts here and continually call the process function of the current step until it is completed.

Returns
boolean public

Definition at line 537 of file hipo_herder.inc.

processWeb ( )

Called by the web script to inform the hipo manager that it can start processing

Returns
boolean public

Definition at line 202 of file hipo_herder.inc.

queueHipo (   $job_type,
  $vars = Array(),
  $on_complete_url = '',
  $job_dir = '' 
)

Queue up a HIPO Job to run at the next refresh

Parameters
string$job_typethe type of job (hipo_job_BLAH)
array$varsHIPO vars to send to the job
string$on_complete_urlthe URL to redirect to once all HIPOs are done (can be left blank to use the current URL)
string$job_dirwhere to find this hipo job include files (can be left blank to use default hipo job directory)
Returns
boolean public

Definition at line 634 of file hipo_herder.inc.

runQueuedJobs (   $on_complete_url = '')

Prepare the HIPO Jobs that have been queued for the current user

Parameters
string$on_complete_urlthe URL to redirect to once all HIPOs are done (can be left blank to use the current URL when the HIPO jobs were queued)
Returns
mixed string|array public

Definition at line 694 of file hipo_herder.inc.

serverSigHandler (   $signo)

The handler for the any signals from the system

Parameters
int$signothe signal number
Returns
void public

Definition at line 598 of file hipo_herder.inc.

uncacheJob (   $code_name)

De-caches a job from the job list, so it can be run again in the same script cleanly

Mainly to do with freestylin' jobs that spawn a dependant sub-job - it needs to generate a code name, and eventually hits the job cache. If the same job is run the same session, it will re-use the job, even if complete.

No checking of hipo job status performed. Probably not a good idea to run until a job is complete (whether through abortion or natural circumstances).

Parameters
string$code_nameThe code name of the job to uncache
Returns
boolean

Definition at line 157 of file hipo_herder.inc.


The documentation for this class was generated from the following file: