tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

AlbumTableGateway setup missing in the tutorial

Open joni- opened this issue 8 years ago • 2 comments

Hi,

I am setting up a database for Zend 3 and browsing the tutorial. It seems like there is a missing piece in Using ServiceManager to configure the table gateway and inject into the AlbumTable. In the AlbumTable factory a Model\AlbumTableGateway::class is used but there is no mention of that class before.

Got it working by creating an empty AlbumTableGateway class extending AbstractTableGateway but it would be good to mention about it in the tutorial.

joni- avatar Feb 28 '17 12:02 joni-

@joni- This class is not required, because in the module class a closure handle the creation of the service. The name for Model\AlbumTableGateway::class works in PHP even though the class does not exist.

froschdesign avatar Mar 06 '17 15:03 froschdesign

The current usage of the class names is confusing. We should update the tutorial with a better solution.

froschdesign avatar Jan 24 '18 08:01 froschdesign