From 80901aa7c6046406072534664b08104f07f2f839 Mon Sep 17 00:00:00 2001 From: zYne Date: Wed, 20 Sep 2006 21:33:21 +0000 Subject: [PATCH] Removed Doctrine_Form (form building is not part of an ORM framework) --- Doctrine/Form.php | 80 ----------------------------------------- Doctrine/Identifier.php | 28 +++++++++++++++ 2 files changed, 28 insertions(+), 80 deletions(-) delete mode 100644 Doctrine/Form.php diff --git a/Doctrine/Form.php b/Doctrine/Form.php deleted file mode 100644 index 49249b908..000000000 --- a/Doctrine/Form.php +++ /dev/null @@ -1,80 +0,0 @@ -record = $record; - $this->columns = $record->getTable()->getColumns(); - $this->keys = array_keys($this->columns); - $this->index = 0; - $this->count = count($this->keys); - } - public function current() { - $i = $this->index; - $column = $this->keys[$i]; - - $definitions = $this->columns[$column]; - - $e = explode("|",$definitions[2]); - - - $enum = false; - - if($definitions[0] == "enum") - $enum = $this->record->getTable()->getEnumValues($column); - - $length = $definitions[1]; - if( ! in_array("autoincrement",$e) && ! in_array("protected",$e)) { - if($enum) { - $elements[$column] = "\n"; - } else { - if($length <= 255) { - $elements[$column] = "\n"; - } elseif($length <= 4000) { - $elements[$column] = "\n"; - } else { - $elements[$column] = "\n"; - } - - } - return $elements[$column]; - } else { - $this->index++; - - if($this->index < $this->count) - return self::current(); - } - } - public function key() { - $i = $this->index; - return $this->keys[$i]; - } - public function next() { - $this->index++; - } - public function rewind() { - $this->index = 0; - } - public function valid() { - if($this->index >= $this->count) - return false; - - return true; - } -} - diff --git a/Doctrine/Identifier.php b/Doctrine/Identifier.php index c4c3c6b38..a3bf819db 100644 --- a/Doctrine/Identifier.php +++ b/Doctrine/Identifier.php @@ -1,4 +1,32 @@ . + */ + +/** + * Doctrine_Identifier + * + * @author Konsta Vesterinen + * @package Doctrine ORM + * @url www.phpdoctrine.com + * @license LGPL + */ class Doctrine_Identifier { /** * constant for auto_increment identifier