Completed
Push — master ( 19de1d...609975 )
by Simon
12:47
created

AbstractExtensionConfig   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 50
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A isBackend() 0 4 1
A isFrontend() 0 4 1
A isVersion() 0 4 1
A isCompatVersion() 0 4 1
localconf() 0 1 ?
tables() 0 1 ?
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\ExtensionConfigInterface;
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 AbstractExtensionConfig implements ExtensionConfigInterface
39
{
40
    /**
41
     * @see Typo3Mode::isBackend()
42
     */
43
    protected static function isBackend()
44
    {
45
        return Typo3Mode::isBackend();
46
    }
47
48
    /**
49
     * @see Typo3Mode::isFrontend()
50
     */
51
    protected static function isFrontend()
52
    {
53
        return Typo3Mode::isFrontend();
54
    }
55
56
    /**
57
     * @see Typo3Version::isVersion()
58
     */
59
    protected static function isVersion($branchNumberStr)
60
    {
61
        return Typo3Version::isVersion($branchNumberStr);
62
    }
63
64
    /**
65
     * @see Typo3Version::isCompatVersion()
66
     */
67
    protected static function isCompatVersion($branchNumberStr)
68
    {
69
        return Typo3Version::isCompatVersion($branchNumberStr);
70
    }
71
72
    /**
73
     * Called from ext_localconf.php, to be implemented in derrived classes.
74
     *
75
     * @return void
76
     * @api
77
     */
78
    abstract public static function localconf($extKey);
79
80
    /**
81
     * Called from ext_tables.php, to be implemented in derrived classes.
82
     *
83
     * @return void
84
     * @api
85
     */
86
    abstract public static function tables($extKey);
87
}
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...
88