[ 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/ -> PrimaryKeyInfo.php (source)

   1  <?php
   2  /*
   3   *  $Id: PrimaryKeyInfo.php,v 1.6 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 a PrimaryKey
  24   *
  25   * @author    Hans Lellelid <hans@xmpl.org>
  26   * @version   $Revision: 1.6 $
  27   * @package   creole.metadata
  28   */
  29  class PrimaryKeyInfo {
  30  
  31      /** name of the primary key */
  32      private $name;
  33  
  34      /** columns in the primary key */
  35      private $columns = array();
  36  
  37      /** additional vendor specific information */
  38      private $vendorSpecificInfo = array();
  39  
  40      /**
  41       * @param string $name The name of the foreign key.
  42       */
  43      function __construct($name, $vendorInfo = array())
  44      {
  45          $this->name = $name;
  46          $this->vendorSpecificInfo = $vendorInfo;
  47      }
  48  
  49      /**
  50       * Get foreign key name.
  51       * @return string
  52       */
  53      public function getName()
  54      {
  55          return $this->name;
  56      }
  57  
  58      /**
  59       * @param Column $column
  60       * @return void
  61       */
  62      public function addColumn($column)
  63      {
  64          $this->columns[] = $column;
  65      }
  66  
  67      /**
  68       * @return array Column[]
  69       */
  70      public function getColumns()
  71      {
  72          return $this->columns;
  73      }
  74  
  75      /**
  76       * Get vendor specific optional information for this primary key.
  77       * @return array vendorSpecificInfo[]
  78       */
  79      public function getVendorSpecificInfo()
  80      {
  81          return $this->vendorSpecificInfo;
  82      }
  83  
  84      /**
  85       * @return string
  86       */
  87      public function toString()
  88      {
  89          return $this->name;
  90      }
  91  }


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