Tache::findFirst()   A
last analyzed

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 1
1
<?php
2
3
class Tache extends \Phalcon\Mvc\Model
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
4
{
5
6
    /**
7
     *
8
     * @var integer
9
     */
10
    protected $id;
11
12
    /**
13
     *
14
     * @var string
15
     */
16
    protected $libelle;
17
18
    /**
19
     *
20
     * @var string
21
     */
22
    protected $date;
23
24
    /**
25
     *
26
     * @var integer
27
     */
28
    protected $avancement;
29
30
    /**
31
     *
32
     * @var string
33
     */
34
    protected $codeUseCase;
35
36
    /**
37
     * Method to set the value of field id
38
     *
39
     * @param integer $id
40
     * @return $this
41
     */
42
    public function setId($id)
43
    {
44
        $this->id = $id;
45
46
        return $this;
47
    }
48
49
    /**
50
     * Method to set the value of field libelle
51
     *
52
     * @param string $libelle
53
     * @return $this
54
     */
55
    public function setLibelle($libelle)
56
    {
57
        $this->libelle = $libelle;
58
59
        return $this;
60
    }
61
62
    /**
63
     * Method to set the value of field date
64
     *
65
     * @param string $date
66
     * @return $this
67
     */
68
    public function setDate($date)
69
    {
70
        $this->date = $date;
71
72
        return $this;
73
    }
74
75
    /**
76
     * Method to set the value of field avancement
77
     *
78
     * @param integer $avancement
79
     * @return $this
80
     */
81
    public function setAvancement($avancement)
82
    {
83
        $this->avancement = $avancement;
84
85
        return $this;
86
    }
87
88
    /**
89
     * Method to set the value of field codeUseCase
90
     *
91
     * @param string $codeUseCase
92
     * @return $this
93
     */
94
    public function setCodeUseCase($codeUseCase)
95
    {
96
        $this->codeUseCase = $codeUseCase;
97
98
        return $this;
99
    }
100
101
    /**
102
     * Returns the value of field id
103
     *
104
     * @return integer
105
     */
106
    public function getId()
107
    {
108
        return $this->id;
109
    }
110
111
    /**
112
     * Returns the value of field libelle
113
     *
114
     * @return string
115
     */
116
    public function getLibelle()
117
    {
118
        return $this->libelle;
119
    }
120
121
    /**
122
     * Returns the value of field date
123
     *
124
     * @return string
125
     */
126
    public function getDate()
127
    {
128
        return $this->date;
129
    }
130
131
    /**
132
     * Returns the value of field avancement
133
     *
134
     * @return integer
135
     */
136
    public function getAvancement()
137
    {
138
        return $this->avancement;
139
    }
140
141
    /**
142
     * Returns the value of field codeUseCase
143
     *
144
     * @return string
145
     */
146
    public function getCodeUseCase()
147
    {
148
        return $this->codeUseCase;
149
    }
150
151
    /**
152
     * Initialize method for model.
153
     */
154
    public function initialize()
155
    {
156
        $this->belongsTo('codeUseCase', 'Usecase', 'code', array('alias' => 'Usecase'));
157
    }
158
159
    /**
160
     * Returns table name mapped in the model.
161
     *
162
     * @return string
163
     */
164
    public function getSource()
165
    {
166
        return 'tache';
167
    }
168
169
    /**
170
     * Allows to query a set of records that match the specified conditions
171
     *
172
     * @param mixed $parameters
173
     * @return Tache[]
174
     */
175
    public static function find($parameters = null)
176
    {
177
        return parent::find($parameters);
178
    }
179
180
    /**
181
     * Allows to query the first record that match the specified conditions
182
     *
183
     * @param mixed $parameters
184
     * @return Tache
185
     */
186
    public static function findFirst($parameters = null)
187
    {
188
        return parent::findFirst($parameters);
189
    }
190
191
    public function toString()
192
    {
193
        return $this->libelle . " (" . $this->avancement . ")";
194
    }
195
}
196