property = $property; $this->value = $value; } /** * Returns whether the value of the property for the given field is true. * * @since 1.6.0 * * @param Charitable_Field $field Instance of `Charitable_Field`. * @return boolean */ public function is_true( Charitable_Field $field ) { return (bool) $field->{$this->property}; } /** * Returns whether the value of the property for the given field is not false. * * @since 1.6.0 * * @param Charitable_Field $field Instance of `Charitable_Field`. * @return boolean */ public function is_not_false( Charitable_Field $field ) { return false !== $field->{$this->property}; } /** * Returns whether the value of the property for the given field is equal to the passed value. * * @since 1.6.0 * * @param Charitable_Field $field Instance of `Charitable_Field`. * @return boolean */ public function is_equal_to( Charitable_Field $field ) { return $this->value === $field->{$this->property}; } } endif;