Code Monkey home page Code Monkey logo

alltricks's Introduction

Explications

Le sujet du test se trouve dans instructions.php
Le point d'entrée du programme est "index.php"
On peut ajouter autant de "sources" à l'articleAgregator que l'on souhaite

L'idée est la suivante:

 La classe Article représente un objet Article tel que l'on souhaite qu'il soit retourné.
 Chaque classe "source": Dans notre cas RssSource.php et DatabaseSource.php doivent implémenter
 l'interface ArticleSourceInterface.
 Les classes sources doivent implémenter la méthode retrieve() chargée de récupérer les articles
 La classe ArticleAgregator est chargée d'aggréger toutes les sources avec la méthode addSource.
 Puis la méthode retrieveArticles permet de récupérer tout les articles de toutes les sources ajoutées précédemment

Une possibilité pour tester le projet en utilisant docker:

Database mysql 8

docker run --name alltricks-mysql --network mysql -e MYSQL_ROOT_PASSWORD=root -d mysql:8.0

Créer la database

docker exec -i  alltricks-mysql mysql -uroot -proot < createDatabase.sql

Remplir la database

docker exec -i  alltricks-mysql mysql -uroot -proot alltricks_test < ./database.sql

Il faut installer mysqli d'apres le dockerfile

docker build -t php8-mysqli .

Lancer le programme sur index.php

docker run -it --network mysql -v "$PWD":/usr/src/app -w /usr/src/app php8-mysqli php index.php

alltricks's People

Contributors

cmtwil avatar

Watchers

James Cloos avatar Christophe Meunier avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.