gianarb/corley-version
最新稳定版本:0.0.3
Composer 安装命令:
composer require gianarb/corley-version
包简介
Manage version and bump in your ZF2 application
README 文档
README
Manage version bump in your Zend Framework Application
Console Command
php index.php version-show
Return current version
php index.php version-bump 0.0.1
Bump version 0.0.1
- Write or edit VERSION file
- Add version node in your global.php configuration file
View Helper
You can use $this->version() to append the version number in your static resources
<html>
...
<?php echo $this->headScript()
->prependFile($this->basePath("/js/script.js?v={$this->vesion()}"))
->prependFile($this->basePath('/js/bootstrap.min.js'))
->prependFile($this->basePath('/js/jquery.min.js'))
; ?>
...
</html>
Configuration
<?php return array( 'corley-version' => array( 'version-file-path' => ".", 'config-path' => "./config/autoload/global.php", ) );
version-file-path is path of VERSION file
Write 'version' node into config-path
Event Driven
version-bump <version> trigger version.bump event.
This module attach only one listener
/** @var \Zend\EventManager\EventManager $em */ $em->getSharedManager()->attach('version' ,'version.bump', function($e){ $e->getTarget()->bump($e->getParams()['version']); }, 100);
统计信息
- 总下载量: 63
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-11-11