<?php

 abstract class Personne{
 protected $nom;
 protected $adresse;

	public function __construct(){

	}
	public function getNom(){
		return $this->nom;
	}
	public function getAdresse(){
		return $this->nom;
	}
	public function setNom($leNom){
		$this->nom=$leNom;
	}
	public function setAdresse($lAdresse){
		$this->nom=$lAdresse;
	}

	public  abstract function creationCompte();

	public function __toString(){
	 echo "waza";
	}

}

class Client extends Personne{

	public $monFournisseur;

	private $montant;
	private $reduction;
 	public  function creationCompte(){}

	
	public function __construct($leNom="ajjj"){
		parent::__construct(); //super();
		//$this->setNom($leNom);
		$this->nom=$leNom;
	}
	public function getMontant(){
		return $this->montant;
	}
	public function getReduction(){
		return $this->nom;
	}
	public function setMontant($leMontant){
		$this->montant=$leMontant;
	}
	public function setReduction($laReduction){
		$this->reduction=$laReduction;
	}
}

final class Fournisseur extends Personne{

	private $categorie;

	public function getCategorie(){
		return $this->categorie;
	}
	public function setCategorie(string $laCategorie){
		$this->categorie=$laCategorie;
	}

	public  function creationCompte(){}

	public function __construct($leNom="bb"){
		parent::__construct();
		//$this->setNom($leNom);
		$this->nom=$leNom;
		Fournisseur::$nbF++;
	}


	public static $nbF=0;
}

echo Fournisseur::$nbF;
$f1=new Fournisseur();
$f1->setCategorie("super étudiant");
echo $f1->getCategorie();

$cli1=new Client();
$cli2=new Client();

$cli1->monFournisseur=$f1;
$cli2->monFournisseur=$f1;

echo $cli1->monFournisseur->getNom();
echo $cli2->monFournisseur->getNom();
//$maPersonne->setNom("lulu");
//echo $maPersonne->getNom();
//$maPersonne= new Personne();
//$maPersonne->setNom("toto");
//echo $maPersonne->getNom();
//echo $maPersonne;

?>