Squiz Matrix
4.12.2
|
Public Member Functions | |
HIPO_Job_Tool_Search_Replace ($code_name='') | |
getCodeName () | |
getHipoName () | |
getInitialStepData () | |
prepare () | |
getLockAssetDetails (&$job_type, &$running_vars, &$options) | |
getRegenerateMetadataDetails (&$job_type, &$running_vars, &$options) | |
getReindexAssetDetails (&$job_type, &$running_vars, &$options, &$hipo_vars) | |
releaseLocks (&$step_data, $prefix) | |
_getSearchCounts () | |
paintConfirmation (&$step_data, &$o, $prefix) | |
processConfirmation (&$step_data, $prefix) | |
_printAttributeMatches ($assetid, $prefix, &$attr_matches) | |
_printMetadataMatches ($assetid, $prefix, &$meta_matches) | |
_printSchemaMatches ($assetid, $prefix, &$schema_matches) | |
_printContentMatches ($assetid, $prefix, &$div_matches) | |
processContent (&$step_data, $prefix) | |
processSchemas (&$step_data, $prefix) | |
processAttributes (&$step_data, $prefix) | |
processMetadata (&$step_data, $prefix) | |
_getOccurrences ($needle, $haystack) | |
_replaceOccurrences ($needle, $new_needle, $haystack, $offsets, $case_match=FALSE) | |
_matchCapitals ($teacher, $student) | |
_printRows ($needle, $haystack) | |
_printHighlightedMatch ($needle, $haystack, $offset) | |
_findBackBreak ($haystack, $offset, $limit=20) | |
_findForwardBreak ($haystack, $offset, $limit=55) | |
_setupMatches () | |
_updateSearchData ($prefix) | |
Public Member Functions inherited from HIPO_Job | |
HIPO_Job ($code_name='') | |
getCodeName () | |
getHipoName () | |
getInitialStepData () | |
complete () | |
percentDone () | |
& | getRunningVars () |
setRunningVars (&$vars) | |
setOption ($name, $value) | |
getOption ($name) | |
setHipoVar ($name, $value) | |
getHipoVar ($name) | |
_addError ($error, $warning=FALSE) | |
getErrors () | |
prepare () | |
initialise ($source_code_name=NULL) | |
getThreshold () | |
getThresholdPercentageRequired () | |
freestyle () | |
load ($code_name) | |
save ($ignore_running_mode=FALSE) | |
_updateProgress () | |
_renewLastUpdated ($new_time=NULL) | |
& | _getSubJob () |
getInitialiseMode () | |
setRunningMode ($mode, $server_taskid='') | |
getRunningMode () | |
autoStep () | |
getNextStep () | |
skipStep ($stepid=0) | |
paint (&$o, $nested=FALSE) | |
process () | |
processWeb (&$step_data, $prefix) | |
processServer (&$step_data, $prefix) | |
abort ($abort_source=TRUE, $abort_dependant=TRUE) | |
jobAborted () | |
_paintErrorReport () | |
paintStepDefault (&$step_data, &$o, $prefix) | |
_errorHandler ($err_no, $err_msg, $err_file, $err_line) | |
getDependantHipoJob () | |
Public Member Functions inherited from MySource_Object | |
MySource_Object () | |
__sleep () | |
__wakeup () | |
Additional Inherited Members | |
Static Public Member Functions inherited from HIPO_Job | |
static | paintConfig (&$o, $class, $write_access) |
static | getConfigVars () |
static | paintProgressBar ($percent_done, $message='', $label_class='sq-hipo-progress-bar-label', $percent_class='sq-hipo-progress-bar-percent', $bar_main_class='sq-hipo-progress-bar-main', $bar_done_class='sq-hipo-progress-bar-done') |
Data Fields inherited from HIPO_Job | |
$code_name = '' | |
$source_code_name = '' | |
$userid = 0 | |
$last_updated = 0 | |
$hipo_name = '' | |
$is_prepared = FALSE | |
$uses_trans = TRUE | |
$_hipo_vars | |
$_options | |
$_running_vars = Array() | |
$_current_mode = 'web' | |
$_steps = Array() | |
Definition at line 31 of file hipo_job_tool_search_replace.inc.
_findBackBreak | ( | $haystack, | |
$offset, | |||
$limit = 20 |
|||
) |
Find a point in the string behind the current point to cutoff display at
string | $haystack | The string to check |
int | $offset | Where to start |
int | $limit | maximum number of characters |
Definition at line 1155 of file hipo_job_tool_search_replace.inc.
_findForwardBreak | ( | $haystack, | |
$offset, | |||
$limit = 55 |
|||
) |
Find a point in the string to cutoff display at
string | $haystack | The string to check |
int | $offset | Where to start |
int | $limit | maximum number of characters |
Definition at line 1199 of file hipo_job_tool_search_replace.inc.
_getOccurrences | ( | $needle, | |
$haystack | |||
) |
Get the indices at which needle occurs in haystack
string | $needle | The string being looked for |
string | $haystack | The string being looked through |
Definition at line 1010 of file hipo_job_tool_search_replace.inc.
_getSearchCounts | ( | ) |
Get the search count
Definition at line 355 of file hipo_job_tool_search_replace.inc.
_matchCapitals | ( | $teacher, | |
$student | |||
) |
Match capitalisation of first string in the second
string | $teacher | The string to match |
string | $student | The string to capitalise |
Definition at line 1085 of file hipo_job_tool_search_replace.inc.
_printAttributeMatches | ( | $assetid, | |
$prefix, | |||
& | $attr_matches | ||
) |
Print matches from an asset's attributes
string | $assetid | The assets id |
string | $prefix | Prefix for the fields |
array | &$attr_matches | Matches |
Definition at line 584 of file hipo_job_tool_search_replace.inc.
_printContentMatches | ( | $assetid, | |
$prefix, | |||
& | $div_matches | ||
) |
Print matches from an asset's content
string | $assetid | The assets id |
string | $prefix | Prefix for the fields |
array | &$div_matches | Matches |
Definition at line 739 of file hipo_job_tool_search_replace.inc.
_printHighlightedMatch | ( | $needle, | |
$haystack, | |||
$offset | |||
) |
Prints an example of $needle, in $haystack with highlighting
string | $needle | The string to highlight for |
string | $haystack | The string to look in |
int | $offset | Where to find $needle |
Definition at line 1131 of file hipo_job_tool_search_replace.inc.
_printMetadataMatches | ( | $assetid, | |
$prefix, | |||
& | $meta_matches | ||
) |
Print matches in an asset's metadata
string | $assetid | The assets id |
string | $prefix | Prefix for the fields |
array | &$meta_matches | Matches |
Definition at line 636 of file hipo_job_tool_search_replace.inc.
_printRows | ( | $needle, | |
$haystack | |||
) |
Fill a table with highlighted search terms.
string | $needle | The string to match |
string | $haystack | The string to look in |
Definition at line 1109 of file hipo_job_tool_search_replace.inc.
_printSchemaMatches | ( | $assetid, | |
$prefix, | |||
& | $schema_matches | ||
) |
Print matches in a metadata schema
string | $assetid | The assets id |
string | $prefix | Prefix for the fields |
array | &$schema_matches | Matches |
Definition at line 688 of file hipo_job_tool_search_replace.inc.
_replaceOccurrences | ( | $needle, | |
$new_needle, | |||
$haystack, | |||
$offsets, | |||
$case_match = FALSE |
|||
) |
Replace all instances of needle in the haystack that occur in offsets
string | $needle | The string being looked for |
string | $new_needle | The string to insert |
string | $haystack | The string being looked through |
array | $offsets | Indices of instances you wish to replace |
boolean | $case_match | Whether to match capitilisation of the needle in replace |
Definition at line 1053 of file hipo_job_tool_search_replace.inc.
_setupMatches | ( | ) |
Insert search matches into _running_vars
Definition at line 1243 of file hipo_job_tool_search_replace.inc.
_updateSearchData | ( | $prefix | ) |
Unset any search matches that are unneeded
string | $prefix | Prefix for the fields |
Definition at line 1281 of file hipo_job_tool_search_replace.inc.
getCodeName | ( | ) |
Returns a unique codename the HIPO can use to ensure it is not being run twice
Definition at line 55 of file hipo_job_tool_search_replace.inc.
getHipoName | ( | ) |
Returns the (localised) HIPO name
Definition at line 68 of file hipo_job_tool_search_replace.inc.
getInitialStepData | ( | ) |
Returns the steps in this hipo, possibly with localised step names and messages
Definition at line 82 of file hipo_job_tool_search_replace.inc.
getLockAssetDetails | ( | & | $job_type, |
& | $running_vars, | ||
& | $options | ||
) |
This function is used to set-up the details for locking the assets by the nested HIPO_Job
string | &$job_type | Job type |
array | &$running_vars | Job vars |
array | &$options | Options |
Definition at line 233 of file hipo_job_tool_search_replace.inc.
getRegenerateMetadataDetails | ( | & | $job_type, |
& | $running_vars, | ||
& | $options | ||
) |
This function is used to set-up the details for the regenerate metadata nested HIPO_Job
string | &$job_type | Job type |
array | &$running_vars | Job vars |
array | &$options | Options |
Definition at line 259 of file hipo_job_tool_search_replace.inc.
getReindexAssetDetails | ( | & | $job_type, |
& | $running_vars, | ||
& | $options, | ||
& | $hipo_vars | ||
) |
This function is used to set-up the details for the reindex assets nested HIPO_Job
string | &$job_type | Type of job |
array | &$running_vars | Job vars |
array | &$options | Options |
array | &$hipo_vars | Hipo vars |
Definition at line 284 of file hipo_job_tool_search_replace.inc.
HIPO_Job_Tool_Search_Replace | ( | $code_name = '' | ) |
Constructor
string | $code_name | a unique codename the HIPO |
Definition at line 40 of file hipo_job_tool_search_replace.inc.
paintConfirmation | ( | & | $step_data, |
& | $o, | ||
$prefix | |||
) |
Paints some option for the user to specify what replacements are to be made as a result of the search
array | &$step_data | a reference to the step data for this step |
object | &$o | the hipo backend outputter object |
string | $prefix | a string for prefixing form variables |
Definition at line 403 of file hipo_job_tool_search_replace.inc.
prepare | ( | ) |
Prepares the running vars and gets the children of the asset in question
Definition at line 211 of file hipo_job_tool_search_replace.inc.
processAttributes | ( | & | $step_data, |
$prefix | |||
) |
Proccess replacements in Attribute fields
array | &$step_data | a reference to the step data for this step |
string | $prefix | a string for prefixing form variables |
Definition at line 892 of file hipo_job_tool_search_replace.inc.
processConfirmation | ( | & | $step_data, |
$prefix | |||
) |
Processes the confirmation/match selection step of the HIPO
array | &$step_data | a reference to the step data for this step |
string | $prefix | a string for prefixing form variables |
Definition at line 508 of file hipo_job_tool_search_replace.inc.
processContent | ( | & | $step_data, |
$prefix | |||
) |
Process replacements in asset contents
array | &$step_data | a reference to the step data for this step |
string | $prefix | a string for prefixing form variables |
Definition at line 789 of file hipo_job_tool_search_replace.inc.
processMetadata | ( | & | $step_data, |
$prefix | |||
) |
Process replacements in Metadata fields
array | &$step_data | a reference to the step data for this step |
string | $prefix | a string for prefixing form variables |
Definition at line 943 of file hipo_job_tool_search_replace.inc.
processSchemas | ( | & | $step_data, |
$prefix | |||
) |
Process replacements in schema
array | &$step_data | a reference to the step data for this step |
string | $prefix | a string for prefixing form variables |
Definition at line 839 of file hipo_job_tool_search_replace.inc.
releaseLocks | ( | & | $step_data, |
$prefix | |||
) |
Release the locks that were acquired while cloning assets
array | &$step_data | a reference to the array of information about the current step |
string | $prefix | prefix for form vars |
Definition at line 312 of file hipo_job_tool_search_replace.inc.