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


PHP Foundry::exception方法代码示例

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


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

示例1: explorer

 /**
  * Service Hook for explorer
  *
  * @since	1.2
  * @access	public
  * @param	string
  * @return
  */
 public function explorer()
 {
     // Check for request forgeries
     Foundry::checkToken();
     // Require the user to be logged in
     Foundry::requireLogin();
     // Get the current view
     $view = $this->getCurrentView();
     // Get the group object
     $groupId = JRequest::getInt('uid');
     $group = Foundry::group($groupId);
     // Determine if the viewer can really view items
     if (!$group->canViewItem()) {
         return $view->call(__FUNCTION__);
     }
     // Load up the explorer library
     $explorer = Foundry::explorer($group->id, SOCIAL_TYPE_GROUP);
     $hook = JRequest::getCmd('hook');
     $result = $explorer->hook($hook);
     $exception = Foundry::exception('Folder retrieval successful', SOCIAL_MSG_SUCCESS);
     return $view->call(__FUNCTION__, $exception, $result);
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:30,代码来源:groups.php

示例2: explorer

 /**
  * Service Hook for explorer
  *
  * @since   1.3
  * @access  public
  * @param   string
  * @return
  */
 public function explorer()
 {
     // Check for request forgeries
     Foundry::checkToken();
     // Require the user to be logged in
     Foundry::requireLogin();
     // Get the current view
     $view = $this->getCurrentView();
     // Get the group object
     $eventId = $this->input->getint('uid');
     $event = FD::event($eventId);
     // Determines if the current user is a guest of this event
     $guest = $event->getGuest($this->my->id);
     if (!$this->my->isSiteAdmin() && $event->isInviteOnly() && !$guest->isInvited() && !$guest->isGuest()) {
         $this->view->setMessage(JText::_('COM_EASYSOCIAL_EVENTS_NO_ACCESS_TO_EVENT'), SOCIAL_MSG_ERROR);
         return $this->view->call(__FUNCTION__);
     }
     // Load up the explorer library
     $explorer = Foundry::explorer($event->id, SOCIAL_TYPE_EVENT);
     $hook = JRequest::getCmd('hook');
     $result = $explorer->hook($hook);
     $exception = Foundry::exception('Folder retrieval successful', SOCIAL_MSG_SUCCESS);
     return $view->call(__FUNCTION__, $exception, $result);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:32,代码来源:events.php


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