本文整理匯總了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);
}