Giter VIP home page Giter VIP logo

laminas-gen's Introduction

LaminasGen

Do you know Symfony's generating commands ? It's the same, for Laminas Framework :)

install it

Just use composer require thomasleconte/laminas-gen !

Config it

You need to provide this script in your composer.json file for make this lib able to be used.

    "scripts": {
        ...
        "laminas-gen": [
        "LaminasGen\\Handler::handle"
        ],
        ...
    }

Use it

Module generation

composer laminas-gen module <yourModuleName> (By default, this will generate an associated controller for be able to use your module fast as possible. But you can disable it using an optional argument : without-extra. So you can use command like that composer laminas-gen module <yourModuleName> without-extra)

Controller generation

composer laminas-gen controller <yourControllerName> <existingModuleName> (This will generate all associated CRUD views for again, use your controller fast as possible. And you cant disable it ... For the moment ๐Ÿฅฑ)

Entity generation

composer laminas-gen entity <yourEntityName> <yourModuleName>. You will have to type each properties of your entity. yourEntityName.php and yourEntityNameTable.php files will be generated, with default getters and setters.

Undo

composer laminas-gen undo (This will undo all last creations or modifications done by LaminasGen)
composer laminas-gen undo-all (This will undo all creations or modification done since you use it)

Details

When you will have installed this package, you will be able to edit templates in src/Generators/templates/ folder. But keep in mind that you will have limited possibilites, due to number of variables understood by my script. So you can edit the script for make my script understanding your variables :)

Debug it

1 - Run autoload command before work on project : composer dump-autoload -o 2 - Good luck dude.

Reminder

If you want to use package during debug, add these lines on your test project :

    "repositories": [
        {
            "type": "path",
            "url": "absolute/or/relative/path/to/laminas-gen/folder"
        }
    ]

Then, just install it with : composer require thomasleconte/laminas-gen @dev. Take care about @dev, composer uses this to pickup the source code and symlink it to your new package.

laminas-gen's People

Contributors

dependabot[bot] avatar thomasleconte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

laminas-gen's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.