Getting Started
Server Requirements
Before using Shieldon Firewall on your Web application you must meet the basic server requirements below:
- PHP >= 7.1.0
- Ctype PHP Extension
- JSON PHP Extension
- PDO PHP Extension (Required only if you would like to use MySQL, SQLite driver.)
- Redis PHP Extension (Required only if you would like to use Redis driver.)
Installation
Use PHP Composer:
composer require shieldon/shieldon
Or, download it and include the Shieldon autoloader.
require 'Shieldon/autoload.php';
Implementing
Popular Frameworks
Here are the guides of integrating with the popular PHP frameworks.
Other Frameworks
Implementing Shieldon on other framework is as easy as well.
// Notice that this directory must be writable.
$writable = __DIR__ . '/../shieldon';
// Initialize Fireall instane.
$firewall = new \Shieldon\Firewall($writable);
$firewall->run();
Place this code section in a beginning section of your project.
The beginning section might be the index.php
(1), Middleware
or Parent Controller
.
(1) index.php is the entry point for all requests entering your application in most frameworks such as Laravel, CodeIgniter, Slim, WordPress and more.
// Get Firewall instance from Shieldon Container.
$firewall = \Shieldon\Container::get('firewall');
// Get into the Firewall Panel.
$controlPanel = new \Shieldon\FirewallPanel($firewall);
$controlPanel->entry();
Put the code on the Controller and the URL that only you know. Although it has a basic login protection.