~fusonic/chive/1.1

« back to all changes in this revision

Viewing changes to yii/caching/dependencies/CExpressionDependency.php

  • Committer: Matthias Burtscher
  • Date: 2010-02-12 09:12:35 UTC
  • Revision ID: matthias.burtscher@fusonic.net-20100212091235-jqxrb62klx872ajc
* Updated Yii to 1.1.0
* Removed CodePress and CodeMirror
* Updated jQuery and some plugins
* Cleaned some code ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 *
5
5
 * @author Qiang Xue <qiang.xue@gmail.com>
6
6
 * @link http://www.yiiframework.com/
7
 
 * @copyright Copyright &copy; 2008-2009 Yii Software LLC
 
7
 * @copyright Copyright &copy; 2008-2010 Yii Software LLC
8
8
 * @license http://www.yiiframework.com/license/
9
9
 */
10
10
 
17
17
 * the same as the one evaluated when storing the data to cache.
18
18
 *
19
19
 * @author Qiang Xue <qiang.xue@gmail.com>
20
 
 * @version $Id: CExpressionDependency.php 883 2009-03-23 20:52:35Z qiang.xue $
 
20
 * @version $Id: CExpressionDependency.php 1678 2010-01-07 21:02:00Z qiang.xue $
21
21
 * @package system.caching.dependencies
22
22
 * @since 1.0
23
23
 */
25
25
{
26
26
        /**
27
27
         * @var string the PHP expression whose result is used to determine the dependency.
 
28
         * Starting from version 1.0.11, the expression can also be a valid PHP callback,
 
29
         * including class method name (array(ClassName/Object, MethodName)),
 
30
         * or anonymous function (PHP 5.3.0+). The function/method will be passed with a
 
31
         * parameter which is the dependency object itself.
28
32
         */
29
33
        public $expression;
30
34
 
44
48
         */
45
49
        protected function generateDependentData()
46
50
        {
47
 
                return @eval('return '.$this->expression.';');
 
51
                return $this->evaluateExpression($this->expression);
48
52
        }
49
53
}