本文整理汇总了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;
}