pedro151/orm-generator 问题修复 & 功能扩展

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

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

pedro151/orm-generator

Composer 安装命令:

composer require pedro151/orm-generator

包简介

orm-generator maps the entire database and then creates the DAO (Data Access Object) and ORM (Object-relational mapping) of the entire database to facilitate the development. uses various types of databases like Postgres and Mysql and various types of ORM framework.

README 文档

README

Travis build status Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License

ORM Generator maps the entire database and then creates the DAO (Data Access Object) and ORM (Object-relational mapping) of the entire database to facilitate the development.

uses various types of databases like Postgres and Mysql and various types of ORM framework.

Install

install via composer or download the file phar.

#####Install via composer:

$ composer require pedro151/orm-generator`
$ composer install`

#####Download phar:

Creating config file

use the following command to create the configuration file needed to get started:

$ php orm-generate.phar --init

OR

$ php generator.php --init

Configuration

setting is in configs/config.ini if you do not use frameworks adapter, if you use the adapter configuration comes straight from the framework as Zend framework and others.

PHP Code Generation

Open the prompt in the directory orm-generator and write:

$ php generate.php

Or Open the prompt in the directory bin and write:

$ php orm-generate.phar

Configurations optionals

Command description
--init Creates the necessary configuration file to start using the ORM Generator.
--name-ini reference to another .ini file configuration (relative path).
--config-env ORM Generator configuration environment.
--framework name framework used, which has the contents of the database configurations and framework template.
--driver database driver name (Ex.: pgsql, mysql).
--database database name.
--schema database schema name (one or more than one).
--tables table name (parameter can be used more then once).
--clean-trash delete all files that do not belong to your Database due.
--status show status of implementation carried out after completing the process.
--version shows the version of ORM Generator.
--help help command explaining all the options and manner of use.
--path specify where to create the files (default is current directory).
--update Upgrade to latest version.
--download download the reported version (ex. --download=1.5.0).
example:

in prompt

$ php generate.php --framework=zf1 --database=foo --driver=pgsql --status

Support Database

  • Postgres
  • Mysql
  • Dblib
  • Mssql
  • Sqlserver

Framework Class Generator ORM

- Classes Overwrite: Classes should not be personalized, they will be rewritten every generation of classes.

Frameworks Config Name Version Generate Classes Classes Overwrite
Zend Framework zf1.12 1.12 DbTable, Entity, Model DbTable, Entity
Phalcon phalcon 3.0 Entity, Model, Peer Entity

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固