Download the PHP package davidepastore/paris-model-generator without Composer
On this page you can find all versions of the php package davidepastore/paris-model-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download davidepastore/paris-model-generator
More information about davidepastore/paris-model-generator
Files in davidepastore/paris-model-generator
Package paris-model-generator
Short Description Paris model generator from database
License MIT
Informations about the package paris-model-generator
paris-model-generator
Paris model generator from database.
Installation
Using command line
Editing composer.json
Require this generator:
Setup
You have to setup your application to be sure that the generated classes will be in the right place and with the right
namespace.
paris-model-generator uses composer.json
extra
property to put its configuration:
namespace
It is the namespace in which all classes will be generated. It will be also used to create the folder structure to be PSR-4 compliant.
destination-folder
It is the folder in which all files (and folder structure) will be generated.
Usage
Be sure to be in the base directory of the project (where you have your composer.json
file) and run:
The generator will ask you information about the database, to be sure to connect to it and to retrieve the list of tables. The list of the supported drivers could be found here.
force option
The --force
option will not ask you confirmation to overwrite existing files.
Include generated files
You have two chances:
- psr-4 autoload;
- classmap autoload.
PSR-4 autoload
If your namespace property is set you can use psr-4
composer autoload:
Don't forget to set Model::$auto_prefix_models
to be sure that your model is recognized properly when you use
Model::factory
method:
Classmap autoload
If your namespace property is empty or not set, you have to autoload using:
Issues
If you have issues, just open one here.
All versions of paris-model-generator with dependencies
symfony/console Version ~2.6
zendframework/zend-code Version ~2.3