當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DAO_Worker::clearCache方法代碼示例

本文整理匯總了PHP中DAO_Worker::clearCache方法的典型用法代碼示例。如果您正苦於以下問題:PHP DAO_Worker::clearCache方法的具體用法?PHP DAO_Worker::clearCache怎麽用?PHP DAO_Worker::clearCache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DAO_Worker的用法示例。


在下文中一共展示了DAO_Worker::clearCache方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _handleImportWorker

 private function _handleImportWorker($xml)
 {
     $settings = CerberusSettings::getInstance();
     $logger = DevblocksPlatform::getConsoleLog();
     $sFirstName = (string) $xml->first_name;
     $sLastName = (string) $xml->last_name;
     $sEmail = (string) $xml->email;
     $sPassword = (string) $xml->password;
     $isSuperuser = (int) $xml->is_superuser;
     // Dupe check worker email
     if (null != ($worker_id = DAO_Worker::lookupAgentEmail($sEmail))) {
         $logger->info('[Importer] Avoiding creating duplicate worker #' . $worker_id . ' (' . $sEmail . ')');
         return true;
     }
     $worker_id = DAO_Worker::create($sEmail, CerberusApplication::generatePassword(8), $sFirstName, $sLastName, '');
     DAO_Worker::updateAgent($worker_id, array(DAO_Worker::PASSWORD => $sPassword, DAO_Worker::IS_SUPERUSER => intval($isSuperuser)));
     // Address to Worker
     DAO_AddressToWorker::assign($sEmail, $worker_id);
     DAO_AddressToWorker::update($sEmail, array(DAO_AddressToWorker::IS_CONFIRMED => 1));
     $logger->info('[Importer] Imported worker #' . $worker_id . ' (' . $sEmail . ')');
     DAO_Worker::clearCache();
     return true;
 }
開發者ID:rmiddle,項目名稱:cerb4,代碼行數:23,代碼來源:cron.classes.php


注:本文中的DAO_Worker::clearCache方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。