pub fn constant<T: Into<String>>(
        mut self,
        name: T,
        value: impl IntoZval + 'static,
        docs: DocComments,
    ) -> Result<Self> {
        self.constants
            .push((name.into(), Box::new(|| value.into_zval(true)), docs));
        Ok(self)
    }
Adds a constant to the class. The type of the constant is defined by the
type of the given default.

Returns a result containing the class builder if the constant was
successfully added.

# Parameters

* `name` - The name of the constant to add to the class.
* `value` - The value of the constant.
* `docs` - Documentation comments for the constant.

# Errors

TODO: Never?
src/builders/class.rs