kitpages/util-bundle
Composer 安装命令:
composer require kitpages/util-bundle
包简介
Small common tools used for Kitpages bundles
关键字:
README 文档
README
Only little methods for common problems :
- create directories recursively
- send a file to the browser for a download, sending an image or so what
- ...
Actually I believe nobody will be interested in including this Bundle in it's project. This bundle is globally deprecated.
It is used mainly by the KitpagesCmsBundle.
WARNING, works only on unix/linux systems.
Installation
If you are using DEPS :
[KitpagesUtilBundle]
git=https://github.com/kitpages/KitpagesUtilBundle.git
target=/bundles/Kitpages/UtilBundle
Add Kitpages namespace to your autoloader :
<?php // app/autoload.php $loader->registerNamespaces(array( // ... 'Kitpages' => __DIR__.'/../vendor/bundles', ));
Enable the bundle in your kernel :
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Kitpages\UtilBundle\KitpagesUtilBundle(), ); }
Then you can use the service which is named kitpages.util
User's guide
Let's say you are in a controller
<?php $util = $this->get('kitpages.util'); // create recursively a directory $util->mkdirr("/tmp/test/foo/bar"); // delete recursively the test directory $util->rmdirr("/tmp/test"); // send a jpg image to the browser with a 3600 expire time $util->getFile("/tmp/toto.jpg", 3600)
统计信息
- 总下载量: 37.19k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: BSD
- 更新时间: 2012-05-24