. */ /** * Doctrine_Search_Scorer * * @package Doctrine * @subpackage Search * @author Konsta Vesterinen * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version $Revision$ * @link www.phpdoctrine.com * @since 1.0 */ class Doctrine_Search_Scorer { protected $_resultSet; protected $_components = array(); public function __construct($resultSet) { $this->_resultSet = $resultSet; } public function addComponent($component) { $this->_components[] = $component; } public function process() { foreach ($this->_resultSet as $mainRow) { if (isset($mainRow[$component])) { if ( ! is_array($mainRow[$component])) { throw new Doctrine_Search_Exception('Wrong data type in result set.'); } foreach ($mainRow[$component] as $indexRow) { } } } } }