File: SystemTask.php

package info (click to toggle)
php-horde-logintasks 2.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 600 kB
  • sloc: php: 978; xml: 563; sh: 3; makefile: 2
file content (48 lines) | stat: -rw-r--r-- 1,129 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
 * Abstract class to allow for modularization of specific system login tasks
 * that are always run on login.
 *
 * Copyright 2009-2017 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (LGPL). If you
 * did not receive this file, see http://www.horde.org/licenses/lgpl21.
 *
 * @author   Michael Slusarz <slusarz@horde.org>
 * @category Horde
 * @license  http://www.horde.org/licenses/lgpl21 LGPL 2.1
 * @package  LoginTasks
 */
abstract class Horde_LoginTasks_SystemTask
{
    /**
     * Should the task be run?
     *
     * @var boolean
     */
    public $active = true;

    /**
     * The interval at which to run the task.
     *
     * @var integer
     */
    public $interval = Horde_LoginTasks::EVERY;

    /**
     * Do login task (if it has been confirmed).
     */
    abstract public function execute();

    /**
     * Skip the current task?  If true, will not run on this access but
     * will attempt to run on the next access.
     *
     * @return boolean  Skip the current task?
     */
    public function skip()
    {
        return false;
    }

}