$value = true; $validator = new Validator(); $isBool = $validator->getBool($value); // returns true
$value = "yes"; $validator = new Validator(); $isBool = $validator->getBool($value); // returns falseThis method is likely part of a larger package or library for validating data in PHP.