AbstractProperties::init()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 1
ccs 0
cts 0
cp 0
nc 1
1
<?php
2
3
/*
4
 * This file is part of the kaloa/xmp package.
5
 *
6
 * For full copyright and license information, please view the LICENSE file
7
 * that was distributed with this source code.
8
 */
9
10
namespace Kaloa\Xmp\Properties;
11
12
use DOMXPath;
13
14
/**
15
 * Shared base class for XMP property schemata.
16
 */
17
abstract class AbstractProperties
18
{
19
    /**
20
     * XPath instance for a Kaloa\Xmp\Document.
21
     *
22
     * @var DOMXPath
23
     */
24
    protected $xPath;
25
26
    /**
27
     * Initializes the instance.
28
     *
29
     * @param DOMXPath $xPath XPath instance for a Kaloa\Xmp\Document
30
     */
31 1
    public function __construct(DOMXPath $xPath)
32
    {
33 1
        $this->xPath = $xPath;
34
35 1
        $this->init();
36 1
    }
37
38
    /**
39
     * Implementing classes should place initialization code here rather than
40
     * overwriting __construct.
41
     */
42
    abstract protected function init();
43
}
44