ok... im not at home or i would test this myself. im at work (meant to be working), just running through some theories.
anyway, say i have a class. myclass, and in the class, i want a method that will serilise an instance of itself and then store that serilised object in the db. could i do it like this?
public function savestate() {
$state = serialize($this);
// save state to db.
}
or would i need to pass the instance in through an argument?
like isaid, im at work so cant test it. anyone know?