settings[$Model->alias] = array_merge($this->_defaults, $settings); } else { $this->settings[$Model->alias] = $this->_defaults; } } /** * beforeFind, starts a timer for a find operation. * * @param Model $Model * @param array $queryData Array of query data (not modified) * @return boolean true */ public function beforeFind(Model $Model, $queryData) { DebugKitDebugger::startTimer($Model->alias . '_find', $Model->alias . '->find()'); return true; } /** * afterFind, stops a timer for a find operation. * * @param Model $Model * @param array $results Array of results * @param $primary * @return boolean true. */ public function afterFind(Model $Model, $results, $primary = false) { DebugKitDebugger::stopTimer($Model->alias . '_find'); return true; } /** * beforeSave, starts a time before a save is initiated. * * @param Model $Model * @param array $options * @return boolean true */ public function beforeSave(Model $Model, $options = array()) { DebugKitDebugger::startTimer($Model->alias . '_save', $Model->alias . '->save()'); return true; } /** * afterSave, stop the timer started from a save. * * @param \Model $Model * @param string $created * @return boolean Always true */ public function afterSave(Model $Model, $created, $options = array()) { DebugKitDebugger::stopTimer($Model->alias . '_save'); return true; } }