A weather module for the anax framework.

v1.1.2 2018-11-26 19:28 UTC

This package is auto-updated.

Last update: 2021-01-27 01:22:25 UTC


Latest Stable Version License

Build Status Build Status Code Intelligence Status Scrutinizer Code Quality

Codacy Badge Maintainability Code Coverage

Anax weather module implementing a weather application.

This Weather module can be used to see the weeks weather and/or the weather for the past month. Use this together with an Anax installation.

This module has a graphical part in witch the user searches for a given location and resives the data of the weeks weather and the past 30 days.

It also provides a REST api with HTTP method GET. The route takes a location as an argument and returns a JSON response with the same and more details as the graphical interface. See more in View/explainJson.php.

Install and setup Anax

First install your own version of Anax.

Install the weather app as part of Anax

Install using composer and then integrate the module with your Anax installation.

Install with composer

We install the Weather app as a module from Packagist.

composer require mabn17/weather

Configuration files for weather

We need to copy the configuration files for the weather module.

rsync -av vendor/mabn17/weather/config/keys.php config/

Note: Remember to change the value to your own DarkSky API key.

Views & Documentation

We need to copy the API documentation and the weather module views.

rsync -av vendor/mabn17/weather/view/weather view/anax/v2/

If you would like to change the documentation to markdown then create a new file in anax/content/. The route will have the same name as your .md file has.

Controllers and Models

Move the files in vendor/mabn17/weather/src/Controller/ into src/Controller/ then change $page->add(/view/weather/name) to the commented line in both controller classes.

Move vendor/mabn17/weather/src/Weather folder into the src/ folder.

rsync -av vendor/mabn17/weather/src/Controller/ src/Controller/
rsync -av vendor/mabn17/weather/src/Weather src/

Router files

You need to include the router file in your router configuration anax/config/router/. There is a sample you can use in vendor/mabn17/config/router/902_vader.php.

rsync -av vendor/mabn17/anax/weather/config/router/902_vader.php config/router/

DI Services

You need to add the configuration file for di.

You need to add the configuration for the di services anax/config/di/. There is a sample you can use in vendor/mabn17config/di/weather.php.

rsync -av vendor/mabn17/weather/config/di/weather.php config/di/


..: Copyright (c) 2018 - 2019 Martin Borg (