[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * VigLink extension for the phpBB Forum Software package. 5 * 6 * @copyright (c) 2016 phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 */ 10 11 namespace phpbb\viglink\cron; 12 13 /** 14 * Viglink cron task. 15 */ 16 class viglink extends \phpbb\cron\task\base 17 { 18 /** @var \phpbb\config\config $config Config object */ 19 protected $config; 20 21 /** @var \phpbb\viglink\acp\viglink_helper $helper Viglink helper object */ 22 protected $helper; 23 24 /** 25 * Constructor 26 * 27 * @param \phpbb\config\config $config Config object 28 * @param \phpbb\viglink\acp\viglink_helper $viglink_helper Viglink helper object 29 * @access public 30 */ 31 public function __construct(\phpbb\config\config $config, \phpbb\viglink\acp\viglink_helper $viglink_helper) 32 { 33 $this->config = $config; 34 $this->helper = $viglink_helper; 35 } 36 37 /** 38 * {@inheritDoc} 39 */ 40 public function run() 41 { 42 try 43 { 44 $this->helper->set_viglink_services(true); 45 } 46 catch (\RuntimeException $e) 47 { 48 $this->helper->log_viglink_error($e->getMessage()); 49 } 50 } 51 52 /** 53 * {@inheritDoc} 54 */ 55 public function is_runnable() 56 { 57 return (bool) $this->config['viglink_enabled']; 58 } 59 60 /** 61 * {@inheritDoc} 62 */ 63 public function should_run() 64 { 65 return $this->config['viglink_last_gc'] < strtotime('24 hours ago'); 66 } 67 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |