You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 8, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,13 +30,15 @@ A couple of choices here:
30
30
```
31
31
Run ```composer update``` from the command line.
32
32
33
+
The composer.json file should autoload the ```phpFITFileAnalysis``` class, so as long as you ```<?php require __DIR__ . '/vendor/autoload.php'; ?>``` in your PHP file (assuming it is in your project's root folder), you should be able to instantiate the class with ```<?php $pFFA = new adriangibbons\phpFITFileAnalysis('fit_files/my_fit_file.fit'); ?>```
34
+
33
35
**The more manual way:** Download the ZIP from GitHub and put PHP class file from the /src directory somewhere appropriate (e.g. classes/). A conscious effort has been made to keep everything in a single file.
34
36
35
37
Then include the file on the PHP page where you want to use it and instantiate an object of the class:
36
38
```php
37
39
<?php
38
40
include('classes/phpFITFileAnalysis.php');
39
-
$pFFA = new adriangibbons\phpFITFileAnalysis\phpFITFileAnalysis('fit_files/my_fit_file.fit');
41
+
$pFFA = new adriangibbons\phpFITFileAnalysis('fit_files/my_fit_file.fit');
40
42
?>
41
43
```
42
44
Note that the only mandatory parameter required when creating an instance is the path to the FIT file that you want to load.
@@ -117,7 +119,7 @@ $options = [
117
119
'units' => 'statute',
118
120
'pace' => true
119
121
];
120
-
$pFFA = new adriangibbons\phpFITFileAnalysis\phpFITFileAnalysis('my_fit_file.fit', $options);
122
+
$pFFA = new adriangibbons\phpFITFileAnalysis('my_fit_file.fit', $options);
121
123
````
122
124
The optional parameters are described in more detail below.
0 commit comments