Completed
Branch EDTR/master (83b47e)
by
unknown
25:37 queued 16:41
created

SiteUrls   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A initialize() 0 6 1
1
<?php
2
3
namespace EventEspresso\core\domain\entities\routing\data_nodes\core;
4
5
use EventEspresso\core\services\json\JsonDataNode;
6
use EventEspresso\core\services\json\JsonDataNodeValidator;
7
8
/**
9
 * Class SiteUrls
10
 * Description
11
 *
12
 * @package EventEspresso\core\domain\entities\routing\data_nodes
13
 * @author  Brent Christensen
14
 * @since   $VID:$
15
 */
16
class SiteUrls extends JsonDataNode
17
{
18
19
    const NODE_NAME = 'siteUrls';
20
21
22
    /**
23
     * JsonDataNodeHandler constructor.
24
     *
25
     * @param JsonDataNodeValidator $validator
26
     */
27
    public function __construct(JsonDataNodeValidator $validator)
28
    {
29
        parent::__construct($validator);
30
        $this->setNodeName(SiteUrls::NODE_NAME);
31
    }
32
33
34
    /**
35
     * @since $VID:$
36
     */
37
    public function initialize()
38
    {
39
        $this->addData('admin', admin_url('/'));
40
        $this->addData('home', site_url('/'));
41
        $this->setInitialized(true);
42
    }
43
}
44