2017 © Pedro Peláez
 

symfony-bundle code-generator-bundle

Code Generation based on twig

image

mjr/code-generator-bundle

Code Generation based on twig

  • Saturday, June 3, 2017
  • by cwesterfield
  • Repository
  • 1 Watchers
  • 1 Stars
  • 84 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 4 Open issues
  • 36 Versions
  • 0 % Grown

The README.md

MJR.ONE Code Generator Bundle

This Bundle contains an Code Generator to rapidly Develope using Symfony Framework., (*1)

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*2)

.. code-block:: bash, (*3)

$ composer require mjr/code-generator-bundle "1.*"

This command requires you to have Composer installed globally, as explained in the installation chapter <https://getcomposer.org/doc/00-intro.md>_ of the Composer documentation., (*4)

Step 2: Enable the Bundle

Then, enable the bundle by adding the following line in the app/AppKernel.php file of your project:, (*5)

.. code-block:: php, (*6)

<?php
// app/AppKernel.php
use MjrOne\CodeGeneratorBundle\MjrOneCodeGeneratorBundle;

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new MjrOneCodeGeneratorBundle(),
        );

        // ...
    }
}

Step 3: Update Configuration

You might need to update/modify the Configuration of the Bundle. It is optimized twords Symfony. If you have a different Layout, okease check the Bundle Configuration file!, (*7)

Supported Code Generators

Service

This Code Generator helps to create Simple Services with Automated Dependency Injection (both __constructor based as well as setter based). Support has been added for Controller Services (All Required options are set) All added Functions are put inside of a TraitServiceXX trait and added to Service Class. In case of an Controller, a Route Annotation is also added **This is fully configurable over an annotation.**, (*8)

Mutator

Adds Getters & Setters as well as Methods to check if contains either a Value at all or checks on Array Value(array + array collection) [has]. For Array Collections and arrays the methods addXX, removeXX, countXX are also added. This is fully configurable over an annotation., (*9)

Entity

One Time Code Generation. Adds Repository Class if not exists This is fully configurable over an annotation., (*10)

Repository

adds some base functions to your repository. This is fully configurable over an annotation., (*11)

Commands

Generate Code

./bin/console mjr:generateCode --help  ✓  206  00:28:28 Usage: mjr:generateCode [options] [--] , (*12)

Arguments: file File to Generator Code For, (*13)

Options: -a, --all Update all Files in Bundle, -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question -e, --env=ENV The environment name [default: "prod"] --no-debug Switches off debug mode -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug, (*14)

Help: Generate MJRONE Bundle Codes, (*15)

This is the Main Code Generator. If you add the flag -a or --all file needs to be the path to a bundle!, (*16)

Update Routing Files

./bin/console mjr:generateRouting --help  ✓  208  00:34:16 Usage: mjr:generateRouting [], (*17)

Arguments: cleanup remove Not Found Options, (*18)

Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question -e, --env=ENV The environment name [default: "production"] --no-debug Switches off debug mode -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug, (*19)

Help: Generates a bundle Routing, (*20)

if the argument cleanup is added, the generator starts with an empty configuration file!, (*21)

Bundle Generator

Controller Generator

Entity Generator

The Versions

17/04 2017
26/03 2017

1.2.0

1.2.0.0 https://www.mjr.one

Code Generation based on twig

  Sources   Download

LGPL-3.0

The Requires

 

by Christopher Westerfield

twig code bundle symfony generation

24/03 2017

1.1.0

1.1.0.0 https://www.mjr.one

Code Generation based on twig

  Sources   Download

LGPL-3.0

The Requires

 

by Christopher Westerfield

twig code bundle symfony generation

24/03 2017

dev-Phase2

dev-Phase2 https://www.mjr.one

Code Generation based on twig

  Sources   Download

LGPL-3.0

The Requires

 

by Christopher Westerfield

twig code bundle symfony generation

21/03 2017

1.0.4

1.0.4.0 https://www.mjr.one

Code Generation based on twig

  Sources   Download

LGPL-3.0

The Requires

 

by Christopher Westerfield

twig code bundle symfony generation

20/03 2017

1.0.3

1.0.3.0 https://www.mjr.one

Code Generation based on twig

  Sources   Download

LGPL-3.0

The Requires

 

by Christopher Westerfield

twig code bundle symfony generation

20/03 2017

1.0.0

1.0.0.0 https://www.mjr.one

Code Generation based on twig

  Sources   Download

proprietary

The Requires

 

by Christopher Westerfield

twig code bundle symfony generation