[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/vendor/creole/metadata/ -> IndexInfo.php (source)

   1  <?php
   2  /*
   3   *  $Id: IndexInfo.php,v 1.7 2005/02/25 15:47:02 pachanga Exp $
   4   *
   5   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   6   * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   7   * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   8   * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   9   * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  10   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  11   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  12   * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  13   * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  14   * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  15   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  16   *
  17   * This software consists of voluntary contributions made by many individuals
  18   * and is licensed under the LGPL. For more information please see
  19   * <http://creole.phpdb.org>.
  20   */
  21  
  22  /**
  23   * Represents an index.
  24   *
  25   * @author    Hans Lellelid <hans@xmpl.org>
  26   * @version   $Revision: 1.7 $
  27   * @package   creole.metadata
  28   */
  29  class IndexInfo {
  30  
  31      /** name of the index */
  32      private $name;
  33  
  34      /** columns in this index */
  35      private $columns = array();
  36  
  37      /** uniqueness flag */
  38      private $isUnique = false;
  39  
  40      /** additional vendor specific information */
  41      private $vendorSpecificInfo = array();
  42  
  43      function __construct($name, $isUnique = false, $vendorInfo = array())
  44      {
  45          $this->name = $name;
  46          $this->isUnique = $isUnique;
  47          $this->vendorSpecificInfo = $vendorInfo;
  48      }
  49  
  50      public function isUnique()
  51      {
  52          return $this->isUnique;
  53      }
  54  
  55      public function getName()
  56      {
  57          return $this->name;
  58      }
  59  
  60      /**
  61       * Get vendor specific optional information for this index.
  62       * @return array vendorSpecificInfo[]
  63       */
  64      public function getVendorSpecificInfo()
  65      {
  66          return $this->vendorSpecificInfo;
  67      }
  68  
  69      public function addColumn($column)
  70      {
  71          $this->columns[] = $column;
  72      }
  73  
  74      public function getColumns()
  75      {
  76          return $this->columns;
  77      }
  78  
  79      public function toString()
  80      {
  81          return $this->name;
  82      }
  83  
  84  }


Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7