Apache Zeta Components Manual :: File Source for progressmonitor.php

Source for file progressmonitor.php

Documentation is available at progressmonitor.php

  1. <?php
  2. /**
  3.  * File containing the ezcConsoleProgressMonitorOptions class.
  4.  *
  5.  * Licensed to the Apache Software Foundation (ASF) under one
  6.  * or more contributor license agreements.  See the NOTICE file
  7.  * distributed with this work for additional information
  8.  * regarding copyright ownership.  The ASF licenses this file
  9.  * to you under the Apache License, Version 2.0 (the
  10.  * "License"); you may not use this file except in compliance
  11.  * with the License.  You may obtain a copy of the License at
  12.  * 
  13.  *   http://www.apache.org/licenses/LICENSE-2.0
  14.  * 
  15.  * Unless required by applicable law or agreed to in writing,
  16.  * software distributed under the License is distributed on an
  17.  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  18.  * KIND, either express or implied.  See the License for the
  19.  * specific language governing permissions and limitations
  20.  * under the License.
  21.  *
  22.  * @package ConsoleTools
  23.  * @version //autogentag//
  24.  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  25.  * @filesource
  26.  */
  27.  
  28. /**
  29.  * Struct class to store the options of the ezcConsoleOutput class.
  30.  * This class stores the options for the {@link ezcConsoleOutput} class.
  31.  *
  32.  * @property string $formatString 
  33.  *            The format string to describe the complete progress monitor.
  34.  * 
  35.  * @package ConsoleTools
  36.  * @version //autogen//
  37.  */
  38. {
  39.     protected $properties = array(
  40.         'formatString' => '%8.1f%% %s %s',
  41.     );
  42.  
  43.     /**
  44.      * Option write access.
  45.      * 
  46.      * @throws ezcBasePropertyNotFoundException
  47.      *          If a desired property could not be found.
  48.      * @throws ezcBaseValueException
  49.      *          If a desired property value is out of range.
  50.      *
  51.      * @param string $key Name of the property.
  52.      * @param mixed $value  The value for the property.
  53.      * @ignore
  54.      */
  55.     public function __set$key$value )
  56.     {
  57.         switch $key )
  58.         {
  59.             case "formatString":
  60.                 if is_string$value === false || strlen$value )
  61.                 {
  62.                     throw new ezcBaseValueException$key$value'string, not empty' );
  63.                 }
  64.                 break;
  65.             default:
  66.                 throw new ezcBasePropertyNotFoundException$key );
  67.         }
  68.         $this->properties[$key$value;
  69.     }
  70. }
  71.  
  72. ?>
Documentation generated by phpDocumentor 1.4.3