Skip to main content

Posts

Showing posts from March, 2017

__call magig method with multiple classes

<?php  /**  *  */  class address  {   public $address=" ramnager";   function getAddress( )   {   return $this->address;   }  }  /**  *  */  class name extends address  {   private $firstName="Saddam";   private $lastName="Hussain";   public function getfisrtName()   {   return $this->firstName;   }   public function lastName($value='')   {   return $this->lastName;   }   public function fullName($value='')   {   return " ".$this->firstName." ".$this->lastName;   }  }  /**  *  */  class role  {   private $role =" admin";   public function getRole()   {   return $this->role;   }  }  /**  *  */  class user  {   protected $newClass;   protected...