joelwan / php-object-generator Goto Github PK
View Code? Open in Web Editor NEWORM class generator for PHP
Home Page: http://www.phpobjectgenerator.com
ORM class generator for PHP
Home Page: http://www.phpobjectgenerator.com
hi Loksly, Joel
do you guys have any idea of using transactions in POG. i think we need to alter the save, delete methods to pass the connection so that we can commit or rollback if something goes wrong. again i'm worrying this will cause major issues.
any comments?
Rifky
I know that this is a dead project :( but I've and old project made with POG 3.0e and I want to upgrade to 3.2, I've tried using POG but it doesn't work, and I've tried to create a test project and download plugins and setup folders, but it doesn't work
is it possibile to use POG 3.2 with PHP 5.5.24 ?
thanks
Hello,
well i have a problem when i lunch index.php,
i have this :-
client : im using firefox
serveur : ubuntu 12.10
[/var/www] > php -v
PHP 5.3.10-1ubuntu3.9 with Suhosin-Patch (cli) (built: Dec 12 2013 04:24:43)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
do u know what the problem is please ?
The zip library in use produces zip files incompatible with OSX's default unarchiver utility
I'm not right now using my own computer, so I prefer not to change this line of code using github file editor. I can't test the code further than using php -l command.
Anyway I've realized right now that this line:
should use intval to prevent sql code injection. Then it will be like this one:
$this->string .= "\n\t\t\$this->pog_query = \"delete from `".strtolower($this->objectName)."` where `".strtolower($this->objectName)."id`='\".\intval($this->".strtolower($this->objectName)."Id).\"'\";";
I'll update this asap.
Hi,
I've downloaded the POG Registration System (example in the tutorial) and it worked. But the generated code didn't work. I've created the form and the process.php too, the ID of customer is added to the Database, but the other fields are empty.
this is my form.html
<form action="processCustomer.php" method="post">
<fieldset>
<legend>Add New Customer</legend>
<label>Customer Name</label>
<input type="text" name="customerName" placeholder="Customer Name"><br>
<label>Phone Number</label>
<input type="text" name="customerPhone" placeholder="Phone Number"><br>
<label>Address</label>
<textarea rows="3" name="customerAddress" placeholder="Customer Address"></textarea><br>
<button type="submit" class="btn">Add Customer</button>
</fieldset>
</form>
and this is my process.php
<?
include "configuration.php";
include "objects/class.database.php";
include "objects/class.customer.php";
$user = new Customer();
if (isset($_POST['customerName']))
{
$user->userName = $_POST['customerName'];
}
if (isset($_POST['customerPhone']))
{
$user->emailAddress = $_POST['customerPhone'];
}
if (isset($_POST['customerAddress']))
{
$user->emailAddress = $_POST['customerAddress'];
}
if ($user->Save())
{
echo "Customer saved successfully";
}
?>
is there something wrong in my code?
please help me to figure it out.
Thanks,
Ciptard.
Hi,
I generate An object "test" with a field "test". I trie the url generated like the next one, but it don't work :
Thank you in advance.
When i download the zip file then i get the file but problem is that the file is empty.
index.php uses tags as <?=, these are generally not recommended[1].
http://stackoverflow.com/questions/200640/are-php-short-tags-acceptable-to-use
hey guys,
when i create an object which has two attributes with different names which refer the same parent type, one attribute name has to be different than the parent name. this is creating an issue when we call object->GetAttribut2 function.
is there a workaround to this?
Rgds
Rifky
When downloading the finished code after generating the code, the zip-file only contains the class.database.php file, not the generated object file, nor the class.pog_base.php file.
Hi Joel,
I'm going to develop a "GetBy" plugin so you can use code like these:
$o = new object();
$objects = $o->GetByDate($value);
which should equivalent to
$o->GetList(array(array('Date','=',$value));
I'm still wondering if I should use just a plugin with name "GetBy"
or rewrite the __call method at the classes where I want the functionality to work.
Well, the fact is that looking at the pog_base code
I've seen that the plugin instantiation is done this way:
eval('$plugin = new $method($this,$argv);');
and I was wondering why not to use:
$plugin = new $method($this,$argv);
I've changed the code in my projects and it seems to be working using the second line.
I don't know if there is any reason for using eval, is there any?
Have a nice day!
Hi !
I noticed that generation no longer worked with error "Error: Could not connect to host" on index2.php.
It looks like the site http://beta.phpobjectgenerator.com/services/soap.php?wsdl is down.
In the meantime, I just changed my configuration.php file to redirect to localhost (and disabled deprecated warnings in services/soap.php)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.