Completed
Push — travis_trusty ( e78e49...6f0d6f )
by André
54:54 queued 34:46
created

Resource::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
3
/**
4
 * File containing the Resource class.
5
 *
6
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
7
 * @license For full copyright and license information view LICENSE file distributed with this source code.
8
 *
9
 * @version //autogentag//
10
 */
11
namespace eZ\Publish\Core\REST\Common\Values;
12
13
use eZ\Publish\Core\REST\Common\Value as RestValue;
14
15
/**
16
 * This class represents a resource.
17
 */
18
class Resource extends RestValue
19
{
20
    /**
21
     * Resource name.
22
     *
23
     * @var string
24
     */
25
    public $name;
26
27
    /**
28
     * Media Type of the resource.
29
     *
30
     * @var string
31
     */
32
    public $mediaType;
33
34
    /**
35
     * href of the resource.
36
     *
37
     * @var string
38
     */
39
    public $href;
40
41
    /**
42
     * Resource constructor.
43
     * @param $name
44
     * @param $mediaType
45
     * @param $href
46
     */
47
    public function __construct($name, $mediaType, $href)
48
    {
49
        $this->name = $name;
50
        $this->mediaType = $mediaType;
51
        $this->href = $href;
52
    }
53
}
54