本文整理汇总了PHP中Foundry::logError方法的典型用法代码示例。如果您正苦于以下问题:PHP Foundry::logError方法的具体用法?PHP Foundry::logError怎么用?PHP Foundry::logError使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Foundry
的用法示例。
在下文中一共展示了Foundry::logError方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onUserBeforeDelete
/**
* Performs various clean ups when a user is deleted
*
* @since 1.0
* @access public
* @param string
* @return
*/
public function onUserBeforeDelete($user)
{
// Include main file.
jimport('joomla.filesystem.file');
$path = JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php';
if (!JFile::exists($path)) {
return false;
}
// Include the foundry engine
require_once $path;
$success = true;
// Check if Foundry exists
if (!Foundry::exists()) {
Foundry::language()->loadSite();
echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
return;
}
if (!$success) {
return false;
}
$model = Foundry::model('Users');
$state = $model->delete($user['id']);
if (!$state) {
Foundry::logError(__FILE__, __LINE__, 'USER_PLUGIN: Error when deleting a user');
}
// Internal Trigger for onUserBeforeDelete
$dispatcher = Foundry::dispatcher();
$args = array(&$user);
$dispatcher->trigger(SOCIAL_APPS_GROUP_USER, __FUNCTION__, $args);
return true;
}