Ejemplo n.º 1
0
 function MyDerivedClass()
 {
     parent::__construct();
     $this->pub_new = "pub_new value";
     $this->prot_new = "prot_new value";
     $this->priv_new = "priv_new value";
 }
Ejemplo n.º 2
0
 function __construct($a)
 {
     parent::__construct();
     $this->pub = $this->prot . $a;
 }
Ejemplo n.º 3
0
 function __construct()
 {
     parent::__construct();
     print "In SubClass constructor\n";
 }
Ejemplo n.º 4
0
 public function __construct()
 {
     parent::__construct();
     echo "A new constructor in " . __CLASS__ . ".<br />";
 }
Ejemplo n.º 5
0
 public function __construct()
 {
     parent::__construct();
     echo "the class " . __CLASS__ . " was started  --- contructor extended" . "<br/>";
 }
Ejemplo n.º 6
0
 public function __construct()
 {
     parent::__construct();
     $this->id = self::$cnt++;
     echo 'Daughter #' . $this->id . PHP_EOL;
 }
Ejemplo n.º 7
0
 public function __construct()
 {
     /*
     Preserving Original Method Functionality While Overwriting Methods
     To add new functionality to an inherited method while keeping the original method intact, use the parent keyword with the scope resolution operator (::):
     */
     parent::__construct();
     // Call the parent class's constructor
     echo "A new constructor in " . __CLASS__ . ".<br />";
 }