У меня есть следующий код:
class Orders{
/**
*
* @var Supplier
*/
private $suppliers; //Array of Supplier
function loopAllSuppliers(){
foreach($this->suppliers as $supplier){
$supplier->/*no suggestion*/ //Can't get the method's to show here
$this->suppliers->getSupplierName(); //methods in class Supplier show normally here
}
}
}
Проблема проста. Я просто хочу иметь возможность объявить тип для моей переменной $supplier
так же, как я сделал это с $suppliers
.
Примечания: