Object Oriented PHP
Posted on 2004-07-31
I'm trying to convert some Java code into PHP code:
I created a class called Product in PHP, and a class called ProductDB which has utility functions for the database. The java code is:
Product product = ProductDB.readRecord(connection, productCode);
Are there static methods in PHP? Would I have to do something like the following?
$product = new Product();
$productdb = new ProductDB();
$product = $productdb->readRecord($connection, $productCode);
Also how do user defined objects work with sessions ( adding/retrieving) ?