diff --git a/lib/Doctrine/Search.php b/lib/Doctrine/Search.php new file mode 100644 index 000000000..939718c8c --- /dev/null +++ b/lib/Doctrine/Search.php @@ -0,0 +1,47 @@ +. + */ + +/** + * Doctrine_Search + * + * @author Konsta Vesterinen + * @package Doctrine + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @version $Revision$ + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + */ +class Doctrine_Search +{ + +} +/** +fields: +[keyword] [field] [foreign_id] [position] + + +fields: +[keyword] [field] [match] + +example data: +'orm' 'content' '1:36|2:23' +*/ diff --git a/lib/Doctrine/Search/Record.php b/lib/Doctrine/Search/Record.php new file mode 100644 index 000000000..b7da128d9 --- /dev/null +++ b/lib/Doctrine/Search/Record.php @@ -0,0 +1,46 @@ +. + */ + +/** + * Doctrine_Search_Record + * + * @author Konsta Vesterinen + * @package Doctrine + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @version $Revision$ + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + */ +class Doctrine_Search_Record extends Doctrine_Template +{ + public function setTableDefinition() + { + $this->hasColumn('keyword', 'string', 250, array('notnull' => true)); + $this->hasColumn('field', 'string', 50, array('notnull' => true)); + $this->hasColumn('[component]_id', 'string', 50, array('notnull' => true)); + $this->hasColumn('position', 'integer', 8); + } + public function setUp() + { + $this->hasOne('[component]', array('local' => '[component]_id')); + } +}