Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PHP Getter & Setter and ConstructorNew to Visual Studio Code? Get it now.
PHP Getter & Setter and Constructor

PHP Getter & Setter and Constructor

fovelas

|
2,325 installs
| (2) | Free
Generate getter, setter and constructor methods for all variables in php class.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PHP Getter & Setter and Constructor for Visual Studio Code

I was inspired by this feature of IntelliJ.

Demo

Commands

phpgsc allows you to quickly generate constructor, getter and setter methods with commands.

  • phpgsc: Constructor
  • phpgsc: Getter
  • phpgsc: Setter

Usage

Examples of usages:

  • F1 -> phpgsc: Constructor
  • Context Menu -> phpgsc: Constructor

You can access this commands from context menu.

Context Menu

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft