Here is an online-based setter and getter generator tool capable of generating setters and getters for multiple programming languages, including PHP, JavaScript, C++ and C#. Simply choose the language of your preference, write the property names and click the generator button. Voilà!
Source: Setter and getter generator for PHP, JavaScript, C++ and C# | Kjetil Hårtveit’s Blog