Advertisement
Guest User

Untitled

a guest
May 12th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class parentClass
  2. {
  3.     private $uid;
  4.     private $fields;
  5.    
  6.     public function __contruct()
  7.     {
  8.         $this->uid = 'something';
  9.         $this->fields = array('column1' => 'val');
  10.     }
  11. }
  12.  
  13. class childClass extends parentClass
  14. {
  15.     //private $uid;
  16.     //private $fields;
  17.  
  18.     public function __contruct()
  19.     {
  20.         // why when calling this parent::__construct(); is not initialized the $array on the child Class?
  21.         // how can i init this array with help of the parent contrcutor?
  22.         // or do i have to init the array in the child too?
  23.         parent::__construct();
  24.         $this->fields['column2'] = 'val2';
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement