[feature/system-cron] add phpbb_ prefix to all class names

PHPBB3-9596
This commit is contained in:
Igor Wiedler 2010-10-28 22:26:49 +02:00 committed by Oleg Pudeyev
parent 0aa491ffa2
commit a9e0f9947d
15 changed files with 20 additions and 20 deletions

View file

@ -242,5 +242,5 @@ foreach ($cache->obtain_hooks() as $hook)
if (!$config['use_system_cron']) if (!$config['use_system_cron'])
{ {
$cron = new cron_manager(); $cron = new phpbb_cron_manager();
} }

View file

@ -63,7 +63,7 @@ if ($config['use_system_cron'])
{ {
$use_shutdown_function = false; $use_shutdown_function = false;
$cron = new cron_manager(); $cron = new phpbb_cron_manager();
} }
else else
{ {

View file

@ -20,7 +20,7 @@ if (!defined('IN_PHPBB'))
* Cron lock class * Cron lock class
* @package phpBB3 * @package phpBB3
*/ */
class cron_lock class phpbb_cron_lock
{ {
private $cron_id; private $cron_id;

View file

@ -23,7 +23,7 @@ if (!defined('IN_PHPBB'))
* *
* @package phpBB3 * @package phpBB3
*/ */
class cron_manager class phpbb_cron_manager
{ {
private $tasks = array(); private $tasks = array();
@ -94,9 +94,9 @@ class cron_manager
{ {
foreach ($task_names as $task_name) foreach ($task_names as $task_name)
{ {
$class = "cron_task_$task_name"; $class = "phpbb_cron_task_$task_name";
$task = new $class(); $task = new $class();
$wrapper = new cron_task_wrapper($task); $wrapper = new phpbb_cron_task_wrapper($task);
$this->tasks[] = $wrapper; $this->tasks[] = $wrapper;
} }
} }
@ -167,7 +167,7 @@ class cron_manager
$class = $task->get_name(); $class = $task->get_name();
$task = new $class($args); $task = new $class($args);
// need to wrap the new task too // need to wrap the new task too
$task = new cron_task_wrapper($task); $task = new phpbb_cron_task_wrapper($task);
} }
return $task; return $task;
} }

View file

@ -20,7 +20,7 @@ if (!defined('IN_PHPBB'))
* Cron task interface * Cron task interface
* @package phpBB3 * @package phpBB3
*/ */
interface cron_task interface phpbb_cron_task
{ {
/** /**
* Runs this cron task. * Runs this cron task.
@ -58,7 +58,7 @@ interface cron_task
* *
* @package phpBB3 * @package phpBB3
*/ */
interface parametrized_cron_task extends cron_task interface phpbb_parametrized_cron_task extends cron_task
{ {
/** /**
* Returns parameters of this cron task as an array. * Returns parameters of this cron task as an array.

View file

@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
* *
* @package phpBB3 * @package phpBB3
*/ */
class cron_task_core_prune_all_forums extends cron_task_base class phpbb_cron_task_core_prune_all_forums extends phpbb_cron_task_base
{ {
/** /**
* Runs this cron task. * Runs this cron task.

View file

@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
* *
* @package phpBB3 * @package phpBB3
*/ */
class cron_task_core_prune_forum extends cron_task_base implements parametrized_cron_task class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements phpbb_parametrized_cron_task
{ {
private $forum_data; private $forum_data;

View file

@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
* *
* @package phpBB3 * @package phpBB3
*/ */
class cron_task_core_queue extends cron_task_base class phpbb_cron_task_core_queue extends phpbb_cron_task_base
{ {
/** /**
* Runs this cron task. * Runs this cron task.

View file

@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
* *
* @package phpBB3 * @package phpBB3
*/ */
class cron_task_core_tidy_cache extends cron_task_base class phpbb_cron_task_core_tidy_cache extends phpbb_cron_task_base
{ {
/** /**
* Runs this cron task. * Runs this cron task.

View file

@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
* *
* @package phpBB3 * @package phpBB3
*/ */
class cron_task_core_tidy_database extends cron_task_base class phpbb_cron_task_core_tidy_database extends phpbb_cron_task_base
{ {
/** /**
* Runs this cron task. * Runs this cron task.

View file

@ -23,7 +23,7 @@ if (!defined('IN_PHPBB'))
* *
* @package phpBB3 * @package phpBB3
*/ */
class cron_task_core_tidy_search extends cron_task_base class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base
{ {
/** /**
* Runs this cron task. * Runs this cron task.

View file

@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
* *
* @package phpBB3 * @package phpBB3
*/ */
class cron_task_core_tidy_sessions extends cron_task_base class phpbb_cron_task_core_tidy_sessions extends phpbb_cron_task_base
{ {
/** /**
* Runs this cron task. * Runs this cron task.

View file

@ -23,7 +23,7 @@ if (!defined('IN_PHPBB'))
* *
* @package phpBB3 * @package phpBB3
*/ */
class cron_task_core_tidy_warnings extends cron_task_base class phpbb_cron_task_core_tidy_warnings extends phpbb_cron_task_base
{ {
/** /**
* Runs this cron task. * Runs this cron task.

View file

@ -27,7 +27,7 @@ if (!defined('IN_PHPBB'))
* *
* @package phpBB3 * @package phpBB3
*/ */
abstract class cron_task_base implements cron_task abstract class phpbb_cron_task_base implements phpbb_cron_task
{ {
/** /**
* Returns whether this cron task can run, given current board configuration. * Returns whether this cron task can run, given current board configuration.

View file

@ -22,7 +22,7 @@ if (!defined('IN_PHPBB'))
* *
* @package phpBB3 * @package phpBB3
*/ */
class cron_task_wrapper class phpbb_cron_task_wrapper
{ {
/** /**
* Wraps a task $task, which must implement cron_task interface. * Wraps a task $task, which must implement cron_task interface.
@ -40,7 +40,7 @@ class cron_task_wrapper
*/ */
public function is_parametrized() public function is_parametrized()
{ {
return $this->task instanceof parametrized_cron_task; return $this->task instanceof phpbb_parametrized_cron_task;
} }
/** /**