Completed
Branch master (0b86d9)
by Léo
02:17
created

TitleTag::getPrefix()   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 Leogout\Bundle\SeoBundle\Model;
4
5
/**
6
 * Description of TitleTag.
7
 *
8
 * @author: leogout
9
 */
10
class TitleTag implements RenderableInterface
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $content;
16
17
    /**
18
     * @return string
19
     */
20
    public function getContent()
21
    {
22
        return $this->content;
23
    }
24
25
    /**
26
     * @param string $content
27
     *
28
     * @return $this
29
     */
30
    public function setContent($content)
31
    {
32
        $this->content = (string) $content;
33
34
        return $this;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function render()
41
    {
42
        return sprintf('<title>%s</title>', $this->getContent());
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function __toString()
49
    {
50
        return $this->render();
51
    }
52
}
53