Overview

Packages

  • Db
    • Adapter
    • Migration

Classes

  • Horde_Db_Adapter_Base
  • Horde_Db_Adapter_Base_Column
  • Horde_Db_Adapter_Base_ColumnDefinition
  • Horde_Db_Adapter_Base_Index
  • Horde_Db_Adapter_Base_Schema
  • Horde_Db_Adapter_Base_Table
  • Horde_Db_Adapter_Base_TableDefinition
  • Horde_Db_Adapter_Mysql
  • Horde_Db_Adapter_Mysql_Column
  • Horde_Db_Adapter_Mysql_Result
  • Horde_Db_Adapter_Mysql_Schema
  • Horde_Db_Adapter_Mysqli
  • Horde_Db_Adapter_Mysqli_Result
  • Horde_Db_Adapter_Pdo_Base
  • Horde_Db_Adapter_Pdo_Mysql
  • Horde_Db_Adapter_Pdo_Pgsql
  • Horde_Db_Adapter_Pdo_Sqlite
  • Horde_Db_Adapter_Postgresql_Column
  • Horde_Db_Adapter_Postgresql_Schema
  • Horde_Db_Adapter_SplitRead
  • Horde_Db_Adapter_Sqlite_Column
  • Horde_Db_Adapter_Sqlite_Schema

Interfaces

  • Horde_Db_Adapter
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * Copyright 2007 Maintainable Software, LLC
  4:  * Copyright 2008-2012 Horde LLC (http://www.horde.org/)
  5:  *
  6:  * @author     Mike Naberezny <mike@maintainable.com>
  7:  * @author     Derek DeVries <derek@maintainable.com>
  8:  * @author     Chuck Hagenbuch <chuck@horde.org>
  9:  * @license    http://www.horde.org/licenses/bsd
 10:  * @category   Horde
 11:  * @package    Db
 12:  * @subpackage Adapter
 13:  */
 14: 
 15: /**
 16:  * @author     Mike Naberezny <mike@maintainable.com>
 17:  * @author     Derek DeVries <derek@maintainable.com>
 18:  * @author     Chuck Hagenbuch <chuck@horde.org>
 19:  * @license    http://www.horde.org/licenses/bsd
 20:  * @category   Horde
 21:  * @package    Db
 22:  * @subpackage Adapter
 23:  */
 24: class Horde_Db_Adapter_Base_Index
 25: {
 26:     /**
 27:      * The table the index is on.
 28:      *
 29:      * @var string
 30:      */
 31:     public $table;
 32: 
 33:     /**
 34:      * The index's name.
 35:      *
 36:      * @var string
 37:      */
 38:     public $name;
 39: 
 40:     /**
 41:      *
 42:      */
 43:     public $unique;
 44: 
 45:     /**
 46:      * Is this a primary key?
 47:      *
 48:      * @var boolean
 49:      */
 50:     public $primary;
 51: 
 52:     /**
 53:      * The columns this index covers.
 54:      *
 55:      * @var array
 56:      */
 57:     public $columns;
 58: 
 59: 
 60:     /*##########################################################################
 61:     # Construct/Destruct
 62:     ##########################################################################*/
 63: 
 64:     /**
 65:      * Constructor.
 66:      *
 67:      * @param string  $table    The table the index is on.
 68:      * @param string  $name     The index's name.
 69:      * @param boolean $primary  Is this a primary key?
 70:      * @param boolean $unique   Is this a unique index?
 71:      * @param array   $columns  The columns this index covers.
 72:      */
 73:     public function __construct($table, $name, $primary, $unique, $columns)
 74:     {
 75:         $this->table   = $table;
 76:         $this->name    = $name;
 77:         $this->primary = $primary;
 78:         $this->unique  = $unique;
 79:         $this->columns = $columns;
 80:     }
 81: 
 82: 
 83:     /*##########################################################################
 84:     # Accessor
 85:     ##########################################################################*/
 86: 
 87:     /**
 88:      * @return  string
 89:      */
 90:     public function getName()
 91:     {
 92:         return $this->name;
 93:     }
 94: 
 95: 
 96:     /*##########################################################################
 97:     # Casting
 98:     ##########################################################################*/
 99: 
100:     /**
101:      * Comma-separated list of the columns in the primary key
102:      *
103:      * @return string
104:      */
105:     public function __toString()
106:     {
107:         return implode(',', $this->columns);
108:     }
109: 
110: }
111: 
API documentation generated by ApiGen