コード例 #1
0
ファイル: demo-dog.php プロジェクト: emiliyank/php-oop-oct15
 public function __construct($c, $n = "Balkan", $b = "Shepherd")
 {
     echo "__constuct Dog<br/>";
     parent::__construct($c, $b);
     $this->name = $n;
     self::$dogs_count++;
 }
コード例 #2
0
ファイル: Mamifero.php プロジェクト: AnaHolgado/DWES
 public function __construct($sexo, $anno, $nombre, $tetillas, $alimentacion)
 {
     parent::__construct($sexo, $anno, $nombre);
     $this->tetillas = $tetillas;
     $this->alimentacion = $alimentacion;
     self::$numMamiferos++;
 }
コード例 #3
0
 public function __construct($name, $address)
 {
     // Call the parent constructor to save time
     parent::__construct($name);
     // Assign an additional value
     $this->address = $address;
 }
コード例 #4
0
ファイル: Extend.php プロジェクト: xinyflove/MyPHPClass
 function __construct($personSex, $personAge)
 {
     //使用parent调用了父类的构造函数
     parent::__construct("Caffrey");
     self::$personSex = $personSex;
     $this->personAge = $personAge;
 }
コード例 #5
0
 function __construct($especie, $peso, $cor, $alimento, $som)
 {
     #Chamando contrutor da classe pai.
     parent::__construct($especie, $peso, $cor);
     $this->alimento = $alimento;
     $this->som = $som;
 }
コード例 #6
0
ファイル: Mamifero.php プロジェクト: jamayo/GIT
 public function __construct($nombre, $sexo, $peso, $edad, $tiempoGestacion)
 {
     parent::__construct($nombre, $sexo, $peso, $edad);
     //estos atributos se construyen con el constructor de la clase abstracta Animal
     $this->tiempoGestacion = $tiempoGestacion;
     //$this->tipo = $tip;
     //$this->kilometraje = 0; //el atributo kilometraje ya se establece en el contructor de la clase abstracta.
 }
コード例 #7
0
 public function __construct($s, $r)
 {
     parent::__construct($s);
     if (isset($r)) {
         $this->raza = $r;
     } else {
         $this->raza = "siamés";
     }
 }
コード例 #8
0
ファイル: index.php プロジェクト: sourabhpal/PHP
 public function __construct($name)
 {
     parent::__construct();
     $this->health = 170;
 }
コード例 #9
0
ファイル: fox.php プロジェクト: codeless/jugglecode
 public function __construct()
 {
     parent::__construct('fox', 'quick brown');
 }
コード例 #10
0
 public function __construct($nombre, $sexo, $color, $raza, $tipoEscamas)
 {
     parent::__construct($nombre, $sexo, $color, $raza);
     $this->tipoEscamas = $tipoEscamas;
 }
コード例 #11
0
 function __construct($species, $name, $health, $gender)
 {
     parent::__construct($name, $health, $gender);
     $this->species = $species;
 }
コード例 #12
0
ファイル: homeworkoop.php プロジェクト: drfateev/newblog
 public function __construct($name, $age, $sex)
 {
     parent::__construct($name, $age);
     $this->sex = $sex;
 }
コード例 #13
0
 public function __construct($name, $gender, $health, $species)
 {
     parent::__construct($name, $gender, $health);
     $this->species = $species;
 }
コード例 #14
0
 public function __construct($sexo)
 {
     parent::__construct($sexo);
 }
コード例 #15
0
 public function __construct($name, $age)
 {
     parent::__construct($age);
     $this->name = $name;
 }
コード例 #16
0
ファイル: Elephant.class.php プロジェクト: 3dw1np/wf3
 public function __construct($name, $age)
 {
     $this->_dureeVie = 100;
     $this->_solitaire = false;
     parent::__construct($name, $age, "Elephant");
 }
コード例 #17
0
ファイル: Ave.php プロジェクト: AnaHolgado/DWES
 public function __construct($sexo, $anno, $nombre, $ecosistema)
 {
     parent::__construct($sexo, $anno, $nombre);
     $this->ecosistema = $ecosistema;
     self::$numAve++;
 }
コード例 #18
0
 public function __construct($nombre, $sexo, $color, $raza, $plumaje)
 {
     parent::__construct($nombre, $sexo, $color, $raza);
     $this->plumaje = $plumaje;
 }
コード例 #19
0
ファイル: 14-04.php プロジェクト: Crackpot/gftop
 function __construct($fur_color, $legs, $name = NULL)
 {
     parent::__construct("warm", $name);
     $this->fur_color = $fur_color;
     $this->legs = $legs;
 }
コード例 #20
0
ファイル: Horse.php プロジェクト: bamzy/huco618
 public function __construct($name, $maxFoodCapacity)
 {
     $this->type = 'Horse';
     parent::__construct($name, $maxFoodCapacity);
 }
コード例 #21
0
ファイル: Fish.php プロジェクト: matty-digital/mattbowytz
 public function __construct($n, $w)
 {
     parent::__construct($n);
     $this->water = $w;
 }
コード例 #22
0
ファイル: Mamifero.php プロジェクト: DanielPastorRueda/Php-1
 function __construct($genero, $sexo, $peso, $alimentacion, $tipoSangre)
 {
     parent::__construct($genero, $sexo, $peso, $alimentacion, $tipoSangre);
 }
コード例 #23
0
ファイル: poly.php プロジェクト: yogendra9891/basic
 public function __construct($name, $height, $weight, $favFood, $speed, $sound, $canFly)
 {
     parent::__construct($name, $height, $weight, $favFood, $speed, $sound, $canFly);
 }
コード例 #24
0
 public function __construct($t, $a, $w)
 {
     parent::__construct($t, $a);
     $this->wingLenght = $w;
 }
コード例 #25
0
 public function __construct($name, $address)
 {
     parent::__construct($name);
     //If there's no $name, it will use parent's $name
     $this->address = $address;
 }
コード例 #26
0
 public function __construct($name, $address)
 {
     $this->address = $address;
     parent::__construct($name);
 }
コード例 #27
0
ファイル: Cat.php プロジェクト: SamyGhannad/CtCI-6th-Edition
 public function __construct($name)
 {
     parent::__construct($name);
 }
コード例 #28
0
 public function __construct($name)
 {
     parent::__construct($name);
     $this->flyingType = new CanFly(true);
 }
コード例 #29
0
 public function __construct($name, $sex, $health, $lionSpecies)
 {
     parent::__construct($name, $sex, $health);
     $this->lionSpecies = $lionSpecies;
 }
コード例 #30
0
ファイル: Bird.php プロジェクト: yogendra9891/basic
 public function __construct($name, $height, $weight, $favFood, $speed, $sound, $canFly)
 {
     //calling parent class constructor
     parent::__construct($name, $height, $weight, $favFood, $speed, $sound, $canFly);
 }