Skip to content

Documentation & Issue Repository for Php Data Object Generator plugin for IntelliJ and PhpStorm

Notifications You must be signed in to change notification settings

SourceLabOrg/PhpDataObjectGeneratorPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Php Data Object Generator plugin for IntelliJ and PhpStorm

Version Downloads

PHP Data Object Generator

Description

Code generator plugin for PHP Data Objects (Value Object, DTO/Data Transfer Object, etc...) and Builder pattern objects for creating them.

Cost

The basic code generator for Data Objects and Builders are free and require no license. Just install the plugin. Advanced in-place refactoring of previously generated classes to add/remove class properties require a nominal one time fee to use after the 30-day trial.

Features

Free

  • Generate new Data Objects by defining class properties.
  • Generate Builder classes for your Data Objects.
  • Modify templates used in generation.

Paid

  • Ability to in-place refactor the Data Object and their Builders to add and remove properties.

Usage

To generate a new Data Object:

  • Select "Php Data Object" from the New File menu.
    • Right Click > New > Php Data Object
  • Fill in the dialog supplying classname and property definitions.
  • Optionally select to make the class immutable (no "setter" methods will be generated).
  • Optionally enable generating a Builder for the class.

To generate a Builder from an existing PHP class:

  • Select "Builder..." from the Generate menu
    • Right Click in Editor view on PHP class > Generate > Builder...
  • Define Builder classname and select which properties to include in the Builder.

Modify Templates used to Generate Code

  • Open Project Preferences
    • alt-. or command-.
  • Within Preferences: Editor > File and Code Templates > "Other" tab > PHP Data Object Plugin
  • Select "PHP DataObject Plugin"
    • Edit templates as needed.

To In-Place Refactor existing Data Object:

  • Select "Update Data Object" from the Refactor menu
    • Right Click in Editor view on PHP class > Refactor > Update Data Object
  • Unselect any properties you wish to remove from the Existing Properties table.
  • Define any properties you wish to add to the New Properties table.

Note: In-place refactoring will only function on data classes previously generated using this plugin.

Note: Making significant modifications to the included templates may cause the automatic refactoring to fail or produce otherwise unsatisfactory results. If you run into issues please submit a bug report with your template and example code.

Submit BugReports or Feature Requests: https://github.com/SourceLabOrg/PhpDataObjectGeneratorPlugin/issues


Installation

  • Using IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "Php Data Object Generator" > Install Plugin

  • JetBrains Market Place:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...


About

Documentation & Issue Repository for Php Data Object Generator plugin for IntelliJ and PhpStorm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages