Passed
Push — master ( 870c71...79b41e )
by Simon
02:11
created

AbstractConfigurator::isAjax()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Gilbertsoft\Lib\Extension;
3
4
/*
5
 * This file is part of the "GS Library" Extension for TYPO3 CMS.
6
 *
7
 * Copyright (C) 2017 by Gilbertsoft (gilbertsoft.org)
8
 *
9
 * This program is free software: you can redistribute it and/or modify
10
 * it under the terms of the GNU General Public License as published by
11
 * the Free Software Foundation, either version 3 of the License, or
12
 * (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 * GNU General Public License for more details.
18
 *
19
 * For the full license information, please read the LICENSE file that
20
 * was distributed with this source code.
21
 *
22
 * The TYPO3 project - inspiring people to share!
23
 */
24
25
/**
26
 * Use declarations
27
 */
28
use Gilbertsoft\Lib\Extension\ConfiguratorInterface;
29
use Gilbertsoft\Lib\Utility\Typo3Mode;
30
use Gilbertsoft\Lib\Utility\Typo3Version;
31
32
/**
33
 * Abstract extension configuration class.
34
 *
35
 * Used as base class for the extension configuration. There are various 
36
 * often used functions available.
37
 */
38
abstract class AbstractConfigurator implements ConfiguratorInterface
39
{
40
    /**
41
     * @see Typo3Mode::isFrontend()
42
     */
43
    protected static function isFrontend()
44
    {
45
        return Typo3Mode::isFrontend();
46
    }
47
48
    /**
49
     * @see Typo3Mode::isBackend()
50
     */
51
    protected static function isBackend()
52
    {
53
        return Typo3Mode::isBackend();
54
    }
55
56
    /**
57
     * @see Typo3Mode::isCli()
58
     */
59
    protected static function isCli()
60
    {
61
        return Typo3Mode::isCli();
62
    }
63
64
    /**
65
     * @see Typo3Mode::isAjax()
66
     */
67
    protected static function isAjax()
68
    {
69
        return Typo3Mode::isAjax();
70
    }
71
72
    /**
73
     * @see Typo3Mode::isInstall()
74
     */
75
    protected static function isInstall()
76
    {
77
        return Typo3Mode::isInstall();
78
    }
79
80
    /**
81
     * @see Typo3Version::isVersion()
82
     */
83
    protected static function isVersion($branchNumberStr)
84
    {
85
        return Typo3Version::isVersion($branchNumberStr);
86
    }
87
88
    /**
89
     * @see Typo3Version::isCompatVersion()
90
     */
91
    protected static function isCompatVersion($branchNumberStr)
92
    {
93
        return Typo3Version::isCompatVersion($branchNumberStr);
94
    }
95
96
    /**
97
     * Called from ext_localconf.php, to be implemented in derrived classes.
98
     *
99
     * @param string $extensionKey Extension key
100
     * @return void
101
     * @api
102
     */
103
    abstract public static function localconf($extensionKey);
104
105
    /**
106
     * Called from ext_tables.php, to be implemented in derrived classes.
107
     *
108
     * @param string $extensionKey Extension key
109
     * @return void
110
     * @api
111
     */
112
    abstract public static function tables($extensionKey);
113
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
114