ZFTool, a command line to ZF2
ZFTool — the component command line to manage applications written in Zend Framework 2. This tool is still in development. We released an early version, so you can quickly start to use it. In the current version the tool is able to:
the
ZFTool is set through the composer or github. In addition, we have compiled PHAR file. You can download zftool.phar at https://packages.zendframework.com/zftool.phar. If you decide to use zftool.phar, you must add the address to the file in your system PATH variable. In this case, you can perform the zftool.phar in the place where he typed the command.
To install using composer, run the following command in the shell environment:
the
You can also install the component manually using github:
After installation, you can run the file zf.php in the root folder of ZFTool or you can use zftool.phar (if you have installed ZFTool using composer or GitHub, you need to collect zftool.phar run the script, "bin/create-phar").
The new ZF2 project is created with the command:
the
This command will install Zend Skeleton Application specified path.
Imagine that you want to create a new module "Test" in the local ZF2 application, this can be done:
the
You can create a new module in the application pointing to different paths. The path is specified as the last parameter.
the
A list of installed modules in ZF2, you can get this:
the
This command must be run from the root folder of a ZF2 application.
You can read the configuration file (application.config.php) ZF2 application using the following command:
the
The configuration is displayed using print_r
Using ZFTool you can install the library with Zend Framework 2 need version. To install the latest version of ZF on a particular path, use the command:
the
If you want to install a specific version, specify the parameter with a version value. For example, to install version 2.0.4, use
the
Actually, you can just set the version tag in the ZF2 github repository (the Name used for the version is obtained by deleting the string "release" from the tag name; for example, the tag "release-2.0.0" corresponds to the version "2.0.0")
You can compile the zftool.phar by running the command:
the
This command will compile the ZFTool project in the file zftool.phar folders bin.
For more information about ZFTool you can refer to README.md on github.
Article based on information from habrahabr.ru
the
-
the
- to create a ZF2 project, installing a skeleton application (skeleton application); the
- to create a new module inside an existing application; the
- to return a list of installed application modules; the
- return the application configuration file; the
- to install the ZF2 library choosing the desired version;
ZFTool is set through the composer or github. In addition, we have compiled PHAR file. You can download zftool.phar at https://packages.zendframework.com/zftool.phar. If you decide to use zftool.phar, you must add the address to the file in your system PATH variable. In this case, you can perform the zftool.phar in the place where he typed the command.
To install using composer, run the following command in the shell environment:
the
$ composer require zendframework/zftool:dev-master
You can also install the component manually using github:
-
the
- make a clone, using the command "git clone https://github.com/zendframework/ZFTool.git" or download ; the
- extract the contents in "vendor/ZFTool" your ZF2 application; the
- edit your "config/application.config.php" and add it to the array modules "ZFTool".
After installation, you can run the file zf.php in the root folder of ZFTool or you can use zftool.phar (if you have installed ZFTool using composer or GitHub, you need to collect zftool.phar run the script, "bin/create-phar").
create a new ZF2 project
The new ZF2 project is created with the command:
the
$ zf.php create project <path>
// or
$ zftool.phar create project <path>
This command will install Zend Skeleton Application specified path.
creating a new module
Imagine that you want to create a new module "Test" in the local ZF2 application, this can be done:
the
$ zf.php create module Test
// or
$ zftool.phar create module Test
You can create a new module in the application pointing to different paths. The path is specified as the last parameter.
the
$ zf.php create module Test <path>
// or
$ zftool.phar create module Test <path>
retrieve a list of installed modules
A list of installed modules in ZF2, you can get this:
the
$ zf.php modules<path>
// or
$ zftool.phar modules<path>
This command must be run from the root folder of a ZF2 application.
Obtaining the configuration of a ZF2 application
You can read the configuration file (application.config.php) ZF2 application using the following command:
the
$ zf.php config<path>
// or
$ zftool.phar config<path>
The configuration is displayed using print_r
Installing ZF2
Using ZFTool you can install the library with Zend Framework 2 need version. To install the latest version of ZF on a particular path, use the command:
the
$ zf.php install zf <path>
// or
$ zftool.phar install zf <path>
If you want to install a specific version, specify the parameter with a version value. For example, to install version 2.0.4, use
the
$ zf.php install zf <path> 2.0.4
// or
$ zftool.phar install zf <path> 2.0.4
Actually, you can just set the version tag in the ZF2 github repository (the Name used for the version is obtained by deleting the string "release" from the tag name; for example, the tag "release-2.0.0" corresponds to the version "2.0.0")
Build zftool.phar
You can compile the zftool.phar by running the command:
the
$ bin/create-phar
This command will compile the ZFTool project in the file zftool.phar folders bin.
For more information about ZFTool you can refer to README.md on github.
Комментарии
Отправить комментарий