承接 joseki/file-template 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

joseki/file-template

最新稳定版本:v0.2.5

Composer 安装命令:

composer require joseki/file-template

包简介

PhpStorm FileTemplate generator for Nette Framework application using Symfony/Console.

README 文档

README

Build Status Latest Stable Version

Requirements

Joseki/FileTemplate requires PHP 5.4 or higher.

Installation

The best way to install Joseki/FileTemplate is using Composer:

$ composer require joseki/file-template

Register compiler extension in your config.neon:

extensions:
  FileTemplate: Joseki\FileTemplate\DI\FileTemplateExtension

Example

Add the following to your config.neon:

extensions:
  FileTemplate: Joseki\FileTemplate\DI\FileTemplateExtension

FileTemplate:
  # root dir for new files
  rootDir: '%appDir%' # [OPTIONAL], %appDir% is default

  # list of file templates groups
  commands:
    example1: # group name used in command line
      variables: ['CONTROL', 'NAMESPACE']
      templates:
        CONTROL_FILE: '%appDir%/templates/control.txt'
        FACTORY_FILE: '%appDir%/templates/factory.txt'
        TEMPLATE_FILE: '%appDir%/templates/template.txt'
      defaults: # [OPTIONAL] default values for variables
        CONTROL_FILE: '${CONTROL}.php'
        FACTORY_FILE: '${CONTROL}Factory.php'
        TEMPLATE_FILE: template.latte

Running a console command

app/console joseki:file-template COMMAND [--dir=RELATIVE_DIRECTORY]

for example:

app/console joseki:file-template example1

Suppose that variables ${CONTROL} = Hello and ${NAMESPACE} = Foo, then the previous command will create these files:

  • %appDir%/Foo/Hello.php
  • %appDir%/Foo/HelloFactory.php
  • %appDir%/Foo/template.latte

and when a directory is specified:

app/console joseki:file-template example1 --dir=MyApplication/Auth

...these files will be created:

  • %appDir%/MyApplication/Auth/Hello.php
  • %appDir%/MyApplication/Auth/HelloFactory.php
  • %appDir%/MyApplication/Auth/template.latte

NOTE: you will be prompted to define your file template variables

NOTE: this extension should be compatible with Joseki/Console and Kdyby/Console.

统计信息

  • 总下载量: 1.29k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-01