2017 © Pedro Peláez
 

symfony-bundle loremipsum-bundle

Generate paragraphs, sentences and words for your development.

image

apoutchika/loremipsum-bundle

Generate paragraphs, sentences and words for your development.

  • Sunday, October 5, 2014
  • by apoutchika
  • Repository
  • 1 Watchers
  • 12 Stars
  • 43,046 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 5 % Grown

The README.md

LoremIpsumBundle

Generate paragraphs, sentences and words for your development, (*1)

Installation

Download LoremIpsumBundle using composer

Add LoremIpsumBundle in your composer.json, (*2)

{
    "require": {
        "apoutchika/loremipsum-bundle": "dev-master"
    }
}

Enable the bundle on your kernel

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array (
        //...
        new Apoutchika\LoremIpsumBundle\ApoutchikaLoremIpsumBundle(),
    );
}

Use it on controller :

<?php
$loremIpsum = $this->get('apoutchika.lorem_ipsum');

// $paragraphs1 content is aleatory number of paragraphs
$paragraphs = $loremIpsum->getParagraphs();

// $paragraphs2 content is exactly 2 paragraphs
$paragraphs2 = $loremIpsum->getParagraphs(2);

// $paragraphs3 content 2, 3, 4, 5, 6, 7 or 8 paragraphs
$paragraphs3 = $loremIpsum->getParagraphs(2, 8);


// Or with sentences :
$sentences = $loremIpsum->getSentences(1, 3); // 1, 2 or 3 sentences


// Or with words :
$words = $loremIpsum->getWords (2); // return only two words

Set you'r lorem ipsum value

<?php

// for the customers database :

$liName = $this->get('apoutchika.lorem_ipsum');
$liName->setLoremIpsum ('Dupont Dupond Martin Durand Tessier'); // ....

$liFirstName = $this->get('apoutchika.lorem_ipsum');
$liFirstName->setLoremIpsum ('Marie Jean Michel Pierre Philippe'); //...

$user = new User;
$user->setName ($liName->getWords(1));
$user->setFirstName ($liFirstName->getWords(1));
//...

Use it on Twig :

For generate 2 paragraphs :, (*3)

{{ paragraphs (2) }}

For generate 2, 3, 4 or 5 paragraphs :, (*4)

{{ paragraphs (2, 5) }}

For sentences and words:, (*5)

{{ sentences () }}
{{ words () }}

Configuration Reference

see Resources/doc/configuration_reference.md, (*6)

Licence

See Resources/meta/LICENSE., (*7)

The Versions

05/10 2014

dev-master

9999999-dev

Generate paragraphs, sentences and words for your development.

  Sources   Download

MIT

The Requires

 

by Julien Philippon

fixtures data lorem ipsum

05/10 2014

v1.0.3

1.0.3.0

Generate paragraphs, sentences and words for your development.

  Sources   Download

MIT

The Requires

 

by Julien Philippon

fixtures data lorem ipsum

04/10 2014

v1.0.2

1.0.2.0

Generate paragraphs, sentences and words for your development.

  Sources   Download

MIT

The Requires

 

by Julien Philippon

fixtures data lorem ipsum

04/10 2014

v1.0.1

1.0.1.0

Generate paragraphs, sentences and words for your development.

  Sources   Download

MIT

The Requires

 

by Julien Philippon

fixtures data lorem ipsum

02/01 2014

v1.0.0

1.0.0.0

Generate paragraphs, sentences and words for your development.

  Sources   Download

MIT

The Requires

 

by Julien Philippon

fixtures data lorem ipsum