/** * Save a slider array in the database * If ID is passed, it will update that ID. * If no ID or ID = 0, it will insert * * @param $slider = array(); of slider data * @return ID of saved slider or false if error * @since 0.0.1 */ protected function save_slider($slider) { // create a new object $slider_obj = new Enp_quiz_Save_slider(); // pass to save_sliders so we can decide // if we should insert or update the slider $slider_obj->save_slider($slider); }