No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitignore
README.md
composer.json
config.php
index.php
phpunit.xml

README.md

Installation

  • Install Composer as recommended here
  • Clone this repository from GitHUB
  • Run composer install command in root folder

How to start application

  • Run command php index.php in root folder of the cloned repo
  • See the "detail" of the randomly selected product with ID between 1 and 10

How to test application

  • Install PHPUnit as recommended here
  • Run command phpunit in root folder of the cloned repo
  • See the report from PHPUnit

How to change app behavior

  • Database Driver
    • Constant DRIVER_TYPE defined in file config.php determines which database will e used to get data
      • MySQL:
      • ElasticSearch:
  • Cache Storage
    • Constant CACHE_STORAGE_TYPE defined in file config.php determines which storage type will be used. At this moment only two options are allowed File and Memcached. Please keep in mind that the value is key-sensitive.
  • Product Statistics
    • Constant PRODUCT_STATS_DRIVER_TYPE defined in file config.php determines which driver will be used
      • File: very simple file-storage implementation
      • MoreRobust: just and blank class for further development when decided where to store statistics data