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

Source for file database.php

Documentation is available at database.php

  1. <?php
  2. /**
  3.  * This file contains the ezcWorkflowDatabaseOptions 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 WorkflowDatabaseTiein
  23.  * @version //autogentag//
  24.  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  25.  * @filesource
  26.  */
  27.  
  28. /**
  29.  * Options class for ezcWorkflowDatabase.
  30.  *
  31.  * @property string $prefix 
  32.  *                   The database table name prefix to be used.
  33.  *
  34.  * @package WorkflowDatabaseTiein
  35.  * @version //autogen//
  36.  */
  37. {
  38.     /**
  39.      * Properties.
  40.      *
  41.      * @var array(string=>mixed) 
  42.      */
  43.     protected $properties = array(
  44.         'prefix' => '',
  45.     );
  46.  
  47.     /**
  48.      * Property write access.
  49.      *
  50.      * @param string $propertyName  Name of the property.
  51.      * @param mixed  $propertyValue The value for the property.
  52.      *
  53.      * @throws ezcBasePropertyNotFoundException
  54.      *          If the the desired property is not found.
  55.      * @ignore
  56.      */
  57.     public function __set$propertyName$propertyValue )
  58.     {
  59.         switch $propertyName )
  60.         {
  61.             case 'prefix':
  62.                 if !is_string$propertyValue ) )
  63.                 {
  64.                     throw new ezcBaseValueException(
  65.                         $propertyName,
  66.                         $propertyValue,
  67.                         'string'
  68.                     );
  69.                 }
  70.                 break;
  71.             default:
  72.                 throw new ezcBasePropertyNotFoundException$propertyName );
  73.         }
  74.         $this->properties[$propertyName$propertyValue;
  75.     }
  76. }
  77. ?>
Documentation generated by phpDocumentor 1.4.3