I have a class called logit, please excuse the incorrect formatting.
Now I have another class that extends logit
Now I have another function that extends logit. Which I call after lognot
Now I'm running into a problem where it resets $logs when lognew is called.
So I need $logs to be defined as a array on the first instance and for it then to not be initiated after, and to hold what ever values the class's that extend logit enter into this array. The final class lognew will then handle it all if it contains any data.
Thanks for any replies.
PHP:
<?
class logit
var: $logs=array();
// ... does other stuff ...
?>
Now I have another class that extends logit
PHP:
<?
class lognot extends logit
if (!in_array($this->logs)) {
array_push($this->logs,$somevariable)
}
?>
Now I have another function that extends logit. Which I call after lognot
PHP:
<?
class lognew extends logit
if(count($this->logs)<1) {
// do something
}
?>
Now I'm running into a problem where it resets $logs when lognew is called.
So I need $logs to be defined as a array on the first instance and for it then to not be initiated after, and to hold what ever values the class's that extend logit enter into this array. The final class lognew will then handle it all if it contains any data.
Thanks for any replies.
Last edited: