public function toString($value)
    {
        if ($value instanceof \DateTime) { // datetime in ISO8601 format
            return $value->format(\DateTime::ISO8601);
        } else if (is_bool($value)) {
            return $value ? 1 : 0;
        } else {
            return $value;
        }
    }
public function toString($value)
    {
        if ($value instanceof \DateTime) { // datetime in ISO8601 format
            return $value->format(\DateTime::ISO8601);
        } else if (is_bool($value)) {
            return $value ? 1 : 0;
        } else {
            return $value;
        }
    }
public function toString ( $ value ) { if ( $ value instanceof \ DateTime ) { // datetime in ISO8601 format return $ value -> format ( \ DateTime :: ISO8601 ) ; } else if ( is_bool ( $ value ) ) { return $ value ? 1 : 0 ; } else { return $ value ; } }
Take value and turn it into a string suitable for inclusion in
the parameter. If it's a string, pass through unchanged
If it's a datetime object, format it in ISO8601

@param string $value the value of the parameter

@return string the header string
Take value and turn it into a string suitable for inclusion in the parameter . If it s a string pass through unchanged If it s a datetime object format it in ISO8601