diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-01-18 17:03:45 -0500 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-02-12 22:05:54 -0500 |
| commit | 4e689c522f8cdb60984eb47020bee3c0535210bb (patch) | |
| tree | 239c66af525a014c0591a4b4a7727b57327007d7 | |
| parent | 92c278d39a5db7ea296c86b3a70a28b99b16ec5e (diff) | |
| download | forums-4e689c522f8cdb60984eb47020bee3c0535210bb.tar forums-4e689c522f8cdb60984eb47020bee3c0535210bb.tar.gz forums-4e689c522f8cdb60984eb47020bee3c0535210bb.tar.bz2 forums-4e689c522f8cdb60984eb47020bee3c0535210bb.tar.xz forums-4e689c522f8cdb60984eb47020bee3c0535210bb.zip | |
[feature/system-cron] Added documentation for cron manager constructor.
PHPBB3-9596
| -rw-r--r-- | phpBB/includes/cron/manager.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/phpBB/includes/cron/manager.php b/phpBB/includes/cron/manager.php index d954775956..21dcb91695 100644 --- a/phpBB/includes/cron/manager.php +++ b/phpBB/includes/cron/manager.php @@ -33,7 +33,9 @@ class phpbb_cron_manager protected $tasks = array(); /** - * Directory containing cron tasks + * Path to the root of directory tree with tasks. + * For bundled phpBB tasks, this is the path to includes/cron/tasks + * under phpBB root. * @var string */ protected $task_path; @@ -53,9 +55,21 @@ class phpbb_cron_manager /** * Constructor. Loads all available tasks. * + * Tasks will be looked up in directory tree rooted at $task_path. + * Task classes will be autoloaded and must be named according to + * autoloading naming conventions. To load cron tasks shipped with + * phpbb, pass $phpbb_root_path . 'includes/cron/task' as $task_path. + * + * If $cache is given, names of found cron tasks will be cached in it + * for one hour. Note that the cron task names are stored without + * namespacing; if two different phbb_cron_manager instances are + * constructed with different $task_path arguments but the same $cache, + * the second instance will use task names found by the first instance. + * * @param string $task_path Directory containing cron tasks * @param string $phpEx PHP file extension * @param phpbb_cache_driver_interface $cache Cache for task names (optional) + * @return void */ public function __construct($task_path, $phpEx, phpbb_cache_driver_interface $cache = null) { |
