本文整理汇总了PHP中Audit::getIterator方法的典型用法代码示例。如果您正苦于以下问题:PHP Audit::getIterator方法的具体用法?PHP Audit::getIterator怎么用?PHP Audit::getIterator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Audit
的用法示例。
在下文中一共展示了Audit::getIterator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listConditions
/**
* Returns list of conditions
* @return array
*/
public static function listConditions()
{
$db = Zend_Registry::get('dbAdapter');
$audit = new Audit();
$sqlSelect = $db->select()->from($audit->_table)->where('auditId != 0')->group('objectClass')->group('type');
$conditions = $audit->getIterator($sqlSelect);
$listConditions = array();
foreach ($conditions as $condition) {
$prettyName = $condition->objectClass . '->';
switch ($condition->type) {
case WebVista_Model_ORM::REPLACE:
$prettyName .= __('Replace');
break;
case WebVista_Model_ORM::INSERT:
$prettyName .= __('Insert');
break;
case WebVista_Model_ORM::UPDATE:
$prettyName .= __('Update');
break;
case WebVista_Model_ORM::DELETE:
$prettyName .= __('Delete');
break;
default:
$prettyName .= __('Unknown');
break;
}
$listConditions[$condition->auditId] = $prettyName;
}
return $listConditions;
}
示例2: _populateAudits
protected function _populateAudits()
{
$audit = new Audit();
$db = Zend_Registry::get('dbAdapter');
$dbSelect = $db->select()->from($audit->_table)->where("startProcessing = '0000-00-00 00:00:00'")->orWhere("endProcessing = '0000-00-00 00:00:00'");
$this->_audits = $audit->getIterator($dbSelect);
}