Magento version: 2.0.0
In ther Magento\Checkout\Block\Cart, there has a function is:
/**
* @codeCoverageIgnore
* @return int
*/
public function getItemsCount()
{
return $this->getQuote()->getItemsCount();
}
getQuote()
is from the Class AbstractCart
because Cart
is extends \Magento\Checkout\Block\Cart\AbstractCart
.
According the Eclipse helping, getItemsCount()
should be from Magento\Quote\Model\Quote
.
In \Magento\Checkout\Block\Cart\AbstractCart
, the Class Quote
is just only invoked with use
keywords but not initialize or extend.
So, I am confused the relationship of getQuote()
with getItemsCount()
.
getQuote()
is not extend from Quote
class, why it can use the getItemsCount()
of Quote
?