Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

base.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.41 KiB


01  <?php
02  /**
03  *
04  * This file is part of the phpBB Forum Software package.
05  *
06  * @copyright (c) phpBB Limited <https://www.phpbb.com>
07  * @license GNU General Public License, version 2 (GPL-2.0)
08  *
09  * For full copyright and license information, please see
10  * the docs/CREDITS.txt file.
11  *
12  */
13   
14  namespace phpbb\cron\task;
15   
16  /**
17  * Cron task base class. Provides sensible defaults for cron tasks
18  * and partially implements cron task interface, making writing cron tasks easier.
19  *
20  * At a minimum, subclasses must override the run() method.
21  *
22  * Cron tasks need not inherit from this base class. If desired,
23  * they may implement cron task interface directly.
24  */
25  abstract class base implements \phpbb\cron\task\task
26  {
27      private $name;
28   
29      /**
30      * Returns the name of the task.
31      *
32      * @return string        Name of wrapped task.
33      */
34      public function get_name()
35      {
36          return $this->name;
37      }
38   
39      /**
40      * Sets the name of the task.
41      *
42      * @param string    $name The task name
43      */
44      public function set_name($name)
45      {
46          $this->name = $name;
47      }
48   
49      /**
50      * Returns whether this cron task can run, given current board configuration.
51      *
52      * For example, a cron task that prunes forums can only run when
53      * forum pruning is enabled.
54      *
55      * @return bool
56      */
57      public function is_runnable()
58      {
59          return true;
60      }
61   
62      /**
63      * Returns whether this cron task should run now, because enough time
64      * has passed since it was last run.
65      *
66      * @return bool
67      */
68      public function should_run()
69      {
70          return true;
71      }
72  }
73