private function prepareSave(
        $updateFields = null,
        $forceInsert = false,
        $forceUpdate = false
    ) {
        $model = $this;

        // for proxy models, we use the concreteModel
        if ($model->getMeta()->proxy) {
            $model = $model->getMeta()->getConcreteModel();
        }

        $meta = $model->getMeta();

        // post save signal
        if (!$meta->autoCreated) {
            $this->dispatchSignal('powerorm.model.pre_save', $model);
        }

        $this->saveParent($model, $updateFields);
        $this->saveTable(
            $model,
            $forceInsert,
            $forceUpdate,
            $updateFields
        );

        // presave signal
        if (!$meta->autoCreated) {
            $this->dispatchSignal('powerorm.model.post_save', $model);
        }
    }
private function prepareSave(
        $updateFields = null,
        $forceInsert = false,
        $forceUpdate = false
    ) {
        $model = $this;

        // for proxy models, we use the concreteModel
        if ($model->getMeta()->proxy) {
            $model = $model->getMeta()->getConcreteModel();
        }

        $meta = $model->getMeta();

        // post save signal
        if (!$meta->autoCreated) {
            $this->dispatchSignal('powerorm.model.pre_save', $model);
        }

        $this->saveParent($model, $updateFields);
        $this->saveTable(
            $model,
            $forceInsert,
            $forceUpdate,
            $updateFields
        );

        // presave signal
        if (!$meta->autoCreated) {
            $this->dispatchSignal('powerorm.model.post_save', $model);
        }
    }
private function prepareSave ( $ updateFields = null , $ forceInsert = false , $ forceUpdate = false ) { $ model = $ this ; // for proxy models, we use the concreteModel if ( $ model -> getMeta ( ) -> proxy ) { $ model = $ model -> getMeta ( ) -> getConcreteModel ( ) ; } $ meta = $ model -> getMeta ( ) ; // post save signal if ( ! $ meta -> autoCreated ) { $ this -> dispatchSignal ( 'powerorm.model.pre_save' , $ model ) ; } $ this -> saveParent ( $ model , $ updateFields ) ; $ this -> saveTable ( $ model , $ forceInsert , $ forceUpdate , $ updateFields ) ; // presave signal if ( ! $ meta -> autoCreated ) { $ this -> dispatchSignal ( 'powerorm.model.post_save' , $ model ) ; } }
Handles the parts of saving which should be done only once per save,
yet need to be done in raw saves, too.
This includes some sanity checks and signal sending.

The 'raw' argument is telling save_base not to save any parent models
and not to do any changes to the values
before save. This is used by fixture loading.

@param bool|false $raw
@param bool|false $forceInsert
@param bool|false $forceUpdate
@param null       $updateFields

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>
Handles the parts of saving which should be done only once per save yet need to be done in raw saves too . This includes some sanity checks and signal sending .