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

Source for file statusbar.php

Documentation is available at statusbar.php

  1. <?php
  2. /**
  3.  * File containing the ezcConsoleStatusbarOptions 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 $successChar 
  33.  *            The char shown for a succeeded status.
  34.  * @property string $failureChar 
  35.  *            The char shown for a failed status.
  36.  * 
  37.  * @package ConsoleTools
  38.  * @version //autogen//
  39.  */
  40. {
  41.     protected $properties = array(
  42.         'successChar' => "+",
  43.         'failureChar' => "-",
  44.     );
  45.  
  46.     /**
  47.      * Option write access.
  48.      * 
  49.      * @throws ezcBasePropertyNotFoundException
  50.      *          If a desired property could not be found.
  51.      * @throws ezcBaseValueException
  52.      *          If a desired property value is out of range.
  53.      *
  54.      * @param string $key Name of the property.
  55.      * @param mixed $value  The value for the property.
  56.      * @ignore
  57.      */
  58.     public function __set$key$value )
  59.     {
  60.         switch $key )
  61.         {
  62.             case "successChar":
  63.             case "failureChar":
  64.                 if is_string$value === false || strlen$value )
  65.                 {
  66.                     throw new ezcBaseValueException$key$value'string, not empty' );
  67.                 }
  68.                 break;
  69.             default:
  70.                 throw new ezcBasePropertyNotFoundException$key );
  71.         }
  72.         $this->properties[$key$value;
  73.     }
  74. }
  75.  
  76. ?>
Documentation generated by phpDocumentor 1.4.3