set( $value ); } /** * Set property value. * * @param mixed $value Value to set. */ public function set( $value ) { static $quality_enums = [ self::ECO => true, self::MAUTO => true, self::AUTO => true, ]; if ( isset( $quality_enums[ $value ] ) ) { $this->quality = $value; return; } if ( ! $this->is_valid_numeric( $value ) ) { $this->quality = 'mauto'; return; } $this->quality = $this->to_bound_integer( $value, 0, 100 ); } /** * Return property value. * * @return mixed */ public function get() { return $this->quality; } /** * Return ImageProxy URL formatted string property. * * @return mixed */ public function toString() { return sprintf( 'q:%s', $this->quality ); } }