Is there a way in PHP to use an object created in one class, on another class without serializing?
For instance, would the following work?
class SomeClass {
function someFunction {
$a = new OtherClass();
$b = $a->getName($someVar);
}
}
//script that calls the SomeClass class
$c = new SomeClass
$name = $c->getName();
Would the value of $name be available if the calling script was in a separate script without serializing into a session?
What I'm really gettiing at is whether or not it's possible to use a busniness object model in PHP like you would in Java. Is it realistic to use get and set methods for business objects, or is it only possible by serializing and unserializing on every call to the object between classes making it impractical? Does anyone out there use a business model like this?