2017 © Pedro Peláez

eliasis-plugin request

Save HTTP request information to the database.



Save HTTP request information to the database.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown


HTTP Request Logger · Eliasis PHP Framework plugin

Packagist Downloads License Codacy Badge Build Status PSR2 PSR4 codecov, (*1)

Versión en español, (*2)

Save HTTP request information to the database., (*3)


This plugin is supported by PHP versions 5.6 or higher and is compatible with HHVM versions 3.0 or higher., (*4)


The preferred way to install this extension is through Composer., (*5)

To install HTTP Request Logger, simply:, (*6)

$ composer require eliasis-framework/http-request-logger

The previous command will only install the necessary files, if you prefer to download the entire source code you can use:, (*7)

$ composer require eliasis-framework/http-request-logger --prefer-source

You can also clone the complete repository with Git:, (*8)

$ git clone https://github.com/eliasis-framework/http-request-logger.git


To use this plugin, your Eliasis application must use the PHP-Database library and add the following to the application configuration files:, (*9)

 * eliasis-app/config/complements.php
return [

    'plugin' => [

        'http-request-logger' => [

            'db-id' => 'app',
            'db-prefix' => 'test_',
            'db-charset' => 'utf8',
            'db-engine' => 'innodb'

This will create the test_request table and automatically save all HTTP requests., (*10)

The table structure created is as follows:, (*11)

Columns Data type Example
request_id INT(9) 1
request_ip VARCHAR(45)
request_uri TEXT /sample-app/
request_protocol VARCHAR(100) HTTP/1.1
request_method VARCHAR(15) GET
request_referer VARCHAR(255) http://www.google.es/
request_user_agent VARCHAR(255) Mozilla/5.0 (...)
request_http_state INT(3) 200
request_load_time FLOAT 0.008
created TIMESTAMP 2018-02-28 08:26:43


To run tests you just need composer and to execute the following:, (*12)

$ git clone https://github.com/eliasis-framework/http-request-logger.git

$ cd http-request-logger

$ composer install

Run unit tests with PHPUnit:, (*13)

$ composer phpunit

Run PSR2 code standard tests with PHPCS:, (*14)

$ composer phpcs

Run PHP Mess Detector tests to detect inconsistencies in code style:, (*15)

$ composer phpmd

Run all previous tests:, (*16)

$ composer tests


  • [ ] Run PHPUnit on Travis CI.
  • [ ] Add getter methods.
  • [ ] Add new feature.
  • [ ] Improve tests.
  • [ ] Improve documentation.
  • [ ] Refactor code for disabled code style rules. See phpmd.xml and .php_cs.dist.


If you would like to help, please take a look at the list of issues or the To Do checklist., (*17)

Pull requests, (*18)

  • Fork and clone.
  • Run the command composer install to install the dependencies. This will also install the dev dependencies.
  • Run the command composer fix to excute code standard fixers.
  • Run the tests.
  • Create a branch, commit, push and send me a pull request.


This project is licensed under MIT license. See the LICENSE file for more info., (*19)

2017 - 2018 Josantonius, josantonius.com, (*20)

If you find it useful, let me know :wink:, (*21)

You can contact me on Twitter or through my email., (*22)

The Versions