public function saveScheme($data, $id, $setAsActive = false)
    {
        // Event parameters prepare
        $arrayParameters = $this->makeArrayFromParameters(__METHOD__, func_get_args());
        $results = false;

        // Sending service start event
        $arrayParameters = $this->sendEvent('melis_core_package_scheme_save_start', $arrayParameters);

        $data        = $arrayParameters['data'];
        $id          = (int)  $arrayParameters['id'];
        $setAsActive = (bool) $arrayParameters['setAsActive'];

        $success     = $this->schemeTable()->save(array_merge($data, array('pscheme_is_active' => $setAsActive)), $id);

        if($success) {
            $results = true;
        }

        // Adding results to parameters for events treatment if needed
        $arrayParameters['results'] = $results;
        // Sending service end event
        $arrayParameters = $this->sendEvent('melis_core_package_scheme_save_end', $arrayParameters);

        return $arrayParameters['results'];
    }