本文整理汇总了PHP中DataSource::shutdown方法的典型用法代码示例。如果您正苦于以下问题:PHP DataSource::shutdown方法的具体用法?PHP DataSource::shutdown怎么用?PHP DataSource::shutdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataSource
的用法示例。
在下文中一共展示了DataSource::shutdown方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: shutdown
/**
* Close the connection to the MySQL data source.
* <p>Not only does this happen automatically on shutdown, but MySQL
* also closes open connetions on shutdown. Only one will matter since
* the other will notice that the connection is closed and not attempt
* to close it again. However, it is entirely unnecessary to call
* shutodwn() from an application that uses a MySQL data source unless
* you want to explicitly shut down the data source.
* @return TRUE if successful, FALSE otherwise.
*/
function shutdown()
{
if (!parent::shutdown()) {
if (!mysql_close($this->myLink)) {
LogFatal("Unable to shut down MySQL connection: " . mysql_error());
return FALSE;
}
}
return TRUE;
}
示例2: shutdown
/**
* Pretend to close the connection, though there is not connection to
* close.
* @return TRUE if successful, FALSE otherwise.
*/
function shutdown()
{
if (!parent::shutdown()) {
return !is_null($_REQUEST);
}
return TRUE;
}