public countSuppliers ( $type ) : integer | ||
$type | type to search (see constants) / 0 for all (default 0) | |
Результат | integer |
function countSuppliers($type = 0)
{
if ($type > 0) {
if (isset($this->suppliers[$type])) {
return count($this->suppliers[$type]);
}
} else {
if (count($this->suppliers)) {
$count = 0;
foreach ($this->suppliers as $u) {
$count += count($u);
}
return $count;
}
}
return 0;
}