我必须在保存之前处理发布的数据。$this->data 是这样的数组
Array
(
[Presence] => Array
(
[Month] => 02
[Year] => 2012
[0] => Array
(
[day] => 1
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[1] => Array
(
[day] => 2
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[2] => Array
(
[day] => 3
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[3] => Array
(
[day] => 4
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[4] => Array
(
[note] =>
)
[5] => Array
(
[note] =>
)
[6] => Array
(
[day] => 7
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[7] => Array
(
[day] => 8
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[8] => Array
(
[day] => 9
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[9] => Array
(
[day] => 10
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[10] => Array
(
[day] => 11
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[11] => Array
(
[note] =>
)
[12] => Array
(
[note] =>
)
[13] => Array
(
[day] => 14
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[14] => Array
(
[day] => 15
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[15] => Array
(
[day] => 16
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[16] => Array
(
[day] => 17
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[17] => Array
(
[day] => 18
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[18] => Array
(
[note] =>
)
[19] => Array
(
[note] =>
)
[20] => Array
(
[day] => 21
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[21] => Array
(
[day] => 22
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[22] => Array
(
[day] => 23
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[23] => Array
(
[day] => 24
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[24] => Array
(
[day] => 25
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[25] => Array
(
[note] =>
)
[26] => Array
(
[note] =>
)
[27] => Array
(
[day] => 28
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[28] => Array
(
[day] => 29
[presenza] => 1
[time_in] => 09:00
[time_out] => 18:00
[pausa] => 01:00
[hours] => 08:00
[client_id] => 4
[note] =>
)
[user_id] => 3
)
)
我必须修改日期并将 user_id 插入每个“子数组”中。
但是当我调用,只是为了调试,在我的 beforeSave() 上调试($this->data),结果是一个空数组,我什么也做不了。