Mapping::usedBy()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Author: Nil Portugués Calderó <[email protected]>
4
 * Date: 12/17/15
5
 * Time: 11:46 PM.
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace NilPortugues\SchemaOrg;
12
13
/**
14
 * Class Mapping.
15
 */
16
class Mapping
17
{
18
    /**
19
     * @var string
20
     */
21
    private $schemaName;
22
    /**
23
     * @var string
24
     */
25
    private $propertyName;
26
    /**
27
     * @var string
28
     */
29
    private $propertyUrl;
30
31
    /**
32
     * @param $schemaClass
33
     * @param $propertyName
34
     * @param $propertyUrl
35
     */
36
    public function __construct($schemaClass, $propertyName, $propertyUrl)
37
    {
38
        $this->schemaName = (string) $schemaClass;
39
        $this->propertyName = (string) $propertyName;
40
        $this->propertyUrl = (string) $propertyUrl;
41
    }
42
43
    /**
44
     * @return string
45
     */
46
    public function usedBy()
47
    {
48
        return $this->schemaName;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function name()
55
    {
56
        return $this->propertyName;
57
    }
58
59
    /**
60
     * @return string
61
     */
62
    public function url()
63
    {
64
        return $this->propertyUrl;
65
    }
66
}
67