ocramius / ocra-lorem-module
此包已被弃用且不再维护。未建议替代包。
为 ZendFramework 2 应用程序提供 Lorem Generator 工具的模块
0.1.1
2012-09-05 20:52 UTC
Requires
- php: >=5.3.3
- zendframework/zendframework: 2.*
This package is auto-updated.
Last update: 2022-02-01 12:21:08 UTC
README
安装
- 将
"ocramius/ocra-lorem-module": "dev-master"
添加到您的composer.json
- 运行
php composer.phar install
- 在您的
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);
将生成类似的内容