(PHP7) I have two classes but would like to access one class inside of another for example:
Syntax: Property::House()->getAddress();
class Property
{
protected $House;
function Property()
{
self::$House = new House();
}
public function House()
{
return self::$House;
}
}
class House
{
public function getAddress()
{
// code
}
}
does anyone know to accomplish this?, the syntax needs to be the same but the classes can change if needed