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

Public Member Functions

 __construct ($assetid=0)
 
 create (Array &$link)
 
 _getAllowedLinks ()
 
 lockTypes ()
 
 canClone ()
 
 morph ($new_type_code)
 
 moveLinkPos ($linkid, $sort_order=-1)
 
 deleteLink ($linkid, $check_locked=TRUE)
 
 setAttrValue ($name, $value)
 
 addJob (Cron_Job $job, User $user, $link_type=SQ_LINK_TYPE_3, $read_only=FALSE)
 
 removeJob (Cron_Job $job)
 
 getJobs ($type_code='cron_job', $strict_type_code=TRUE)
 
 timeOfNextRun ()
 
 readableRefreshTime ()
 
 isExcludedTime ($start_time)
 
 run ()
 
 getJobsToRun ($start_ts, $end_ts, $ignore_jobs=Array())
 
 _errorHandler ($err_no, $err_msg, $err_file, $err_line)
 
 getLastRun ()
 
- Public Member Functions inherited from Asset
 Asset ($assetid=0)
 
 create (Array &$link)
 
 load ($assetid)
 
 _loadDataPaths ()
 
 reload ()
 
 canDelete ()
 
 delete ($release_lock=TRUE, $check_locked=TRUE)
 
 useSystemVersion ()
 
 loadSystemVersion ()
 
 saveSystemVersion ()
 
 clearSystemVersion ()
 
 revertToSystemVersion ()
 
 revertNoticeLinksToSystemVersion ()
 
 _updated ($update_parents=TRUE)
 
 type ()
 
 getTypeAncestors ($include_asset=TRUE)
 
 incrementVersion ($number='micro', $update_parents=TRUE)
 
 getLanguages ()
 
 setLanguages (Array $languages)
 
 setCharset ($charset)
 
 setForceSecure ($force_secure)
 
 remapAssetids (Array $map)
 
 morph ($new_type_code)
 
 _morphCleanup ($new_type_code)
 
 onRequestKeywords (Asset $broadcaster, Array $vars=Array())
 
 canClone ()
 
 cloneComponents (Asset $clone, Array $components, $override=FALSE)
 
 cloneComponentsAdditional (Asset $clone, Array $components)
 
 cloneLinks (Asset $clone)
 
 getStatus ()
 
 getAvailableStatii ()
 
 getStatusDescription ()
 
 processStatusChange ($new_status, $update_parents=TRUE, $run_updated=TRUE)
 
 setDate ($date_type, $time=NULL, $userid=NULL)
 
 lockTypes ()
 
 canForceablyAcquireLock ($lock_type)
 
 getEditingLocks ($keywords)
 
 _getAllowedLinks ()
 
 createLink (Asset $minor, $link_type, $value='', $sort_order=NULL, $dependant='0', $exclusive='0', $moving=FALSE, $locked=0)
 
 prepareLink (Asset $asset, $side_of_link, &$link_type, &$value, &$sort_order, &$dependant, &$exclusive)
 
 canCreateLink (Asset $minor, $link_type, $exclusive)
 
 canMoveLink (Asset $minor, Asset $old_major, $link_type)
 
 describeLink ($linkid)
 
 isDeletableLink ($linkid)
 
 canDeleteLink ($linkid)
 
 deleteLink ($linkid, $check_locked=TRUE)
 
 linksUpdated ()
 
 canCloneLink ()
 
 saveAttributes ($dont_run_updated=FALSE, $log_message=TRUE)
 
 setAttrValue ($name, $value)
 
 attr ($name)
 
attrByRef ($name)
 
 getAttribute ($name, $mute_errors=FALSE)
 
 getAssetKeywords ($descriptions=FALSE)
 
 getAvailableKeywords ()
 
 getKeywordReplacement ($keyword)
 
 getAssetWebPathKeywordReplacement ()
 
 getCustomKeywordReplacements ($keywords=Array(), $invoke_backend=FALSE)
 
 processCustomKeywords ($keywords=Array())
 
 getContent ()
 
 setContent ()
 
 getEffectiveLastUpdatedTime ($assetids)
 
 readAccess (Array $assetids=Array())
 
 writeAccess ($lock_type='', Array $assetids=Array(), $only_workflow=TRUE)
 
 adminAccess ($lock_type='', Array $assetids=Array())
 
 backendAccess ()
 
 liveEditAccess ($lock_type)
 
 canliveEdit ($lock_type)
 
 effectiveUnrestricted ()
 
 checkAccess ($perm, $lock_type, Array $assetids=Array(), $only_workflow=TRUE)
 
 accessEffective ()
 
 permissionsUpdated ()
 
 printFrontend ()
 
 printFrontendAsset (Asset $asset, $design=NULL)
 
 getValidProtocols ()
 
 printHead ()
 
 printBody ()
 
 getCurrentPaintLayoutName ()
 
 getCurrentDesignName ()
 
 printBodyWithPaintLayout ($layout_id='')
 
 initLimbo ()
 
 printLimbo ()
 
 paintBackend (Backend_Outputter $o)
 
 getPrefix ()
 
 processBackend (Backend_Outputter $o, Array &$link)
 
 getEI ()
 
 getEditFns ()
 
 getBackendHref ($screen='', $backend_page=TRUE)
 
 getURL ($base_url=NULL, $ignore_rollback=FALSE, $base_contextid=NULL)
 
 getURLs ()
 
 getHref ($base_url=NULL, $ignore_rollback=FALSE)
 
 getWebDataPath ()
 
 getWebPaths ()
 
 saveWebPaths ($paths, $auto_add_remaps=TRUE)
 
 getLookups ($field='')
 
 getDesignLookups ()
 
 getLookupValues ($inherited=NULL, $prefix='', $like_search=TRUE, $ignore_override=FALSE)
 
 deleteLookupValue ($layout_name, $layout_value)
 
 setPaintLayouts ($layouts)
 
 updateLookups ($auto_add_remaps=TRUE)
 
 setLookupValues (Array $values)
 
 getAssetStatusDescriptionKeywordReplacement ()
 
 getAssetStatusColourKeywordReplacement ()
 
 replaceKeywordsInString ($string)
 
 fastTrack ($tasks)
 
 unFastTrack ($tasks)
 
 shouldFastTrack ($task, $assetid=NULL)
 
 getFaskTrackedTaskAssetids ($task)
 
 getDependantParentsURL ()
 
- Public Member Functions inherited from MySource_Object
 MySource_Object ()
 
 __sleep ()
 
 __wakeup ()
 

Data Fields

 $error_log_file_name = 'cron_errors'
 
- Data Fields inherited from Asset
 $id = 0
 
 $version = ''
 
 $name = ''
 
 $short_name = ''
 
 $status
 
 $languages = ''
 
 $charset = ''
 
 $force_secure = '0'
 
 $created
 
 $created_userid
 
 $updated
 
 $updated_userid
 
 $published
 
 $published_userid
 
 $status_changed
 
 $status_changed_userid
 
 $_is_cacheable = FALSE
 
 $vars = Array()
 
 $_available_keywords = Array()
 
 $data_path_suffix = ''
 
 $data_path = ''
 
 $data_path_public = ''
 
 $_ser_attrs = FALSE
 
- Data Fields inherited from MySource_Object
 $_tmp
 

Protected Member Functions

 _getName ($short_name=FALSE)
 
 _clob2Str ($expression)
 
- Protected Member Functions inherited from Asset
 _preCreateCheck (Array &$link)
 
 _createAdditional (Array &$link)
 
 _abortCreate ($trigger_level_changed=FALSE, $linkid=0)
 
 _loadVars ()
 
 _getName ($short_name=FALSE, $contextid=NULL)
 
 _getKeywordReplacement ($keyword)
 
 _checkPermissionAccess ($perm, $assetids=Array(), $only_workflow=TRUE)
 
 makeAndSaveInitialWebPath ($path, $parent_link=NULL)
 

Detailed Description

Definition at line 31 of file cron_manager.inc.

Constructor & Destructor Documentation

__construct (   $assetid = 0)

Constructor

Parameters
int$assetidthe asset id to be loaded

Definition at line 46 of file cron_manager.inc.

Member Function Documentation

_clob2Str (   $expression)
protected

Converts a CLOB expression to a varchar for comarisons with other varchar fields

Returns the sql to convert to a varchar, or the expression unchanged if no conversion is needed

Parameters
string$expressionthe expression to convert to a varchar
Returns
string private

Definition at line 752 of file cron_manager.inc.

_errorHandler (   $err_no,
  $err_msg,
  $err_file,
  $err_line 
)

This function captures all errors and warnings that occur during the execution of run()

Parameters
int$err_noThe type of error (E_*)
string$err_msgThe error message
string$err_fileThe file the error occured in
string$err_lineThe line the error occured on
Returns
void private
See Also
run()

Definition at line 981 of file cron_manager.inc.

_getAllowedLinks ( )

Return an array of all the permitted links type, the type asset and the cardinality

Returns
array private
See Also
Asset::_getAllowLinks()

Definition at line 122 of file cron_manager.inc.

_getName (   $short_name = FALSE)
protected

Return a name to use to describe this instance of the asset

Parameters
boolean$short_namewhether or not we are after the shortname or the full name
Returns
string private
See Also
Asset::_getName()

Definition at line 108 of file cron_manager.inc.

addJob ( Cron_Job  $job,
User  $user,
  $link_type = SQ_LINK_TYPE_3,
  $read_only = FALSE 
)

Adds a job to the cron manager

Parameters
Cron_Job$joba reference to the cron job to add to the system
User$usera reference to the user that this job will run as
string$link_typetype of the link between the cron manager and the job
boolean$read_onlyif TRUE, the cron job can only be removed by the system
Returns
boolean public

Definition at line 293 of file cron_manager.inc.

canClone ( )

Return FALSE always because we don't want to be able to clone a cron manager

Returns
boolean public

Definition at line 155 of file cron_manager.inc.

create ( Array &  $link)

Create this asset

Return either the linkid or FALSE on failure

Parameters
array&$linkinformation used to create the initial link
Returns
mixed int|boolean public
See Also
Asset::create()

Definition at line 72 of file cron_manager.inc.

deleteLink (   $linkid,
  $check_locked = TRUE 
)

Remove a link where this asset is the major player

Parameters
int$linkidthe link id of the link to remove
boolean$check_lockedCheck if the link is locked or not
Returns
boolean public
See Also
Asset_Manager::deleteAssetLink()

Definition at line 209 of file cron_manager.inc.

getJobs (   $type_code = 'cron_job',
  $strict_type_code = TRUE 
)

Returns an array of cron jobs that are active under cron manager

Returns an array of references to the selected cron job type

Parameters
string | array$type_codethe type of cron job, if an array returns link if matches any of the array values
boolean$strict_type_codewhether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes
Returns
array public
See Also
Asset::getLinks()

Definition at line 346 of file cron_manager.inc.

getJobsToRun (   $start_ts,
  $end_ts,
  $ignore_jobs = Array() 
)

Get the jobs that need to be run for the passed time period

Parameters
int$start_tsthe starting timestamp of the time period
int$end_tsthe ending timestamp of the time period
array$ignore_jobsa list of assetids to ignore
Returns
array public

Definition at line 773 of file cron_manager.inc.

getLastRun ( )

get an integer value in Last Run attribute

Returns
int public

Definition at line 1066 of file cron_manager.inc.

isExcludedTime (   $start_time)

Check if current time is within excluded time

Parameters
int$start_timeCurrent time
Returns
boolean public

Definition at line 408 of file cron_manager.inc.

lockTypes ( )

Return a list of lock types available for this asset type

Returns
array public

Definition at line 140 of file cron_manager.inc.

morph (   $new_type_code)

Morph this asset to either one of it's parent type or one of it's children types Only succeeds if $type_code asset's is allowed to link to all children that this asset has

Parameters
string$new_type_codethe new type_code to attempt to cast this asset to
Returns
boolean public
See Also
Asset::morph()

Definition at line 172 of file cron_manager.inc.

moveLinkPos (   $linkid,
  $sort_order = -1 
)

Moves a link from one place in this assets links order to another position

Parameters
int$linkidthe link id of the link to move about
string$sort_orderthe position in the links list that this link should take, if less than zero places at end of list
Returns
boolean public
See Also
Asset::moveLinkPos()

Definition at line 191 of file cron_manager.inc.

readableRefreshTime ( )

Returns a string with the readable version of how often the cron runs

Returns
string public

Definition at line 380 of file cron_manager.inc.

removeJob ( Cron_Job  $job)

Removes a job form the cron manager

Parameters
Cron_Job$joba reference to the cron job to remove
Returns
boolean public

Definition at line 317 of file cron_manager.inc.

string suffix to data dir where the error log should be stored when we are run ( )

Run the jobs that need executing in the system

Returns
void public

Definition at line 454 of file cron_manager.inc.

setAttrValue (   $name,
  $value 
)

Set the value for the passed variable to the passed value

Parameters
string$namethe name of the attribute
string$valuethe new value of the attribute
Returns
boolean public

Definition at line 236 of file cron_manager.inc.

timeOfNextRun ( )

Returns the time of the next run of the cron manager

Returns
int public

Definition at line 367 of file cron_manager.inc.


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