PHP code example of amps / lorem-ipsum-bundle
1. Go to this page and download the library: Download amps/lorem-ipsum-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
amps / lorem-ipsum-bundle example snippets
// src/Controller/SomeController.php
use Amps\LoremIpsumBundle\KnpUIpsum;
// ...
class SomeController
{
public function index(KnpUIpsum $knpUIpsum)
{
$fakeText = $knpUIpsum->getParagraphs();
// ...
}
}
namespace App\Service;
use Amps\LoremIpsumBundle\WordProviderInterface;
class CustomWordProvider implements WordProviderInterface
{
//
public function getWordList(): array
{
$words[] = 'beach';
$words[] = $title;
$words[] = $town;
return $words;
}
}