Completed
Pull Request — develop (#251)
by
unknown
14:19 queued 06:05
created

Attachment::getUri()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2016 Cross Solution <http://cross-solution.de>
8
 */
9
10
namespace Cv\Entity;
11
12
use Core\Entity\FileEntity;
13
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
14
15
/**
16
 * An Attachment of a CV
17
 *
18
 * @author fedys
19
 *
20
 * @ODM\Document(collection="cvs.attachments")
21
 */
22
class Attachment extends FileEntity
23
{
24
25
    /**
26
     * Gets the URI of an attachment
27
     *
28
     * The returned URI is NOT prepended with the base path!
29
     *
30
     * @return string
31
     */
32
    public function getUri()
33
    {
34
        return "/file/Cv.Attachment/" . $this->id . "/" .urlencode($this->name);
35
    }
36
}
37