channaveer / EntityGenerator

PHP Based Entity Generator - Used to generate entities from existing database
13 stars 5 forks source link

How to use it ? #3

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hello m8, today i've found your tool but after generating my entity, i don't understand how to use it to query the database.

I've created a test.php file in the root folder of the project and i put in it :

<?php
use Entity\Monuments\Monument;
require('Entity/Monuments/Monument.php');
$monument = new Monument();
$nom = $monument->getNom();
echo "name: ". $nom;
?>

But nothing is available in the $name variable and it's still empty.

Could you give me an example for Getters and Setters (creating, delleting, updating) please ?

Hope you can help me a little bit :)

channaveer commented 5 years ago

Hi, my package only servers for generating the Entities. It's not an ORM.

For your requirement, you may have a look into ReadBean

ghost commented 5 years ago

Oh ok i see, thx for your quick answer 👍 😄