Extending PHPGeocache

You are free to modify PHPGeocache as long the copyright note remains intact in all copies of the code. Although you can simply edit the PHPGeocache scripts it is not recommended to do this because if a newer version is released containing new features and/or bug fixes you cannot simply copy this over your modified file or you will lose all the modifications you made.
Most of the time it is sufficient (this is the recommended method) to extend the corresponding class to add new methods and attributes.


Extending the Classes

You simply use of the PHPGeocache classes as a base version to extend.

Example
<php
   require_once "PHPGeocache/PHPGeocache.inc.php";

   class MyPHPGeocache extends PHPGeocache
   {
      function myNewFunction($params)
      {
         // Do something here...
      }
   }

   $geocache = &new MyPHPGeocache();
   // and so on...
?>

If you add features that might be of use to others (e.g. support for a not-yet-supported database) we would be happy to include it in the distribution (and giving you proper credit of course) as long as your code also uses the MIT License.
You can contact us by sending an e-mail to mail@phpgeocache.org.

PHPGeocache  -  Geocaching  with  PHP