Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Commit bf3264e

Browse files
committed
added namespace and renamed src
1 parent 2fcfd05 commit bf3264e

File tree

5 files changed

+30
-22
lines changed

5 files changed

+30
-22
lines changed

demo/index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<title>php-FIT-File-Analysis demo</title>
5+
<title>phpFITFileAnalysis demo</title>
66
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
77
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
88
</head>
99
<body>
1010
<div class="jumbotron">
1111
<div class="container">
12-
<h2><strong>php-FIT-File-Analysis </strong><small>A PHP class for analysing FIT files created by Garmin GPS devices.</small></h2>
13-
<p>This is a demonstration of the phpFITFileAnalysis class available on <a class="btn btn-default btn-lg" href="https://github.com/adriangibbons/php-FIT-File-Analysis" target="_blank" role="button"><i class="fa fa-github"></i> GitHub</a></p>
12+
<h2><strong>phpFITFileAnalysis </strong><small>A PHP class for analysing FIT files created by Garmin GPS devices.</small></h2>
13+
<p>This is a demonstration of the phpFITFileAnalysis class available on <a class="btn btn-default btn-lg" href="https://github.com/adriangibbons/phpFITFileAnalysis" target="_blank" role="button"><i class="fa fa-github"></i> GitHub</a></p>
1414
</div>
1515
</div>
1616
<div class="container">

demo/mountain-biking.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22
/*
33
* Demonstration of the phpFITFileAnalysis class using Twitter Bootstrap framework
4-
* https://github.com/adriangibbons/php-FIT-File-Analysis
4+
* https://github.com/adriangibbons/phpFITFileAnalysis
55
*
66
* Not intended to be demonstration of how to best use Google APIs, but works for me!
77
*
88
* If you find this useful, feel free to drop me a line at Adrian.GitHub@gmail.com
99
*/
10-
require __DIR__ . '/../src/php-FIT-File-Analysis.php';
10+
require __DIR__ . '/../src/phpFITFileAnalysis.php';
1111
require __DIR__ . '/libraries/PolylineEncoder.php'; // https://github.com/dyaaj/polyline-encoder
1212
require __DIR__ . '/libraries/Line_DouglasPeucker.php'; // https://github.com/gregallensworth/PHP-Geometry
1313
try {
@@ -19,7 +19,7 @@
1919
// 'units' => 'metric',
2020
// 'pace' => false
2121
];
22-
$pFFA = new phpFITFileAnalysis(__DIR__ . $file, $options);
22+
$pFFA = new adriangibbons\phpFITFileAnalysis\phpFITFileAnalysis(__DIR__ . $file, $options);
2323
}
2424
catch(Exception $e) {
2525
echo 'caught exception: '.$e->getMessage();
@@ -92,15 +92,15 @@
9292
<html>
9393
<head>
9494
<meta charset="utf-8">
95-
<title>php-FIT-File-Analysis demo</title>
95+
<title>phpFITFileAnalysis demo</title>
9696
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
9797
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
9898
</head>
9999
<body>
100100
<div class="jumbotron">
101101
<div class="container">
102-
<h2><strong>php-FIT-File-Analysis </strong><small>A PHP class for analysing FIT files created by Garmin GPS devices.</small></h2>
103-
<p>This is a demonstration of the phpFITFileAnalysis class available on <a class="btn btn-default btn-lg" href="https://github.com/adriangibbons/php-FIT-File-Analysis" target="_blank" role="button"><i class="fa fa-github"></i> GitHub</a></p>
102+
<h2><strong>phpFITFileAnalysis </strong><small>A PHP class for analysing FIT files created by Garmin GPS devices.</small></h2>
103+
<p>This is a demonstration of the phpFITFileAnalysis class available on <a class="btn btn-default btn-lg" href="https://github.com/adriangibbons/phpFITFileAnalysis" target="_blank" role="button"><i class="fa fa-github"></i> GitHub</a></p>
104104
</div>
105105
</div>
106106
<div class="container">

demo/power-analysis.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
2-
require __DIR__ . '/../src/php-FIT-File-Analysis.php';
2+
/*
3+
* Demonstration of the phpFITFileAnalysis class using Twitter Bootstrap framework
4+
* https://github.com/adriangibbons/phpFITFileAnalysis
5+
*
6+
* If you find this useful, feel free to drop me a line at Adrian.GitHub@gmail.com
7+
*/
8+
require __DIR__ . '/../src/phpFITFileAnalysis.php';
39

410
try {
511
$file = '/fit_files/power-analysis.fit';
@@ -8,7 +14,7 @@
814
// 'fixData' => ['all'],
915
'units' => ['metric']
1016
];
11-
$pFFA = new phpFITFileAnalysis(__DIR__ . $file, $options);
17+
$pFFA = new adriangibbons\phpFITFileAnalysis\phpFITFileAnalysis(__DIR__ . $file, $options);
1218

1319
// Google Time Zone API
1420
$date = new DateTime("1989-12-31", new DateTimeZone("UTC")); // timestamp[s]: seconds since UTC 00:00:00 Dec 31 1989
@@ -39,15 +45,15 @@
3945
<html>
4046
<head>
4147
<meta charset="utf-8">
42-
<title>php-FIT-File-Analysis demo</title>
48+
<title>phpFITFileAnalysis demo</title>
4349
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
4450
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
4551
</head>
4652
<body>
4753
<div class="jumbotron">
4854
<div class="container">
49-
<h2><strong>php-FIT-File-Analysis </strong><small>A PHP class for analysing FIT files created by Garmin GPS devices.</small></h2>
50-
<p>This is a demonstration of the phpFITFileAnalysis class available on <a class="btn btn-default btn-lg" href="https://github.com/adriangibbons/php-FIT-File-Analysis" target="_blank" role="button"><i class="fa fa-github"></i> GitHub</a></p>
55+
<h2><strong>phpFITFileAnalysis </strong><small>A PHP class for analysing FIT files created by Garmin GPS devices.</small></h2>
56+
<p>This is a demonstration of the phpFITFileAnalysis class available on <a class="btn btn-default btn-lg" href="https://github.com/adriangibbons/phpFITFileAnalysis" target="_blank" role="button"><i class="fa fa-github"></i> GitHub</a></p>
5157
</div>
5258
</div>
5359
<div class="container">

demo/swim.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/*
33
* Demonstration of the phpFITFileAnalysis class using Twitter Bootstrap framework
4-
* https://github.com/adriangibbons/php-FIT-File-Analysis
4+
* https://github.com/adriangibbons/phpFITFileAnalysis
55
*
66
* If you find this useful, feel free to drop me a line at Adrian.GitHub@gmail.com
77
*/
8-
require __DIR__ . '/../src/php-FIT-File-Analysis.php';
8+
require __DIR__ . '/../src/phpFITFileAnalysis.php';
99
try {
1010
$file = '/fit_files/swim.fit';
1111

@@ -14,7 +14,7 @@
1414
'units' => 'raw',
1515
// 'pace' => false
1616
];
17-
$pFFA = new phpFITFileAnalysis(__DIR__ . $file, $options);
17+
$pFFA = new adriangibbons\phpFITFileAnalysis\phpFITFileAnalysis(__DIR__ . $file, $options);
1818
}
1919
catch(Exception $e) {
2020
echo 'caught exception: '.$e->getMessage();
@@ -34,15 +34,15 @@
3434
<html>
3535
<head>
3636
<meta charset="utf-8">
37-
<title>php-FIT-File-Analysis demo</title>
37+
<title>phpFITFileAnalysis demo</title>
3838
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
3939
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
4040
</head>
4141
<body>
4242
<div class="jumbotron">
4343
<div class="container">
44-
<h2><strong>php-FIT-File-Analysis </strong><small>A PHP class for analysing FIT files created by Garmin GPS devices.</small></h2>
45-
<p>This is a demonstration of the phpFITFileAnalysis class available on <a class="btn btn-default btn-lg" href="https://github.com/adriangibbons/php-FIT-File-Analysis" target="_blank" role="button"><i class="fa fa-github"></i> GitHub</a></p>
44+
<h2><strong>phpFITFileAnalysis </strong><small>A PHP class for analysing FIT files created by Garmin GPS devices.</small></h2>
45+
<p>This is a demonstration of the phpFITFileAnalysis class available on <a class="btn btn-default btn-lg" href="https://github.com/adriangibbons/phpFITFileAnalysis" target="_blank" role="button"><i class="fa fa-github"></i> GitHub</a></p>
4646
</div>
4747
</div>
4848
<div class="container">
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
2+
namespace adriangibbons\phpFITFileAnalysis;
3+
24
/**
3-
* php-FIT-File-Analysis
5+
* phpFITFileAnalysis
46
* =====================
57
* A PHP class for Analysing FIT files created by Garmin GPS devices.
68
* Adrian Gibbons, 2015
@@ -9,7 +11,7 @@
911
* G Frogley edits, June 2016
1012
* Added code to generate TRIMPexp and hrIF (Intensity Factor) value to measure session if Power is not present
1113
*
12-
* https://github.com/adriangibbons/php-FIT-File-Analysis
14+
* https://github.com/adriangibbons/phpFITFileAnalysis
1315
* http://www.thisisant.com/resources/fit
1416
*/
1517

0 commit comments

Comments
 (0)