protected function castString($value)
    {
        $string = strtolower(trim($value));

        if (in_array($string, self::getBooleanStrings(true))) {
            return true;
        }

        if (in_array($string, self::getBooleanStrings(false))) {
            return false;
        }

        return $this->dontCast($value);
    }
protected function castString($value)
    {
        $string = strtolower(trim($value));

        if (in_array($string, self::getBooleanStrings(true))) {
            return true;
        }

        if (in_array($string, self::getBooleanStrings(false))) {
            return false;
        }

        return $this->dontCast($value);
    }
protected function castString ( $ value ) { $ string = strtolower ( trim ( $ value ) ) ; if ( in_array ( $ string , self :: getBooleanStrings ( true ) ) ) { return true ; } if ( in_array ( $ string , self :: getBooleanStrings ( false ) ) ) { return false ; } return $ this -> dontCast ( $ value ) ; }
Cast a string to a boolean

@param mixed $value
@return boolean|string
Cast a string to a boolean