LLMS_Lesson::update( array $data )

Update object data


Parameters Parameters

$data

(array) (Required) Data to update as key=>val.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/models/model.llms.lesson.php

581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
public function update( $data ) {
 
    $updated_values = array();
 
    foreach ( $data as $key => $value ) {
        $method = 'set_' . $key;
 
        if ( method_exists( $this, $method ) ) {
            $updated_value = $this->$method( $value );
 
            $updated_values[ $key ] = $updated_value;
 
        }
    }
 
    return $updated_values;
 
}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.