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

Source for file table.php

Documentation is available at table.php

  1. <?php
  2. /**
  3.  *
  4.  * Licensed to the Apache Software Foundation (ASF) under one
  5.  * or more contributor license agreements.  See the NOTICE file
  6.  * distributed with this work for additional information
  7.  * regarding copyright ownership.  The ASF licenses this file
  8.  * to you under the Apache License, Version 2.0 (the
  9.  * "License"); you may not use this file except in compliance
  10.  * with the License.  You may obtain a copy of the License at
  11.  * 
  12.  *   http://www.apache.org/licenses/LICENSE-2.0
  13.  * 
  14.  * Unless required by applicable law or agreed to in writing,
  15.  * software distributed under the License is distributed on an
  16.  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  17.  * KIND, either express or implied.  See the License for the
  18.  * specific language governing permissions and limitations
  19.  * under the License.
  20.  *
  21.  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  22.  * @version //autogentag//
  23.  * @filesource
  24.  * @package DatabaseSchema
  25.  */
  26. /**
  27.  * A container to store a table definition in.
  28.  *
  29.  * @package DatabaseSchema
  30.  * @version //autogentag//
  31.  */
  32. {
  33.     /**
  34.      * A list of all the fields in this table.
  35.      *
  36.      * The array is indexed with the field name.
  37.      *
  38.      * @var array(string=>ezcDbSchemaField) 
  39.      */
  40.     public $fields;
  41.  
  42.     /**
  43.      * A list of all the indexes on this table.
  44.      *
  45.      * The array is indexed with the index name, where the index with the name
  46.      * 'primary' is a special one describing the primairy key.
  47.      *
  48.      * @var array(string=>ezcDbSchemaIndex) 
  49.      */
  50.     public $indexes;
  51.     
  52.     /**
  53.      * Constructs an ezcDbSchemaTable object.
  54.      *
  55.      * @param array(string=>ezcDbSchemaField) $fields 
  56.      * @param array(string=>ezcDbSchemaIndex) $indexes 
  57.      */
  58.     function __construct$fields$indexes array() )
  59.     {
  60.         $this->fields = $fields;
  61.         $this->indexes = $indexes;
  62.     }
  63.  
  64.     static public function __set_statearray $array )
  65.     {
  66.         return new ezcDbSchemaTable(
  67.             $array['fields']$array['indexes']
  68.         );
  69.     }
  70. }
  71. ?>
Documentation generated by phpDocumentor 1.4.3