public function close() {

		// Make sure nothing unexpected happens
		try {
		
			// Check that a connection exists first
                	if( isset( $this->socket ) ) {

				// Close the socket
                        	fclose( $this->socket );

				// Unset the socket property
                        	unset($this->socket);

				// The connection is no longer established
				$this->established = false;
                	}

		} catch (Exception $e) {

			throw new MPDConnectionException( 'Disconnection failed: '.$e->getMessage(), self::MPD_DISCONNECTION_FAILED );		
		}

		// We'll assume it was successful
                return true;
        }
public function close() {

		// Make sure nothing unexpected happens
		try {
		
			// Check that a connection exists first
                	if( isset( $this->socket ) ) {

				// Close the socket
                        	fclose( $this->socket );

				// Unset the socket property
                        	unset($this->socket);

				// The connection is no longer established
				$this->established = false;
                	}

		} catch (Exception $e) {

			throw new MPDConnectionException( 'Disconnection failed: '.$e->getMessage(), self::MPD_DISCONNECTION_FAILED );		
		}

		// We'll assume it was successful
                return true;
        }
public function close ( ) { // Make sure nothing unexpected happens try { // Check that a connection exists first if ( isset ( $ this -> socket ) ) { // Close the socket fclose ( $ this -> socket ) ; // Unset the socket property unset ( $ this -> socket ) ; // The connection is no longer established $ this -> established = false ; } } catch ( Exception $ e ) { throw new MPDConnectionException ( 'Disconnection failed: ' . $ e -> getMessage ( ) , self :: MPD_DISCONNECTION_FAILED ) ; } // We'll assume it was successful return true ; }
Closes the connection to the MPD server
@return bool
Closes the connection to the MPD server