JxnClass::_class()   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
namespace Jaxon\Script;
4
5
/**
6
 * JxnClass.php
7
 *
8
 * Call to a Jaxon registered class.
9
 *
10
 * @package jaxon-core
11
 * @author Thierry Feuzeu
12
 * @copyright 2024 Thierry Feuzeu <[email protected]>
13
 * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
14
 * @link https://github.com/jaxon-php/jaxon-core
15
 */
16
17
use Jaxon\Plugin\Response\Dialog\DialogCommand;
18
 
19
class JxnClass extends JxnCall
20
{
21
    /**
22
     * @var string
23
     */
24
    protected $sJsObject;
25
26
    /**
27
     * The class constructor
28
     *
29
     * @param DialogCommand $xDialog
30
     * @param string $sJsObject
31
     */
32
    public function __construct(DialogCommand $xDialog, string $sJsObject)
33
    {
34
        parent::__construct($xDialog, $sJsObject . '.');
35
        $this->sJsObject = $sJsObject;
36
    }
37
38
    /**
39
     * Get the js class name
40
     *
41
     * @return string
42
     */
43
    public function _class(): string
44
    {
45
        return $this->sJsObject;
46
    }
47
}
48