GPXIN-17: Expose a method to enable 'experimental' features



Issue Information

Issue Type: New Feature
 
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: PHP GPXIngest (GPXIN)
Resolution: Done (2015-01-13 10:49:07)
Affects Version: 1.02,
Target version: 1.02,

Created: 2015-01-13 10:29:41
Time Spent Working


Description
There may be future features which are considered experimental (or simply, not commonly required and computationally expensive).

An example of the latter would be distance calculations (GPXIN-6).

So that the functionality can be implemented without requiring the overhead where it is not needed, create and expose a method whereby certain off-by-default features can be enabled.


Issue Links

Toggle State Changes

Activity


When adding a new 'experimental' feature, a unique name for it needs to be added to the array experimentalFeatures

Have created three new public methods;

public function enableExperimental($type)
public function disableExperimental($type)
public function listExperimental()


The method listExperimental returns a key->value array indicating the internal names of any relevant features and whether the feature has been enabled or not (via enableExperimental ). It is the internal name which must be passed to the other two methods.

Have also added a protected method for use when deciding whether to execute experimental functionality

protected function expisenabled($type)
Goes without saying - anything added as experimental must still be syntactically correct!
btasker changed status from 'Open' to 'Resolved'
btasker added 'Done' to resolution

Repo: PHP-GPX-Ingest
Commit: 2675822364e525cb637cbf6ea9bcf52154e6a7cd
Author: Ben Tasker <github@<Domain Hidden>>

Date: Tue Jan 13 10:46:07 2015 +0000
Commit Message: Added ability to mark functionality as experimental. See GPXIN-17



Modified (-)(+)
-------
GPXIngest.class.php




Webhook User-Agent

GitHub-Hookshot/2f00e0f


View Commit

btasker changed status from 'Resolved' to 'Closed'