"+", 'emptyChar' => "-", 'formatString' => "%act% / %max% [%bar%] %fraction%%", 'fractionFormat' => "%01.2f", 'progressChar' => ">", 'redrawFrequency' => 1, 'step' => 1, 'width' => 78, 'actFormat' => '%.0f', 'maxFormat' => '%.0f', ); /** * Option write access. * * @throws ezcBasePropertyNotFoundException * If a desired property could not be found. * @throws ezcBaseValueException * If a desired property value is out of range. * * @param string $key Name of the property. * @param mixed $value The value for the property. * @ignore */ public function __set( $key, $value ) { switch ( $key ) { case "barChar": case "emptyChar": case "progressChar": case "formatString": case "fractionFormat": case "actFormat": case "maxFormat": if ( is_string( $value ) === false || strlen( $value ) < 1 ) { throw new ezcBaseValueException( $key, $value, 'string, not empty' ); } break; case "width": if ( !is_int( $value ) || $value < 5 ) { throw new ezcBaseValueException( $key, $value, 'int >= 5' ); } break; case "redrawFrequency": case "step": if ( ( !is_int( $value ) && !is_float( $value ) ) || $value < 1 ) { throw new ezcBaseValueException( $key, $value, 'int > 0' ); } break; default: throw new ezcBasePropertyNotFoundException( $key ); } $this->properties[$key] = $value; } } ?>