Zend\Code\Generator: Previous code examples were based on ZF1 and did not work