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