Skip to content

Commit

Permalink
Add a destructor method to disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Baker committed Aug 31, 2015
1 parent 902ff5a commit eed3597
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions routeros_api.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,5 +389,15 @@ function comm($com, $arr = array())
}
return $this->read();
}

/**
* Standard destructor
*
* @return void
*/
function __destruct()
{
$this->disconnect();
}
}
?>

0 comments on commit eed3597

Please sign in to comment.