Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/vendor/emanueleminotto/faker-service-provider
Julio Montoya 2cb00363ff Adding facker lib 12 years ago
..
src/EmanueleMinotto Adding facker lib 12 years ago
README.md Adding facker lib 12 years ago
composer.json Adding facker lib 12 years ago

README.md

FakerServiceProvider

A Faker service provider for Silex.

Install

Install Silex using Composer.

Install the FakerServiceProvider adding emanueleminotto/faker-service-provider to your composer.json or from CLI:

$ php composer.phar require emanueleminotto/faker-service-provider

Usage

Initialize it using register, it allows only the locale option

<?php

use EmanueleMinotto\FakerServiceProvider;

$app->register(new FakerServiceProvider, array(
    'locale' => 'it_IT' // default: en_US
));

From PHP

<?php

$Application -> get('/hello', function () use ($Application) {
    return 'Hello ' . $Application['faker'] -> name;
});

From Twig

<!DOCTYPE html>
<html>
    <body>
        <p>Hello {{ app.faker.name }}!</p>
    </body>
</html>