websafe/lib-view-helper-git-repository 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

websafe/lib-view-helper-git-repository

Composer 安装命令:

composer require websafe/lib-view-helper-git-repository

包简介

A library of ZF2 View Helpers for retrieving information about current application's local Git repository.

README 文档

README

A library of ZF2 - View Helpers for retrieving information about current application's local Git repository.

Quickstart

Add this package to your Composer based application

Add this package to composer.json and install in vendor/ by running:

composer require \
    websafe/lib-view-helper-git-repository:0.1.*

or

php vendor/bin/composer.phar require \
    websafe/lib-view-helper-git-repository:0.1.*

Enable provided view helpers in your ZF2 application

To enable the provided view helpers in your application - copy the file websafe.view.helper.git.repository.global.php.dist found in vendor/websafe/lib-view-helper-git-repository/config/, to config/autoload/websafe.view.helper.git.repository.global.php.

The copied file declares the required invokables for the provided view helpers in your ZF2 application.

return array(
    'view_helpers' => array(
        'invokables' => array(
            'gitRepoCurrentBranch'
                => 'Websafe\View\Helper\Git\Repository\CurrentBranch',
            'gitRepoDescription'
                => 'Websafe\View\Helper\Git\Repository\Description',
        ),
    ),
);

Use provided view helpers in your view scripts

Websafe\View\Helper\Git\Repository\CurrentBranch

<h1><?php echo $this->gitRepoCurrentBranch();?></h1>

Result:

<h1>master</h1>

Websafe\View\Helper\Git\Repository\Description

<p><?php echo $this->gitRepoDescription();?><p>

Result:

<p>Unnamed repository; edit this file 'description' to name the repository.</p>

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固