FullText.class.php

Go to the documentation of this file.
00001 <?php
00002 /****************************************************************************
00003  *   Copyright (C) 2005-2007 by Anton E. Lebedevich, Konstantin V. Arkhipov *
00004  *                                                                          *
00005  *   This program is free software; you can redistribute it and/or modify   *
00006  *   it under the terms of the GNU Lesser General Public License as         *
00007  *   published by the Free Software Foundation; either version 3 of the     *
00008  *   License, or (at your option) any later version.                        *
00009  *                                                                          *
00010  ****************************************************************************/
00011 /* $Id: FullText.class.php 4687 2007-12-09 18:57:18Z voxus $ */
00012 
00018     abstract class FullText
00019         implements DialectString, MappableObject, LogicalObject
00020     {
00021         protected $logic = null;
00022         protected $field = null;
00023         protected $words = null;
00024         
00025         public function __construct($field, $words, $logic)
00026         {
00027             Assert::isTrue(
00028                 is_string($field) ||
00029                 $field instanceof DBField
00030             );
00031             Assert::isArray($words);
00032             
00033             $this->field = $field;
00034             $this->words = $words;
00035             $this->logic = $logic;
00036         }
00037         
00038         public function toMapped(StorableDAO $dao, JoinCapableQuery $query)
00039         {
00040             return new $this(
00041                 $dao->guessAtom($this->field, $query),
00042                 $this->words,
00043                 $this->logic
00044             );
00045         }
00046         
00047         public function toBoolean(Form $form)
00048         {
00049             throw new UnsupportedMethodException();
00050         }
00051     }
00052 ?>

Generated on Sun Dec 9 21:56:23 2007 for onPHP by  doxygen 1.5.4