Completed
Push — develop ( 728aa6...c30dd4 )
by
unknown
17:43 queued 10:24
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
 * @since 0.26
20
 *
21
 * @ODM\Document(collection="cvs.attachments")
22
 */
23
class Attachment extends FileEntity
24
{
25
26
    /**
27
     * Gets the URI of an attachment
28
     *
29
     * The returned URI is NOT prepended with the base path!
30
     *
31
     * @return string
32
     */
33
    public function getUri()
34
    {
35
        return "/file/Cv.Attachment/" . $this->id . "/" .urlencode($this->name);
36
    }
37
}
38