Dotclear 2.24
Loading...
Searching...
No Matches
dcMaintenanceTask Class Reference
Inheritance diagram for dcMaintenanceTask:
dcMaintenanceBuildtools dcMaintenanceCSP dcMaintenanceCache dcMaintenanceCountcomments dcMaintenanceIndexcomments dcMaintenanceIndexposts dcMaintenanceLogs dcMaintenanceSynchpostsmeta dcMaintenanceVacuum dcMaintenanceZipmedia dcMaintenanceZiptheme ieMaintenanceExportblog ieMaintenanceExportfull

Public Member Functions

 __construct (dcMaintenance $maintenance)
 
 perm ()
 
 blog ()
 
 code ($code)
 
 ts ()
 
 expired ()
 
 id ()
 
 name ()
 
 description ()
 
 tab ()
 
 group ()
 
 ajax ()
 
 task ()
 
 step ()
 
 success ()
 
 error ()
 
 header ()
 
 content ()
 
 execute ()
 
 help ()
 

Protected Member Functions

 init ()
 
 log ()
 

Protected Attributes

 $maintenance
 
 $code
 
 $ts = 0
 
 $expired = 0
 
 $ajax = false
 
 $blog = false
 
 $perm = null
 
 $id
 
 $name
 
 $description
 
 $tab = 'maintenance'
 
 $group = 'other'
 
 $task
 
 $step
 
 $error
 
 $success
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( dcMaintenance  $maintenance)

Constructor.

If your task required something on construct, use method init() to do it.

Parameters
dcMaintenance$maintenanceThe maintenance

References $maintenance, $ts, dcCore\app(), error(), init(), name(), perm(), success(), and ts().

Member Function Documentation

◆ init()

◆ perm()

perm ( )

Get task permission.

Return user permission required to run this task or null for super admin.

Returns
null|string Permission.

References $perm.

Referenced by __construct().

◆ blog()

blog ( )

Get task scope. Is task limited to current blog.

Returns
boolean Limit to blog

References $blog.

Referenced by dcMaintenanceZipmedia\execute(), expired(), and ieMaintenanceExportblog\init().

◆ code()

◆ ts()

ts ( )

Get timestamp between maintenances.

Returns
false|int Timestamp

References ts().

Referenced by __construct(), expired(), and ts().

◆ expired()

expired ( )

Get task expired.

This return:

  • Timestamp of last update if it expired
  • False if it not expired or has no recall time
  • Null if it has never been executed
Returns
null|bool|int Last update

References $expired, $id, blog(), expired(), and ts().

Referenced by expired().

◆ id()

id ( )

Get task ID.

Returns
string Task ID (class name)

References $id.

◆ name()

◆ description()

◆ tab()

tab ( )

Get task tab.

Returns
null|string Task tab ID or null

References $tab.

◆ group()

group ( )

Get task group.

If task required a full tab, this must be returned null.

Returns
null|string Task group ID or null

References $group.

◆ ajax()

ajax ( )

Use ajax

Is task use maintenance ajax script for steps process.

Returns
boolean Use ajax

References $ajax.

◆ task()

◆ step()

step ( )

Get step message.

This message is displayed during task step execution.

Returns
mixed Message or null

Reimplemented in ieMaintenanceExportblog, ieMaintenanceExportfull, dcMaintenanceIndexcomments, dcMaintenanceIndexposts, and dcMaintenanceSynchpostsmeta.

References $step.

◆ success()

success ( )

Get success message.

This message is displayed when task is accomplished.

Returns
string Message or null

Reimplemented in dcMaintenanceIndexcomments, dcMaintenanceIndexposts, and dcMaintenanceSynchpostsmeta.

References $success.

Referenced by __construct(), dcMaintenanceBuildtools\init(), dcMaintenanceCache\init(), dcMaintenanceCountcomments\init(), dcMaintenanceCSP\init(), dcMaintenanceLogs\init(), and dcMaintenanceVacuum\init().

◆ error()

◆ header()

header ( )

Get header.

Headers required on maintenance page.

Returns
null|string Message or null

Referenced by dcMaintenanceZipmedia\execute(), and dcMaintenanceZiptheme\execute().

◆ content()

content ( )

Get content.

Content for full tab task.

Returns
null|string Tab's content

◆ execute()

◆ log()

log ( )
protected

Log task execution.

Sometimes we need to log task execution direct from task itself.

Referenced by dcMaintenanceZipmedia\execute(), dcMaintenanceZiptheme\execute(), ieMaintenanceExportblog\step(), and ieMaintenanceExportfull\step().

◆ help()

help ( )

Help function.

Field Documentation

◆ $maintenance

$maintenance
protected

Referenced by __construct().

◆ $code

$code
protected

Referenced by code().

◆ $ts

$ts = 0
protected

Referenced by __construct().

◆ $expired

$expired = 0
protected

Referenced by expired().

◆ $ajax

$ajax = false
protected

Referenced by ajax().

◆ $blog

$blog = false
protected

Referenced by blog().

◆ $perm

$perm = null
protected

Referenced by perm().

◆ $id

$id
protected

Referenced by expired(), and id().

◆ $name

$name
protected

Referenced by name().

◆ $description

$description
protected

Referenced by description().

◆ $tab

$tab = 'maintenance'
protected

Referenced by tab().

◆ $group

$group = 'other'
protected

Referenced by group().

◆ $task

◆ $step

$step
protected

Referenced by step().

◆ $error

$error
protected

Referenced by error().

◆ $success


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