4 * @author Marius Orcsik <marius@habarnam.ro>
8 class fooKeyIndex
extends fooIndexA
{
9 public function __construct ($mIncomingStuff) {
10 /* @var $oField fooFieldA */
11 foreach ($mIncomingStuff as $oField) {
12 // enforcing NOT NULL constraints on the components of the primary key
13 if (fooFieldA
::isValid($oField)) {
14 $oField->setIsNullable(false);
17 throw new fooIndexException('The object passed can not be used as a primary key.');
20 parent
::__construct($aRet);
23 public function getName () {
27 public function setName ($sName) {
28 $this->name
= $sName . '_idx';
31 public function getType() {
35 public function getDefinition () {
36 // this is totally wrong for PostgreSQL
37 return 'INDEX ' . $this->getName() . ' (' . $this->getIndexComponents(). ')';