当前位置: 首页>>代码示例>>PHP>>正文


PHP Logs::set方法代码示例

本文整理汇总了PHP中Logs::set方法的典型用法代码示例。如果您正苦于以下问题:PHP Logs::set方法的具体用法?PHP Logs::set怎么用?PHP Logs::set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Logs的用法示例。


在下文中一共展示了Logs::set方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processOut

 /**
  * Logout
  */
 public function processOut()
 {
     Logs::set(array('type' => 'LOG', 'message' => 'Logout: ' . _currentUser()->getLogin()));
     CopixAuth::getCurrentUser()->logout(array());
     CopixEventNotifier::notify('logout', array('login' => CopixAuth::getCurrentUser()->getLogin()));
     CopixAuth::destroyCurrentUser();
     CopixSession::destroyNamespace('default');
     return _arRedirect(CopixRequest::get('auth_url_return', _url('||')));
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:12,代码来源:log.actiongroup.php

示例2: getTypeInfos


//.........这里部分代码省略.........
             } else {
                 $type_mime = 'application/vnd.ms-powerpoint';
             }
             $res = array('type_text' => CopixI18N::get('malle|mime.presentation'), 'type_icon' => 'icon_file_presentation.png', 'type_icon32' => 'icon_file_presentation32.png', 'type_mime' => $type_mime);
             break;
         case "image/jpeg":
         case "jpg":
         case "jpeg":
             $res = array('type_text' => CopixI18N::get('malle|mime.image.jpg'), 'type_icon' => 'icon_file_image.png', 'type_icon32' => 'icon_file_image32.png', 'type_mime' => 'image/jpeg');
             break;
         case "image/png":
         case "png":
             $res = array('type_text' => CopixI18N::get('malle|mime.image.png'), 'type_icon' => 'icon_file_image.png', 'type_icon32' => 'icon_file_image32.png', 'type_mime' => 'image/png');
             break;
         case "image/gif":
         case "gif":
             $res = array('type_text' => CopixI18N::get('malle|mime.image.gif'), 'type_icon' => 'icon_file_image.png', 'type_icon32' => 'icon_file_image32.png', 'type_mime' => 'image/gif');
             break;
         case "image/bmp":
         case "bmp":
             $res = array('type_text' => CopixI18N::get('malle|mime.image.bmp'), 'type_icon' => 'icon_file_image.png', 'type_icon32' => 'icon_file_image32.png', 'type_mime' => 'image/bmp');
             break;
         case "audio/wav":
         case "wav":
         case "audio/mpeg":
         case "mp3":
             if (strtolower($mime_type) == 'audio/wav' || strtolower($mime_type) == 'wav') {
                 $type_mime = 'audio/wav';
             } else {
                 $type_mime = 'audio/mpeg';
             }
             $res = array('type_text' => CopixI18N::get('malle|mime.sound'), 'type_icon' => 'icon_file_sound.png', 'type_icon32' => 'icon_file_sound32.png', 'type_mime' => $type_mime);
             break;
         case "application/pdf":
         case "pdf":
             $res = array('type_text' => CopixI18N::get('malle|mime.pdf'), 'type_icon' => 'icon_file_pdf.png', 'type_icon32' => 'icon_file_pdf32.png', 'type_mime' => 'application/pdf');
             break;
         case "application/vnd.ms-excel":
         case "xls":
         case "xlsx":
         case "application/vnd.oasis.opendocument.spreadsheet":
         case "ods":
             if (strtolower($mime_type) == 'application/vnd.ms-excel' || strtolower($mime_type) == 'xls' || strtolower($mime_type) == 'xlsx') {
                 $type_mime = 'application/vnd.ms-excel';
             } else {
                 $type_mime = 'application/vnd.oasis.opendocument.spreadsheet';
             }
             $res = array('type_text' => CopixI18N::get('malle|mime.xls'), 'type_icon' => 'icon_file_spreadsheet.png', 'type_icon32' => 'icon_file_spreadsheet32.png', 'type_mime' => $type_mime);
             break;
         case "video/mpeg":
         case "video/x-ms-wmv":
         case "mpg":
         case "mpeg":
         case "video/3gpp":
         case "3gp":
         case "video/quicktime":
         case "mov":
             if (strtolower($mime_type) == 'video/3gpp' || strtolower($mime_type) == '3gp') {
                 $type_mime = 'video/3gpp';
             } elseif (strtolower($mime_type) == 'video/quicktime' || strtolower($mime_type) == 'mov') {
                 $type_mime = 'video/quicktime';
             } else {
                 $type_mime = 'video/mpeg';
             }
             $res = array('type_text' => CopixI18N::get('malle|mime.video'), 'type_icon' => 'icon_file_video.png', 'type_icon32' => 'icon_file_video32.png', 'type_mime' => $type_mime);
             break;
         case "application/zip":
         case "zip":
         case "application/forcedownload":
             $res = array('type_text' => CopixI18N::get('malle|mime.zip'), 'type_icon' => 'icon_file_zip.png', 'type_icon32' => 'icon_file_zip32.png', 'type_mime' => 'application/zip');
             break;
         case "text/xml":
             $res = array('type_text' => CopixI18N::get('malle|mime.xml'), 'type_icon' => 'icon_file_xml.png', 'type_icon32' => 'icon_file_xml32.png', 'type_mime' => 'text/xml');
             break;
         case "application/x-smarttech-notebook":
         case "nbk":
         case "xbk":
         case "notebook":
             $res = array('type_text' => CopixI18N::get('malle|mime.notebook'), 'type_icon' => 'icon_file_presentation.png', 'type_icon32' => 'icon_file_presentation32.png', 'type_mime' => 'application/x-smarttech-notebook');
             break;
         default:
             if ($point !== false) {
                 $ext = strtolower(substr($file_name, $point + 1));
                 switch ($ext) {
                     case 'flv':
                         $res = array('type_text' => CopixI18N::get('malle|mime.flv'), 'type_icon' => 'icon_file_video.png', 'type_icon32' => 'icon_file_video32.png');
                         break;
                     default:
                         $res = array('type_text' => CopixI18N::get('malle|mime.default'), 'type_icon' => 'icon_file.png', 'type_icon32' => 'icon_file32.png');
                         Logs::set(array('type' => 'INFO', 'message' => "getTypeInfos ({$mime_type}, {$file_name})"));
                 }
             } else {
                 $res = array('type_text' => CopixI18N::get('malle|mime.default'), 'type_icon' => 'icon_file.png', 'type_icon32' => 'icon_file32.png');
                 Logs::set(array('type' => 'INFO', 'message' => "getTypeInfos ({$mime_type}, {$file_name})"));
             }
             break;
     }
     //print_r($res);
     return $res;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:101,代码来源:malleservice.class.php

示例3: go

 /**
  * Acces direct a un module
  *
  * Fonction generique d'acces a un module depuis un noeud.
  *
  * @author Stephane Holtz <sholtz@cap-tic.fr>
  */
 public function go()
 {
     // NOTIFICATIONS : Préparation de l'enregistrement de la visite. Le module_id est à completer avant enregistrement.
     $lastvisit = _record("kernel|kernel_notifications_lastvisit");
     $lastvisit->user_id = $this->user->id;
     // id Copix
     $lastvisit->date = date('Y-m-d H:i:s');
     $lastvisit->node_type = _request("ntype");
     $lastvisit->node_id = _request("nid");
     $lastvisit->module_type = _request("mtype");
     $lastvisit->module_id = null;
     $mid = _request("mid", 0);
     if (!is_null(_request("ntype")) && !is_null(_request("nid")) && !is_null(_request("mtype"))) {
         CopixSession::set('myNode', array('type' => _request("ntype"), 'id' => _request("nid")));
         if (_request("ntype") == 'CLUB' && _request("mtype") == 'comptes' && !_request("mid")) {
             $loadModule = new CopixActionReturn(COPIX_AR_REDIRECT, CopixUrl::get('groupe||getHomeMembers', array('id' => _request("nid"))));
         } elseif (_request("ntype") == 'CLUB' && _request("mtype") == 'admin' && !_request("mid")) {
             $loadModule = new CopixActionReturn(COPIX_AR_REDIRECT, CopixUrl::get('groupe||getHomeAdmin', array('id' => _request("nid"))));
         } elseif (strpos(_request("ntype"), 'USER_') === false) {
             // Si on ne connait pas l'ID du module, on tente de le detecter automatiquement
             if (!$mid) {
                 $modules = Kernel::getModEnabled(_request("ntype"), _request("nid"), '', 0, 0, true);
                 foreach ($modules as $module) {
                     if ($module->module_type == 'MOD_' . strtoupper(_request("mtype"))) {
                         if (isset($module->module_id)) {
                             $mid = $module->module_id;
                         } else {
                             $mid = 0;
                         }
                         break;
                     }
                 }
             }
             // die('CopixUrl::get('._request("mtype").'|default|go   id='.$mid);
             $loadModule = new CopixActionReturn(COPIX_AR_REDIRECT, CopixUrl::get(_request("mtype") . '|default|go', array('id' => $mid)));
         } else {
             if ($mid) {
                 $loadModule = new CopixActionReturn(COPIX_AR_REDIRECT, CopixUrl::get(_request("mtype") . '|default|go', array('id' => $mid)));
             } else {
                 $loadModule = new CopixActionReturn(COPIX_AR_REDIRECT, CopixUrl::get(_request("mtype") . '||'));
             }
         }
         // NOTIFICATIONS : Enregistrement de la visite de l'utilisateur (avec suppression de doublons)
         if ($mid) {
             $lastvisit->module_id = $mid;
         }
         if ($lastvisit->user_id) {
             _dao('kernel|kernel_notifications_lastvisit')->deleteBy(_daoSp()->addCondition('user_id', '=', $lastvisit->user_id)->addCondition('node_type', '=', $lastvisit->node_type)->addCondition('node_id', '=', $lastvisit->node_id)->addCondition('module_type', '=', $lastvisit->module_type)->addCondition('module_id', '=', $lastvisit->module_id));
             _dao("kernel|kernel_notifications_lastvisit")->insert($lastvisit);
         }
         // LOGS : Logs d'usage
         Logs::set(array('type' => 'GO', 'node_type' => _request("ntype"), 'node_id' => _request("nid"), 'module_type' => _request("mtype"), 'module_id' => $mid ? $mid : null));
         return $loadModule;
     }
     $loadModule = new CopixActionReturn(COPIX_AR_REDIRECT, CopixUrl::get('||'));
     return $loadModule;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:64,代码来源:dashboard.actiongroup.php


注:本文中的Logs::set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。