Completed
Branch develop (e3a612)
by Patryk
10:42 queued 45s
created

IframelyDTO::getLinks()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace KaLLoSz\Twig\Extension;
4
5
/**
6
 * Class IframelyDTO
7
 * @package KaLLoSz\Twig\Extension
8
 *
9
 * @author Patryk Kala <[email protected]>
10
 */
11
class IframelyDTO
12
{
13
    /**
14
     * @var array
15
     */
16
    protected $data;
17
18
    /**
19
     * Build IframelyDTO object base on iframely schema
20
     * (http://iframe.ly/api/iframely?url=http://iframe.ly/ACcM3Y)
21
     *
22
     * @param array $data
23
     */
24
    public function __construct(array $data)
25
    {
26
        $this->data = $data;
27
    }
28
29
    /**
30
     * @return array
31
     */
32
    public function getMeta(): array
33
    {
34
        return $this->data['meta'];
35
    }
36
37
    /**
38
     * @return array
39
     */
40
    public function getLinks(): array
41
    {
42
        return $this->data['links'];
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getHtml(): string
49
    {
50
        return $this->data['html'];
51
    }
52
}
53