本文整理匯總了PHP中logger::crit方法的典型用法代碼示例。如果您正苦於以下問題:PHP logger::crit方法的具體用法?PHP logger::crit怎麽用?PHP logger::crit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類logger
的用法示例。
在下文中一共展示了logger::crit方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: install
/**
* @return string $statusMessage
*/
public static function install()
{
try {
Feed_Plugin_Install::createStaticRoutes();
} catch (Exception $e) {
logger::crit($e);
return self::getTranslate()->_('feed_install_failed');
}
return self::getTranslate()->_('feed_installed_successfully');
}
示例2: install
/**
* @return string $statusMessage
*/
public static function install()
{
try {
$install = new Blog_Plugin_Install();
// create object classes
$blogCategory = $install->createClass('BlogCategory');
$blogEntry = $install->createClass('BlogEntry');
// classmap
$install->setClassmap();
// create root object folder with subfolders
$blogFolder = $install->createFolders();
// create custom view for blog objects
$install->createCustomView($blogFolder, array($blogEntry->getId(), $blogCategory->getId()));
// create static routes
$install->createStaticRoutes();
// create predefined document types
$install->createDocTypes();
} catch (Exception $e) {
logger::crit($e);
return self::getTranslate()->_('blog_install_failed');
}
return self::getTranslate()->_('blog_installed_successfully');
}
示例3: _executeQueries
/**
* Executes queries in single transaction.
*
* @param array $queries
* @return boolean
*/
protected static function _executeQueries(array $queries)
{
$db = Pimcore_API_Plugin_Abstract::getDb()->getResource();
try {
$db->beginTransaction();
foreach ($queries as $query) {
Pimcore_API_Plugin_Abstract::getDb()->query($query);
}
$db->commit();
return true;
} catch (Zend_Db_Exception $e) {
$db->rollBack();
logger::crit($e->getMessage());
return false;
}
}