I'm very new to zend framework 2 and I've been reading the docs and absorbing it as best I can.
I'm working through the zend skeleton tutorial and its all working but there's a minor point I don't understand.
In the album controller you're instructed to make a call to the table gateway to select all records - specifically $this->getAlbumTable()->fetchAll(). But the method that gets called isn't one I've created so can someone explain how getAlbumTable resolves to what it does. I would have expected to have called the serviceManager in the same way you call an invokable or factory - i.e. $sm->get('AlbumTableGateway')
Appreciate any advice you can give to a ZF2 newbie.
class AlbumController extends AbstractActionController
{
protected $albumTable;
public function indexAction()
{
return new ViewModel(array(
'albums' => $this->getAlbumTable()->fetchAll(),
));
}