Indicates if the receiver should reset the underlying connection.
public shouldResetConnection ( ) : boolean | ||
Результат | boolean |
/** * Offers a generic and reusable method to handle exceptions generated by * a connection object. * * @param CommunicationException $exception Exception. */ public static function handle(CommunicationException $exception) { if ($exception->shouldResetConnection()) { $connection = $exception->getConnection(); if ($connection->isConnected()) { $connection->disconnect(); } } throw $exception; }