web/lib/Zend/Search/Lucene/Document/Html.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Search_Lucene
    16  * @package    Zend_Search_Lucene
    17  * @subpackage Document
    17  * @subpackage Document
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @version    $Id: Html.php 23392 2010-11-19 09:53:16Z ramon $
    20  * @version    $Id: Html.php 24593 2012-01-05 20:35:02Z matthew $
    21  */
    21  */
    22 
    22 
    23 
    23 
    24 /** Zend_Search_Lucene_Document */
    24 /** Zend_Search_Lucene_Document */
    25 require_once 'Zend/Search/Lucene/Document.php';
    25 require_once 'Zend/Search/Lucene/Document.php';
    29  * HTML document.
    29  * HTML document.
    30  *
    30  *
    31  * @category   Zend
    31  * @category   Zend
    32  * @package    Zend_Search_Lucene
    32  * @package    Zend_Search_Lucene
    33  * @subpackage Document
    33  * @subpackage Document
    34  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    34  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    35  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    35  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    36  */
    36  */
    37 class Zend_Search_Lucene_Document_Html extends Zend_Search_Lucene_Document
    37 class Zend_Search_Lucene_Document_Html extends Zend_Search_Lucene_Document
    38 {
    38 {
    39     /**
    39     /**
   436             $wordsToHighlightFlipped[$token->getTermText()] = $id;
   436             $wordsToHighlightFlipped[$token->getTermText()] = $id;
   437         }
   437         }
   438 
   438 
   439         if (!is_callable($callback)) {
   439         if (!is_callable($callback)) {
   440             require_once 'Zend/Search/Lucene/Exception.php';
   440             require_once 'Zend/Search/Lucene/Exception.php';
   441             throw new Zend_Search_Lucene_Exception('$viewHelper parameter mast be a View Helper name, View Helper object or callback.');
   441             throw new Zend_Search_Lucene_Exception('$viewHelper parameter must be a View Helper name, View Helper object or callback.');
   442         }
   442         }
   443 
   443 
   444         $xpath = new DOMXPath($this->_doc);
   444         $xpath = new DOMXPath($this->_doc);
   445 
   445 
   446         $matchedNodes = $xpath->query("/html/body");
   446         $matchedNodes = $xpath->query("/html/body");