本文整理匯總了PHP中Doctrine::debug方法的典型用法代碼示例。如果您正苦於以下問題:PHP Doctrine::debug方法的具體用法?PHP Doctrine::debug怎麽用?PHP Doctrine::debug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Doctrine
的用法示例。
在下文中一共展示了Doctrine::debug方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: notifyException
/**
* Notify the formatter of an exception
*
* @param Exception $exception
* @return void
*/
public function notifyException($exception)
{
$msg = $exception->getMessage();
if (Doctrine::debug()) {
$msg .= "\n" . $exception->getTraceAsString();
}
echo $this->_formatter->format($msg, 'ERROR') . "\n";
}
示例2: delete
/**
* delete
* single shot delete
* deletes all records from this collection
* and uses only one database query to perform this operation
*
* @return Doctrine_Collection
*/
public function delete(Doctrine_Connection $conn = null)
{
if ($conn == null) {
$conn = $this->_table->getConnection();
}
$conn->beginTransaction();
$conn->transaction->addCollection($this);
foreach ($this as $key => $record) {
$record->delete($conn);
}
Doctrine::debug(true);
$conn->commit();
$this->data = array();
return $this;
}