appending an array non-static progenitor category php
how i extend parent's options array child classes php?
i have something this:
class parentclass {
open $options = array(
'option1'=>'setting1'
);
//the rest functions follow
}
i insert options array child category but erasing any progenitor options. i've attempted doing something this, nonetheless haven't definitely got work yet:
class childclass extends parentclass {
open $options = parent::options + array(
'option2'=>'setting2'
);
//the rest functions follow
}
what best proceed something this?
Comments
Post a Comment