Typo6::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 9
rs 10
1
<?php
2
3
/**
4
 * @license GPLv3, http://www.gnu.org/copyleft/gpl.html
5
 * @copyright Metaways Infosystems GmbH, 2014
6
 * @copyright Aimeos (aimeos.org), 2014-2016
7
 * @package TYPO3
8
 */
9
10
11
namespace Aimeos\Aimeos\Scheduler\Task;
12
13
use Aimeos\Aimeos\Base;
14
use Aimeos\Aimeos\Scheduler;
15
16
17
/**
18
 * Aimeos scheduler.
19
 *
20
 * @package TYPO3
21
 */
22
class Typo6 extends \TYPO3\CMS\Scheduler\Task\AbstractTask
23
{
24
    private $fieldSite = 'aimeos_sitecode';
25
    private $fieldController = 'aimeos_controller';
26
    private $fieldTSconfig = 'aimeos_config';
27
28
29
    /**
30
     * Executes the configured tasks.
31
     *
32
     * @return boolean True if success, false if not
33
     * @throws Exception If an error occurs
34
     */
35
    public function execute()
36
    {
37
        $sitecodes = (array) $this->{$this->fieldSite};
38
        $controllers = (array) $this->{$this->fieldController};
39
        $tsconfig = $this->{$this->fieldTSconfig};
40
41
        Scheduler\Base::execute(Base::parseTS($tsconfig), [], $controllers, $sitecodes);
42
43
        return true;
44
    }
45
}
46