Giter VIP home page Giter VIP logo

php-object-generator's People

Contributors

joelwan avatar loksly avatar rafeethu avatar vladoschreiner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-object-generator's Issues

Download problem

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.

using transactions

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

problem on index.php

Hello,

well i have a problem when i lunch index.php,

i have this :-

probleme-php-object

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 ?

plugin instantiation at pog_base

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!

Error

When i download the zip file then i get the file but problem is that the file is empty.

attribute name not equal to parent name issue

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

upgrade to 3.2

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

Missing intval in Delete Function

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:

https://github.com/joelwan/php-object-generator/blob/master/object_factory/class.objectphp5pogmysql.php#L500

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.

Couldn't Insert the Data in Form to DB

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.