diff --git a/prepseance4/composer.json b/prepseance4/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..c9978f9df5b76d66f67b6c44afbb26789ebc66a9 --- /dev/null +++ b/prepseance4/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "fzaninotto/faker": "^1.9" + } +} diff --git a/prepseance4/composer.lock b/prepseance4/composer.lock new file mode 100644 index 0000000000000000000000000000000000000000..7b2498c6ccf477d0d3315531b44b092090c7ea68 --- /dev/null +++ b/prepseance4/composer.lock @@ -0,0 +1,68 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "4c10bab350777d80b6ec93b084fe5276", + "packages": [ + { + "name": "fzaninotto/faker", + "version": "v1.9.1", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f", + "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "ext-intl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7", + "squizlabs/php_codesniffer": "^2.9.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "time": "2019-12-12T13:22:17+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/prepseance4/prep.php b/prepseance4/prep.php new file mode 100644 index 0000000000000000000000000000000000000000..16a4b27dd4b4607349e24c557cdc9117e5ceb4ad --- /dev/null +++ b/prepseance4/prep.php @@ -0,0 +1,9 @@ +<?php + +require 'vendor/autoload.php'; +$faker = Faker\Factory::create(); + +echo 'adresse à l\'américaine: '.$faker->address; + +$date = new DateTime($faker->time); +echo '<br> format date :'.$date->format('d-m-Y H:i:s'); diff --git a/prepseance4/prep_Question.txt b/prepseance4/prep_Question.txt new file mode 100644 index 0000000000000000000000000000000000000000..a58bdd5aedf8ea1a33eb1b9e9383cda1ec0c3d2b --- /dev/null +++ b/prepseance4/prep_Question.txt @@ -0,0 +1 @@ +1) Pour installer faker, on utilise composer, avec la commande composer require fzaninotto/faker on peut aussi le mettre dans un fichier JSON.