Dummy code to give you an idea of what I am rambing on about...
Code: Select all
<?php
class A {
private $myvar;
private $myvar1;
// methods.
}
class B extends A {
// No vats in this as they are taken from A
// methods
}
$mything=new (B);
// perform actions on $mything
// save serialized version of $mything to database.
?>Surely serialize also requires the protected/private variables when it is being stored ?
Will try to track down more detail this evening unless anyone else has seen this behaviour and can give my some ideas on how to change the class variable privilege whilst still being able to save the serialized object. (I would like the class variables to only be accessed through the methods). Before you ask I tried putting in combinations such as pg_escape_string/addslashes/htmlentities in case there was a quote problem when saving the information.