Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * This file contains the interface XML_Query2XML_Callback.
4
 *
5
 * PHP version 5
6
 *
7
 * @category  XML
8
 * @package   XML_Query2XML
9
 * @author    Lukas Feiler <lukas.feiler@lukasfeiler.com>
10
 * @copyright 2009 Lukas Feiler
11
 * @license   http://www.gnu.org/copyleft/lesser.html  LGPL Version 2.1
12
 * @version   CVS: $Id: Condition.php 309898 2011-04-02 17:38:08Z lukasfeiler $
13
 * @link      http://pear.php.net/package/XML_Query2XML
14
 */
15
 
16
/**
17
 * XML_Query2XML_Data_Condition extends the class
18
 * XML_Query2XML_Data_Processor.
19
 */
20
require_once 'XML/Query2XML/Data/Processor.php';
21
 
22
/**
23
 * Abstract class extended by all Data Condition Classes.
24
 * Such classes allow the implementation of a condition as to
25
 * whether the return value of execute() is to be used.
26
 *
27
 * @category  XML
28
 * @package   XML_Query2XML
29
 * @author    Lukas Feiler <lukas.feiler@lukasfeiler.com>
30
 * @copyright 2009 Lukas Feiler
31
 * @license   http://www.gnu.org/copyleft/lesser.html  LGPL Version 2.1
32
 * @version   Release: 1.7.2
33
 * @link      http://pear.php.net/package/XML_Query2XML
34
 * @since     Release 1.7.1RC1
35
 */
36
abstract class XML_Query2XML_Data_Condition extends XML_Query2XML_Data_Processor
37
{
38
    /**
39
     * Returns a boolean value indicating whether the return value of execute()
40
     * is to be used.
41
     *
42
     * @param mixed $value The return value of execute()
43
     *
44
     * @return boolean
45
     */
46
    abstract public function evaluateCondition($value);
47
 
48
    /**
49
     * Called by XML_Query2XML for every record in the result set.
50
     *
51
     * @param array $record An associative array.
52
     *
53
     * @return mixed Whatever is returned by the pre-processor.
54
     * @throws XML_Query2XML_ConfigException Bubbles up if no
55
     *                                       pre-processor was set.
56
     */
57
    public function execute(array $record)
58
    {
59
        return $this->runPreProcessor($record);
60
    }
61
}
62
?>