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

Source for file table_diff.php

Documentation is available at table_diff.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 table difference information in.
  28.  *
  29.  * @package DatabaseSchema
  30.  * @version //autogentag//
  31.  */
  32. {
  33.     /**
  34.      * All added fields
  35.      *
  36.      * @var array(string=>ezcDbSchemaField) 
  37.      */
  38.     public $addedFields;
  39.  
  40.     /**
  41.      * All changed fields
  42.      *
  43.      * @var array(string=>ezcDbSchemaField) 
  44.      */
  45.     public $changedFields;
  46.  
  47.     /**
  48.      * All removed fields
  49.      *
  50.      * @var array(string=>bool) 
  51.      */
  52.     public $removedFields;
  53.  
  54.     /**
  55.      * All added indexes
  56.      *
  57.      * @var array(string=>ezcDbSchemaIndex) 
  58.      */
  59.     public $addedIndexes;
  60.  
  61.     /**
  62.      * All changed indexes
  63.      *
  64.      * @var array(string=>ezcDbSchemaIndex) 
  65.      */
  66.     public $changedIndexes;
  67.  
  68.     /**
  69.      * All removed indexes
  70.      *
  71.      * @var array(string=>bool) 
  72.      */
  73.     public $removedIndexes;
  74.  
  75.     /**
  76.      * Constructs an ezcDbSchemaTableDiff object.
  77.      *
  78.      * @param array(string=>ezcDbSchemaField) $addedFields 
  79.      * @param array(string=>ezcDbSchemaField) $changedFields 
  80.      * @param array(string=>bool)             $removedFields 
  81.      * @param array(string=>ezcDbSchemaIndex) $addedIndexes 
  82.      * @param array(string=>ezcDbSchemaIndex) $changedIndexes 
  83.      * @param array(string=>bool)             $removedIndexes 
  84.      */
  85.     function __construct$addedFields array()$changedFields array(),
  86.             $removedFields array()$addedIndexes array()$changedIndexes =
  87.             array()$removedIndexes array() )
  88.     {
  89.         $this->addedFields = $addedFields;
  90.         $this->changedFields = $changedFields;
  91.         $this->removedFields = $removedFields;
  92.         $this->addedIndexes = $addedIndexes;
  93.         $this->changedIndexes = $changedIndexes;
  94.         $this->removedIndexes = $removedIndexes;
  95.     }
  96.  
  97.     static public function __set_statearray $array )
  98.     {
  99.         return new ezcDbSchemaTableDiff(
  100.              $array['addedFields']$array['changedFields']$array['removedFields'],
  101.              $array['addedIndexes']$array['changedIndexes']$array['removedIndexes']
  102.         );
  103.     }
  104. }
  105. ?>
Documentation generated by phpDocumentor 1.4.3