yiiapi/framework/logging/CChainedLogFilter.php

(完整代码) 1KB

<?php
/**
 * CChainedLogFilter class file
 *
 * @author Carsten Brandt <mail@cebe.cc>
 * @link http://www.yiiframework.com/
 * @copyright 2008-2013 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

/**
 * CChainedLogFilter allows you to attach multiple log filters to a log route (See {@link CLogRoute::$filter} for details).
 *
 * @author Carsten Brandt <mail@cebe.cc>
 * @package system.logging
 * @since 1.1.13
 */
class CChainedLogFilter extends CComponent implements ILogFilter
{
	/**
	 * @var array list of filters to apply to the logs.
	 * The value of each array element will be passed to {@link Yii::createComponent} to create
	 * a log filter object. As a result, this can be either a string representing the
	 * filter class name or an array representing the filter configuration.
	 * In general, the log filter classes should implement {@link ILogFilter} interface.
	 * Filters will be applied in the order they are defined.
	 */
	public $filters=array();

	/**
	 * Filters the given log messages by applying all filters configured by {@link filters}.
	 * @param array $logs the log messages
	 */
	public function filter(&$logs)
	{
		foreach($this->filters as $filter)
			Yii::createComponent($filter)->filter($logs);
	}
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。