Download the PHP package helsingborg-stad/api-alarm-manager without Composer

On this page you can find all versions of the php package helsingborg-stad/api-alarm-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package api-alarm-manager

Api Alarm Manager

Creates WordPress Rest API endpoints for contal alarms and fire danger levels.

Alarms

Alarms are imported from a remote FTP/SFTP server. The alarms are then stored in the WordPress database and can be fetched from the WordPress Rest API. After the alarms have been imported, they are moved to an archive folder on the remote server. For the alarms to be archived on the remote server, the const API_ALARM_MANAGER_ARCHIVE_ALARMS_ON_REMOTE must be set to true. Otherwise the alarm files on the remote server will note be altered.

Fire danger levels

Fire danger levels are posts that are created in WordPress. The posts are then fetched from the WordPress Rest API.

Constants

define('API_ALARM_MANAGER_ARCHIVE_ALARMS_ON_REMOTE', true); - REQUIRED to archive alarms on remote server.

Devcontainer

This project uses a devcontainer for development. This means that you can use VS Code to develop the project. To use the devcontainer, you need to install the Remote - Containers extension for VS Code. When you have installed the extension, you can open the project in a container by clicking the green button in the bottom left corner of VS Code and select "Remote-Containers: Reopen in Container".

Devcontainer ftp/sftp services

To make it easier to test this plugins functionality on your local machine you can use the ftp/sftp services that are installed in the devcontainer. The services and their credentials are listed in the ./devcontainer/docker-compose.yml file.

Use the following details to set up a connection to either ftp or sftp from the WordPress admin panel:

SFTP

FTP

Devcontainer ftp/sftp test files

A number of files for testing locally are available in the ./devcontainer/remoteFiles. To prepare or reset test files run the shell script ./.vscode/tasks/reset-dummy-files from the terminal:

PHP Tests

Municipio uses PHPUnit for unit testing. For mocking and stubbing we use WP_Mock. This means that you can use WP_Mock, Mockery(since this is a wrapper for WP_Mock) and PHPUnit_MockObject for mocking and stubbing.

PHPUnit Tests file structure

All tests are stored in the tests/phpunit/tests folder. The file structure should mirror the file structure of the theme. The file name should be the same as the file you want to test. For example, if you want to test the file src/Controller/Base.php you should create the file tests/phpunit/tests/Controller/Base.php. To avoid having too large test files, you can instead create a folder with the same name as the file you want to test and put the test files inside. Please note that for separating files by which class function you are testing, you should name the file e.g. Base.functionName.php.

Running PHPUnit tests

Run composer test in the terminal.

Running PHPUnit tests with code coverage

Run composer test:coverage in the terminal. This will generate a code coverage report in the tests/phpunit/.coverage folder.


All versions of api-alarm-manager with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
helsingborg-stad/acf-export-manager Version ^1.0.12
helsingborg-stad/coordinate-transformation-library Version ^1.0.1
phpseclib/phpseclib Version ^3.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package helsingborg-stad/api-alarm-manager contains the following files

Loading the files please wait ....