protected function allCallbacks()
    {
        if (Rails::env() == 'production') {
            return Rails::cache()->fetch('rails.models.' . get_called_class() . '.callbacks', function() {
                return array_merge_recursive(
                    $this->callbacks(),
                    $this->pluggedCallbacks()
                );
            });
        } else {
            return array_merge_recursive(
                $this->callbacks(),
                $this->pluggedCallbacks()
            );
        }
    }
protected function allCallbacks()
    {
        if (Rails::env() == 'production') {
            return Rails::cache()->fetch('rails.models.' . get_called_class() . '.callbacks', function() {
                return array_merge_recursive(
                    $this->callbacks(),
                    $this->pluggedCallbacks()
                );
            });
        } else {
            return array_merge_recursive(
                $this->callbacks(),
                $this->pluggedCallbacks()
            );
        }
    }
protected function allCallbacks ( ) { if ( Rails :: env ( ) == 'production' ) { return Rails :: cache ( ) -> fetch ( 'rails.models.' . get_called_class ( ) . '.callbacks' , function ( ) { return array_merge_recursive ( $ this -> callbacks ( ) , $ this -> pluggedCallbacks ( ) ) ; } ) ; } else { return array_merge_recursive ( $ this -> callbacks ( ) , $ this -> pluggedCallbacks ( ) ) ; } }
Merges model's callbacks and "plugged" callbacks.
If under production environment, the callbacks will be cached.
Merges model s callbacks and plugged callbacks . If under production environment the callbacks will be cached .