public function getRuleset($ruleset, $mergeWithSaving = false)
    {
        $rulesets = $this->getRulesets();
        if (array_key_exists($ruleset, $rulesets)) {
            // If the ruleset exists and merge with saving is true, return
            // the rulesets merged.
            if ($mergeWithSaving) {
                return $this->mergeRulesets(['saving', $ruleset]);
            }

            // If merge with saving is not true then simply retrun the ruleset.
            return $rulesets[$ruleset];
        }

        // If the ruleset requested does not exist but merge with saving is true
        // attempt to return
        elseif ($mergeWithSaving) {
            return $this->getDefaultRules();
        }
    }
public function getRuleset($ruleset, $mergeWithSaving = false)
    {
        $rulesets = $this->getRulesets();
        if (array_key_exists($ruleset, $rulesets)) {
            // If the ruleset exists and merge with saving is true, return
            // the rulesets merged.
            if ($mergeWithSaving) {
                return $this->mergeRulesets(['saving', $ruleset]);
            }

            // If merge with saving is not true then simply retrun the ruleset.
            return $rulesets[$ruleset];
        }

        // If the ruleset requested does not exist but merge with saving is true
        // attempt to return
        elseif ($mergeWithSaving) {
            return $this->getDefaultRules();
        }
    }
public function getRuleset ( $ ruleset , $ mergeWithSaving = false ) { $ rulesets = $ this -> getRulesets ( ) ; if ( array_key_exists ( $ ruleset , $ rulesets ) ) { // If the ruleset exists and merge with saving is true, return // the rulesets merged. if ( $ mergeWithSaving ) { return $ this -> mergeRulesets ( [ 'saving' , $ ruleset ] ) ; } // If merge with saving is not true then simply retrun the ruleset. return $ rulesets [ $ ruleset ] ; } // If the ruleset requested does not exist but merge with saving is true // attempt to return elseif ( $ mergeWithSaving ) { return $ this -> getDefaultRules ( ) ; } }
Get a ruleset, and merge it with saving if required.

@deprecated watson/validating@0.10.9

@param string $ruleset
@param bool   $mergeWithSaving

@return array
Get a ruleset and merge it with saving if required .