Completed
Push — 1.10.x ( c0da86...0328a9 )
by
unknown
125:03 queued 74:59
created

Announcement   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 74
rs 10
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 25 1
A show() 0 5 1
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
require_once 'Resource.class.php';
5
6
/**
7
 * An announcement
8
 * @author Bart Mollet <[email protected]>
9
 * @package chamilo.backup
10
 */
11
class Announcement extends Coursecopy\Resource
12
{
13
    /**
14
     * The title of the announcement
15
     */
16
    public $title;
17
    /**
18
     * The content of the announcement
19
     */
20
    public $content;
21
    /**
22
     * The date on which this announcement was made
23
     */
24
    public $date;
25
    /**
26
     * The display order of this announcement
27
     */
28
    public $display_order;
29
    /**
30
     * Has the e-mail been sent?
31
     */
32
    public $email_sent;
33
34
    public $attachment_path;
35
36
    public $attachment_filename;
37
38
    public $attachment_size;
39
40
    public $attachment_comment;
41
42
    /**
43
     * Create a new announcement
44
     * @param int $id
45
     * @param string $title
46
     * @param string $content
47
     * @param string $date
48
     * @param int display_order
49
     */
50
    public function __construct(
51
        $id,
52
        $title,
53
        $content,
54
        $date,
55
        $display_order,
56
        $email_sent,
57
        $path,
58
        $filename,
59
        $size,
60
        $comment
61
    ) {
62
        parent::__construct($id,RESOURCE_ANNOUNCEMENT);
63
64
        $this->content	= $content;
65
        $this->title 	= $title;
66
        $this->date 	= $date;
67
        $this->display_order	= $display_order;
68
        $this->email_sent	 	= $email_sent;
69
70
        $this->attachment_path 	= $path;
71
        $this->attachment_filename = $filename;
72
        $this->attachment_size 	= $size;
73
        $this->attachment_comment 	= $comment;
74
    }
75
76
    /**
77
     * Show this announcement
78
     */
79
    function show()
80
    {
81
        parent::show();
82
        echo $this->date.': '.$this->title;
83
    }
84
}
85