ocramius/ocra-lorem-module

此包已被弃用且不再维护。未建议替代包。

为 ZendFramework 2 应用程序提供 Lorem Generator 工具的模块

0.1.1 2012-09-05 20:52 UTC

This package is auto-updated.

Last update: 2022-02-01 12:21:08 UTC


README

安装

  1. "ocramius/ocra-lorem-module": "dev-master" 添加到您的 composer.json
  2. 运行 php composer.phar install
  3. 在您的 config/application.config.php 中启用模块,将 OcraLoremModule 添加到 modules

使用方法

在您的视图脚本中,只需写入以下内容

<?php
echo $this->lorem();
// 10000 lorem!
echo $this->lorem(10000);

LoremPixel 也受支持

<?php
echo $this->loremPixel();

将生成类似的内容

<img src="http://lorempixel.com/640/480/" alt="Lorem Pixel"/>
<?php
echo $this->loremPixel(300, 200, false, 'sports', 'Dummy Text', 2);

将生成类似的内容

Dummy Text