Beispiel #1
0
 /**
  * @param mixed $value
  *
  * @return bool
  */
 public static function boolval($value)
 {
     return Scalar::boolval($value);
 }
Beispiel #2
0
 /**
  * Retrieves a boolean option from the given array. $defaultValue is set and returned if $_key is not 'set'.
  * Optionally will unset option in array.
  *
  * Returns TRUE for "1", "true", "on", "yes" and "y". Returns FALSE otherwise.
  *
  * @param array|\ArrayAccess|object $options
  * @param string                    $key
  * @param boolean                   $defaultValue Defaults to false
  * @param boolean                   $unsetValue
  *
  * @return mixed
  */
 public static function getBool(&$options = array(), $key, $defaultValue = false, $unsetValue = false)
 {
     return Scalar::boolval(static::get($options, $key, $defaultValue, $unsetValue));
 }