19
19
=========================================================================*/
20
20
21
21
/**
22
- * Progress model base class
22
+ * Producer base model class.
23
23
*
24
- * The progress object is used to store a generic representation
25
- * of the progress of some event. It is used within Midas to keep track
26
- * of events that can take a long time to run. As the event is running on the server,
27
- * clients may asynchronously poll the server to request the current progress
28
- * of the event's execution.
24
+ * The progress object is used to store a generic representation of the
25
+ * progress of some event. It is used within the Midas Server to keep track of
26
+ * events that can take a long time to run. As the event is running on the
27
+ * server, clients may asynchronously poll the server to request the current
28
+ * progress of the event's execution.
29
29
*
30
- * If the progress object has a maximum value of 0, that means that the
31
- * progress is indeterminate.
30
+ * If the progress object has a maximum value of 0, then the progress is
31
+ * indeterminate.
32
+ *
33
+ * @package Core\Model
32
34
*/
33
35
abstract class ProgressModelBase extends AppModel
34
36
{
35
- /** constructor */
37
+ /** Constructor. */
36
38
public function __construct ()
37
39
{
38
40
parent ::__construct ();
@@ -51,11 +53,11 @@ public function __construct()
51
53
}
52
54
53
55
/**
54
- * Create a new progress record beginning with current value 0
56
+ * Create a new progress record beginning with the current value equal to 0.
55
57
*
56
- * @param max The max (default is 0 for indeterminate)
57
- * @param message The initial progress message (defaults to empty)
58
- * @return The progress dao that was created
58
+ * @param int $ max maximum value of the progress (default is 0 for indeterminate)
59
+ * @param string $ message initial progress message (default is empty)
60
+ * @return ProgressDao progress DAO
59
61
*/
60
62
public function createProgress ($ max = 0 , $ message = '' )
61
63
{
@@ -73,10 +75,11 @@ public function createProgress($max = 0, $message = '')
73
75
}
74
76
75
77
/**
76
- * Update a progress record. Touches its update timestamp and sets its value.
78
+ * Update a progress record. Touches its update timestamp and sets its value.
77
79
*
78
- * @param progressDao The progress record to update
79
- * @param currentValue The current value of the progress
80
+ * @param ProgressDao $progressDao progress record to update
81
+ * @param int $currentValue current value of the progress
82
+ * @param string $message progress message
80
83
*/
81
84
public function updateProgress ($ progressDao , $ currentValue , $ message = '' )
82
85
{
@@ -88,13 +91,15 @@ public function updateProgress($progressDao, $currentValue, $message = '')
88
91
}
89
92
90
93
/**
91
- * Override default save so that we can unlock the session,
92
- * which is required for concurrent progress polling. See documentation of
93
- * session_write_close for explanation.
94
+ * Override the default save so that we can unlock the session, which is
95
+ * required for concurrent progress polling. See documentation of
96
+ * session_write_close for an explanation.
97
+ *
98
+ * @param ProgressDao $progressDao
94
99
*/
95
- public function save ($ dao )
100
+ public function save ($ progressDao )
96
101
{
97
102
session_write_close ();
98
- parent ::save ($ dao );
103
+ parent ::save ($ progressDao );
99
104
}
100
105
}
0 commit comments