Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class parentClass
- {
- private $uid;
- private $fields;
- public function __contruct()
- {
- $this->uid = 'something';
- $this->fields = array('column1' => 'val');
- }
- }
- class childClass extends parentClass
- {
- //private $uid;
- //private $fields;
- public function __contruct()
- {
- // why when calling this parent::__construct(); is not initialized the $array on the child Class?
- // how can i init this array with help of the parent contrcutor?
- // or do i have to init the array in the child too?
- parent::__construct();
- $this->fields['column2'] = 'val2';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement