UploadableFile::getRootPath()   A
last analyzed

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 Fenrizbes\UploadableBundle\File;
4
5
use Symfony\Component\HttpFoundation\File\File;
6
7
class UploadableFile extends File
8
{
9
    /**
10
     * Path to the project's root directory
11
     *
12
     * @var string
13
     */
14
    protected $root_path;
15
16
    /**
17
     * Web path to the file
18
     *
19
     * @var string
20
     */
21
    protected $web_path;
22
23
    public function __construct($root_path, $web_path)
24
    {
25
        $this->root_path = $root_path;
26
        $this->web_path  = $web_path;
27
28
        parent::__construct($root_path . $web_path);
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function getRootPath()
35
    {
36
        return $this->root_path;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getWebPath()
43
    {
44
        return $this->web_path;
45
    }
46
}