Structy is a free software that can automatically generate PHP classes from MySQL database. You just need to provide credentials of MySQL database. Structy will read all the tables in that, see relationship between tables, and generate PHP classes that you can quickly use in coding.
Structy is completely free, and makes is pretty easy to get started with PHP coding by providing you with ready made classes corresponding to MySQL tables.
Structy creates one class for each of the table. Each class represents field in the database with a private attribute. Further, for each database field, a getter and setter methods are also created.
Apart from these, each class has four database access methods:
- ReadObject Method
- ReadArray Method
- Insert Method
- Delete Method
How to Use Structy:
It is quite easy to create PHP classes with Structy. Structy runs on Windows, Mac, and Linux. You need to have wampserver installed on the m/c on which you are trying to run Structy. Just download Structy’s zip file, and unzip that on your computer. Start wampserver. Then go to “localhost”, and click on “Structy”. In that, provide credentials of MySQL database for which you want to generate classes. And that’s it. Structy will create PHP classes for you automatically. You can then modify those classes with a PHP IDE, like, CodeLobster, and Free online IDE.
Here is a video tutorial that explains how easy it is to use Structy:
Structy is a nice tool that makes it quite easy to generate PHP classes. The best part is that classes are neatly structured, so your code is well organized.
Download Structy free.