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

Source for file dialog.php

Documentation is available at dialog.php

  1. <?php
  2. /**
  3.  * This file contains the ezcConsoleDialogOptions 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.  * @access public
  27.  */
  28.  
  29. /**
  30.  * Basic options class for ezcConsoleDialog implementations.
  31.  * 
  32.  * @property ezcConsoleDialogValidator $validator 
  33.  *            The validator to use with this dialog.
  34.  * @property string $format 
  35.  *            The output format for the dialog.
  36.  * @package ConsoleTools
  37.  * @version //autogen//
  38.  */
  39. {
  40.     /**
  41.      * Properties.
  42.      * 
  43.      * @var array(string=>mixed) 
  44.      */
  45.     protected $properties = array(
  46.         "format"    => "default",
  47.         "validator" => null
  48.     );
  49.  
  50.     /**
  51.      * Property write access.
  52.      * 
  53.      * @param string $propertyName Name of the property.
  54.      * @param mixed $propertyValue The value for the property.
  55.      *
  56.      * @throws ezcBasePropertyPermissionException
  57.      *          If the property you try to access is read-only.
  58.      * @throws ezcBasePropertyNotFoundException
  59.      *          If the the desired property is not found.
  60.      * @ignore
  61.      */
  62.     public function __set$propertyName$propertyValue )
  63.     {
  64.         switch $propertyName )
  65.         {
  66.             case "format":
  67.                 if is_string$propertyValue === false || strlen$propertyValue )
  68.                 {
  69.                     throw new ezcBaseValueException$propertyName$propertyValue"string, length > 0" );
  70.                 }
  71.                 break;
  72.             case "validator":
  73.                 if ( ( $propertyValue instanceof ezcConsoleDialogValidator === false )
  74.                 {
  75.                     throw new ezcBaseValueException$propertyName$propertyValue"ezcConsoleDialogValidator" );
  76.                 }
  77.                 break;
  78.             default:
  79.                 throw new ezcBasePropertyNotFoundException$propertyName );
  80.         }
  81.         $this->properties[$propertyName$propertyValue;
  82.     }
  83. }
  84.  
  85. ?>
Documentation generated by phpDocumentor 1.4.3