-
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made it PSR2 compatible, added composer, made it all object oriented,…
… and added caching hooks. - BC-Breaks!
- Loading branch information
Showing
15 changed files
with
624 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
use cmfcmf\OpenWeatherMap; | ||
|
||
require('cmfcmf/OpenWeatherMap.php'); | ||
|
||
// Language of data (try your own language here!): | ||
$lang = 'de'; | ||
|
||
// Units (can be 'metric' or 'imperial' [default]): | ||
$units = 'metric'; | ||
|
||
// Example 1: Use your own cache implementation. See the example_cache file. | ||
$owm = new OpenWeatherMap('examplecache', 100); | ||
|
||
$weather = $owm->getWeather('Berlin', $units, $lang); | ||
echo "EXAMPLE 1<hr />\n\n\n"; | ||
echo $weather->temperature; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.