AbstractPlugin::getHash()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * AbstractPlugin.php - Plugin interface
5
 *
6
 * Generic interface for all Jaxon plugins.
7
 *
8
 * @package jaxon-core
9
 * @author Jared White
10
 * @author J. Max Wilson
11
 * @author Joseph Woolley
12
 * @author Steffen Konerow
13
 * @author Thierry Feuzeu <[email protected]>
14
 * @copyright Copyright (c) 2005-2007 by Jared White & J. Max Wilson
15
 * @copyright Copyright (c) 2008-2010 by Joseph Woolley, Steffen Konerow, Jared White  & J. Max Wilson
16
 * @copyright 2016 Thierry Feuzeu <[email protected]>
17
 * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
18
 * @link https://github.com/jaxon-php/jaxon-core
19
 */
20
21
namespace Jaxon\Plugin;
22
23
abstract class AbstractPlugin implements PluginInterface, CodeGeneratorInterface
24
{
25
    /**
26
     * @inheritDoc
27
     */
28
    public final function readyEnabled(): bool
29
    {
30
        // For plugins, the getReadyScript() is always included in the generated code.
31
        return true;
32
    }
33
34
    /**
35
     * @inheritDoc
36
     */
37
    public function readyInlined(): bool
38
    {
39
        // For plugins, the getReadyScript() can be exported to external files.
40
        return false;
41
    }
42
43
    /**
44
     * @inheritDoc
45
     */
46
    public function getHash(): string
47
    {
48
        return '';
49
    }
50
51
    /**
52
     * @inheritDoc
53
     */
54
    public function getCss(): string
55
    {
56
        return '';
57
    }
58
59
    /**
60
     * @inheritDoc
61
     */
62
    public function getJs(): string
63
    {
64
        return '';
65
    }
66
67
    /**
68
     * @inheritDoc
69
     */
70
    public function getScript(): string
71
    {
72
        return '';
73
    }
74
75
    /**
76
     * @inheritDoc
77
     */
78
    public function getReadyScript(): string
79
    {
80
        return '';
81
    }
82
}
83